Ticket #10329 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Linking error with boost 1.56

Reported by: Steven Hahn Owned by: Steven Hahn
Priority: critical Milestone: Release 3.3
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Ross Whitfield

Description

Boost 1.56 introduces a linking error in CustomInterfacesTest (see below). The same test builds fine with boost 1.55

Homebrew recently updated their formula to boost 1.56 and many linux distributions will update soon.

[2091/2092] Linking CXX executable bin/CustomInterfacesTest
FAILED: : && /usr/bin/c++   -m64 -std=c++0x -Wno-deprecated-register -g -Wl,-search_paths_first -Wl,-headerpad_max_install_names  MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/WorkspaceMementoTest.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/WorkspaceInADSTest.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/ReflLoadedMainViewPresenterTest.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/ReflBlankMainViewPresenterTest.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/RawFileMementoTest.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/MuonAnalysisHelperTest.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/IO_MuonGroupingTest.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/EventNexusFileMementoTest.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/CreateMDWorkspaceAlgDialogTest.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/ALCPeakFittingPresenterTest.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/ALCDataLoadingPresenterTest.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/ALCBaselineModellingPresenterTest.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/ALCBaselineModellingModelTest.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/CustomInterfacesTest_runner.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/__/__/__/Framework/TestHelpers/src/ComponentCreationHelper.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/__/__/__/Framework/TestHelpers/src/WorkspaceCreationHelper.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/__/__/__/Framework/TestHelpers/src/ScopedFileHelper.cpp.o MantidQt/CustomInterfaces/test/CMakeFiles/CustomInterfacesTest.dir/__/__/__/Framework/TestHelpers/src/TearDownWorld.cpp.o  -o bin/CustomInterfacesTest -F/usr/local/Cellar/qt/4.8.6/lib bin/libMantidQtCustomInterfaces.dylib bin/libMantidDataObjects.dylib TestingTools/gmock-1.7.0/libgmock.a bin/libMantidWidgets.dylib bin/libMantidQtAPI.dylib -framework QtHelp -framework QtWebKit -framework QtXmlPatterns /usr/local/lib/libqwt.dylib /usr/local/lib/libqscintilla2.dylib bin/libQtPropertyBrowser.dylib -framework Qt3Support -framework QtOpenGL -framework QtSvg -framework QtGui -framework QtXml -framework QtSql -framework QtNetwork -framework QtCore bin/libMantidAPI.dylib bin/libMantidGeometry.dylib bin/libMantidKernel.dylib /usr/local/lib/libboost_date_time-mt.dylib /usr/local/lib/libboost_regex-mt.dylib /usr/local/lib/libPocoFoundationd.dylib /usr/local/lib/libPocoUtild.dylib /usr/local/lib/libPocoXMLd.dylib /usr/local/lib/libPocoNetd.dylib /usr/local/lib/libPocoCryptod.dylib /usr/local/lib/libPocoNetSSLd.dylib /usr/local/lib/libgsl.dylib /usr/local/lib/libgslcblas.dylib /usr/local/lib/libmuparser.dylib -framework AGL -framework OpenGL /usr/local/lib/libTKernel.dylib /usr/local/lib/libTKBO.dylib /usr/local/lib/libTKPrim.dylib /usr/local/lib/libTKMesh.dylib /usr/local/lib/libTKBRep.dylib /usr/local/lib/libTKTopAlgo.dylib /usr/local/lib/libTKMath.dylib /usr/local/lib/libTKG2d.dylib /usr/local/lib/libTKG3d.dylib /usr/local/lib/libTKGeomBase.dylib /usr/local/lib/libNeXus.dylib /usr/local/lib/libNeXusCPP.dylib && :
Undefined symbols for architecture x86_64:
  "std::__1::basic_ostream<char, std::__1::char_traits<char> >& boost::operator<<<char, std::__1::char_traits<char>, QString>(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, boost::optional<QString> const&)", referenced from:
      void testing_internal::DefaultPrintNonContainerTo<boost::optional<QString> >(boost::optional<QString> const&, std::__1::basic_ostream<char, std::__1::char_traits<char> >*) in ALCPeakFittingPresenterTest.cpp.o
  "std::__1::basic_ostream<char, std::__1::char_traits<char> >& boost::operator<<<char, std::__1::char_traits<char>, std::__1::pair<double, double> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, boost::optional<std::__1::pair<double, double> > const&)", referenced from:
      void testing_internal::DefaultPrintNonContainerTo<boost::optional<std::__1::pair<double, double> > >(boost::optional<std::__1::pair<double, double> > const&, std::__1::basic_ostream<char, std::__1::char_traits<char> >*) in ALCDataLoadingPresenterTest.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Change History

comment:1 Changed 6 years ago by Federico M Pouzols

It seems that many projects are having trouble with this. Possible solutions include:

Not sure if this is a backwards incompatible change in boost or if that operator overload was never officially supported.

comment:2 Changed 6 years ago by Steven Hahn

  • Owner set to Steven Hahn
  • Status changed from new to assigned

comment:3 Changed 6 years ago by Steven Hahn

  • Status changed from assigned to inprogress

comment:4 Changed 6 years ago by Steven Hahn

Federico's first option fixes the linking issue with boost 1.56.

Testing uncovered that CalculateMSVesuvioTest is failing with boost 1.56. It looks like the same seed produces different results in boost version 1.56 and newer. Results are close, so checking the boost version is probably sufficient.

http://stackoverflow.com/questions/26506550/consistent-random-number-generation-accross-platforms-with-boostrandom https://groups.google.com/forum/#!msg/bob-devel/EzZwQvxxxYc/GPFZjISsX2oJ

comment:5 Changed 6 years ago by Steven Hahn

Refs #10329. Fix linking issues and failed unit test.

Changeset: ae1e54f50796d7cc3860c1ab45b5ea730edd140d

comment:6 Changed 6 years ago by Steven Hahn

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

This is being verified as pull request #67.

comment:7 Changed 6 years ago by Ross Whitfield

  • Status changed from verify to verifying
  • Tester set to Ross Whitfield

comment:8 Changed 6 years ago by Ross Whitfield

  • Status changed from verifying to closed

Merge pull request #67 from mantidproject/feature/10329_fix_boost_1p56

Fix linking issues and failed unit test with Boost 1.56 and newer

Full changeset: 708054c608c85e9da1adbb083318e03956c0e01c

comment:9 Changed 6 years ago by Ross Whitfield

  • Milestone changed from Release 3.4 to Release 3.3

comment:10 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11171

Note: See TracTickets for help on using tickets.