Ticket #9421 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Clear warnings from gcc4.8/numpy1.7 build

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: major Milestone: Release 3.2
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Michael Reuter

Description

Required for supporting Fedora 20 & Ubuntu 14.04.

Change History

comment:1 Changed 6 years ago by Martyn Gigg

  • Status changed from new to assigned

comment:2 Changed 6 years ago by Martyn Gigg

  • Status changed from assigned to inprogress

Clear warnings from deprecated functionality in numpy 1.7

Refs #9421

Changeset: e6f48598fb9827f2e747885b538c07ab66058927

comment:3 Changed 6 years ago by Martyn Gigg

Clear gcc 4.8 warning about non-trivial move assignment operator

C++11 dictates that move assignment operators will only be auto-generated when a set of circumstances is met. One of these is the lack of a user-defined destructor. Add virtual destructors to the Fit hierarchy avoids the compiler generating trivial move-assignment ops and avoids the warning in virtually inheriting subclasses, e.g Python IPeakFunctionAdapter.cpp. Refs #9421

Changeset: aab4b08a3efc4227833c1994239b6ea827568c63

comment:4 Changed 6 years ago by Martyn Gigg

Suppress gcc 4.8 warnings on gtest 1.7 code.

Refs #9421

Changeset: 0c9220995ec718d9d171641280fa830e1c5d5be9

comment:5 Changed 6 years ago by Martyn Gigg

Fix gcc 4.8 warnings in ICat.

Refs #9421

Changeset: e08ffa8d56799c38e36aa94809df7db56fed8c69

comment:6 Changed 6 years ago by Martyn Gigg

Fix gcc 4.8 warnings from API

Refs #9421

Changeset: 379c16c5c7e3643a806f2f530cd744ff212e048c

comment:7 Changed 6 years ago by Martyn Gigg

Fix warnings about use of unitialized variabies in MantidNexus

Refs #9421

Changeset: 166f033414d419fe53a57468cd506b35e4089baf

comment:8 Changed 6 years ago by Michael Reuter

  • Priority changed from major to trivial
  • type changed from defect to enhancement

I did this on my Fedora machine and it significantly reduced the warning numbers from ~420 to 15. Does not make it zero for me though.

comment:9 Changed 6 years ago by Michael Reuter

  • Priority changed from trivial to major
  • type changed from enhancement to defect

comment:10 Changed 6 years ago by Martyn Gigg

Thanks. I'll take another look.

comment:11 Changed 6 years ago by Martyn Gigg

Kill gcc 4.8 warnings in tests.

Refs #9421

Changeset: 960708a4a26ff28e8c2e0a47b8ad2d5efd7436a1

comment:12 Changed 6 years ago by Martyn Gigg

Fix numpy array writable flag setter.

Refs #9421

Changeset: c1e6b6c5de74212360a1ab5e581d8935a7abaae0

comment:13 Changed 6 years ago by Martyn Gigg

Merge branch 'bugfix/9421_gcc4.8_numpy1.7_warnings' into develop

Conflicts:

Code/Mantid/Framework/DataObjects/test/ManagedWorkspace2DTest.h

Refs #9421

Changeset: 4c8727e8ff338e508f7e1709977def6d0d523e75

comment:14 Changed 6 years ago by Martyn Gigg

Fix array initialization on VC++

Refs #9421

Changeset: 250177d68440d8deb7a3bce7770f73ceb5179d8a

comment:15 Changed 6 years ago by Martyn Gigg

  • Status changed from inprogress to verify
  • Resolution set to fixed

I think I've caught them all now.

Branch: bugfix/9421_gcc4.8_numpy1.7_warnings

Tester: Ideally this should be built clean on both Fedora 20 & Ubuntu 14.04 and all of the tests run but I think they both have gcc 4.8.2 & numpy 1.8 so either should be okay. The build should be clear of compiler warnings.

comment:16 Changed 6 years ago by Michael Reuter

  • Status changed from verify to verifying
  • Tester set to Michael Reuter

comment:17 Changed 6 years ago by Michael Reuter

  • Status changed from verifying to reopened
  • Resolution fixed deleted

We're almost there, but both OSes are still showing the following warnings from UI components.

/home/2zr/git/mantidproject/mantid/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectDataAnalysis.ui: Warning: The name 'label_5' (QLabel) is already in use, defaulting to 'label_51'.
/home/2zr/git/mantidproject/mantid/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectDataAnalysis.ui: Warning: The name 'verticalLayout_4' (QVBoxLayout) is already in use, defaulting to 'verticalLayout_41'.
/home/2zr/git/mantidproject/mantid/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectDataAnalysis.ui: Warning: The name 'label_4' (QLabel) is already in use, defaulting to 'label_41'.
/home/2zr/git/mantidproject/mantid/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectDataAnalysis.ui: Warning: The name 'label_3' (QLabel) is already in use, defaulting to 'label_31'.
/home/2zr/git/mantidproject/mantid/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/ConvertToEnergy.ui: Warning: Tab-stop assignment: 'ckCreateInfoTable' is not a valid widget.

comment:18 Changed 6 years ago by Martyn Gigg

I see them now, my grep only caught the lower-case 'w' ones. They're not actually warnings from gcc but from the Qt uic compiler and are acutally in our other clean builds at the moment. I'll try and fix them nonetheless.

comment:19 Changed 6 years ago by Michael Reuter

I'm fine with the explanation. You can close this ticket again and open one to fix the other issues since they are pre-existing but don't get flagged by the warning checkers.

comment:20 Changed 6 years ago by Martyn Gigg

  • Status changed from reopened to inprogress

Fix uic warnings about duplicate names

Refs #9421

Changeset: 74316f79a6485d97f1bd0d71b8a2171b72a52dc4

comment:21 Changed 6 years ago by Martyn Gigg

  • Status changed from inprogress to verify
  • Resolution set to fixed

That should have fixed uic warnings those now.

comment:22 Changed 6 years ago by Michael Reuter

  • Status changed from verify to verifying

comment:23 Changed 6 years ago by Michael Reuter

Martyn, you are the best. All warnings are now gone.

comment:24 Changed 6 years ago by Michael Reuter

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/bugfix/9421_gcc4.8_numpy1.7_warnings'

Full changeset: 39aaa4f03d258a203694d958444f8c91d047d968

comment:25 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10264

Note: See TracTickets for help on using tickets.