kingsfordgroup/sailfish

salmon 0.2.7 does not compile with boost 1.57.0

Closed this issue · 9 comments

❯❯❯ cmake . && make
…
/tmp/salmon-WUYZHB/sailfish-0.2.7/external/Shark/include/shark/Core/utility/Impl/boost_iterator_facade_fixed.hpp:66:7: error: 
      no template named 'enable_if_interoperable' in namespace 'boost::detail';
      did you mean 'iterators::detail::enable_if_interoperable'?
      BOOST_ITERATOR_FACADE_RELATION(==)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hi @sjackman,

Indeed --- this is a result of . . . Shark. While I would suggest to file a report with the shark dev team, I think the better solution here is to resolve & close issue 63. Currently, I get around this on OSX by allowing sailfish / salmon to use their own Boost -DFETCH_BOOST=TRUE, but this is far from an ideal solution. The fix to this is already in the works (relying on another, simpler, header-only, PCA implementation), but isn't complete yet.

Thanks for the workaround. I've almost got it working now. I'm seeing an error message when linking Salmon related to TBB. Note that I have installed TBB using Homebrew in /usr/local.

Linking CXX executable salmon
cd /tmp/salmon-XV2c6N/sailfish-0.2.7/src && install_name_tool -id @rpath/libcmph.dylib /tmp/salmon-XV2c6N/sailfish-0.2.7/external/install/lib/libcmph.0.dylib
cd /tmp/salmon-XV2c6N/sailfish-0.2.7/src && install_name_tool -id @rpath/libcmph.0.dylib /tmp/salmon-XV2c6N/sailfish-0.2.7/external/install/lib/libcmph.0.dylib
cd /tmp/salmon-XV2c6N/sailfish-0.2.7/src && install_name_tool -id @rpath/libtbb.dylib /tmp/salmon-XV2c6N/sailfish-0.2.7/external/install/lib/libtbb.dylib
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: /tmp/salmon-XV2c6N/sailfish-0.2.7/external/install/lib/libtbb.dylib (No such file or directory)
make[2]: *** [src/salmon] Error 1
make[1]: *** [src/CMakeFiles/salmon.dir/all] Error 2
make: *** [all] Error 2

More info:

==> cmake -DFETCH_BOOST=TRUE . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/salmon/0.2.7 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev
-- The C compiler identification is AppleClang 6.0.0.6000056
-- The CXX compiler identification is AppleClang 6.0.0.6000056
-- Check for working C compiler: /usr/local/Library/ENV/4.3/clang
-- Check for working C compiler: /usr/local/Library/ENV/4.3/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/local/Library/ENV/4.3/clang++
-- Check for working CXX compiler: /usr/local/Library/ENV/4.3/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5") 
-- Could NOT find Boost
Build system will fetch and build Boost
==================================================================
Setting Temporary Boost paths
BOOST INCLUDE DIR = /tmp/salmon-MbHrR6/sailfish-0.2.7/external/install/include
BOOST INCLUDE DIRS = /tmp/salmon-MbHrR6/sailfish-0.2.7/external/install/include
BOOST LIB DIR = /tmp/salmon-MbHrR6/sailfish-0.2.7/external/install/lib
BOOST LIBRAREIS = 
Build system will fetch and build the Cereal serialization library
==================================================================
Build system will fetch and build BWA (for Salmon)
==================================================================
Build system will fetch and build CMPH
==================================================================
Build system will fetch and build Jellyfish
==================================================================
-- Found Intel TBB
TBB_LIBRARIES = /usr/local/lib/libtbb.dylib;/usr/local/lib/libtbbmalloc.dylib
Build system will fetch and build Shark machine learning library
==================================================================
Build system will compile libgff
==================================================================
Build system will compile Staden IOLib
==================================================================
Build system will fetch SPDLOG
==================================================================
-- Found Tcmalloc: /usr/local/lib/libtcmalloc_minimal.a
CPACK_SOURCE_IGNORE_FILES = /src/PCA.cpp;/src/PCAUtils.cpp;/build/;/scripts/AggregateToGeneLevel.py;/scripts/ExpressionTools.py;/scripts/GenerateExpressionFiles.sh;/scripts/ParseSoftFile.py;/scripts/PlotCorrelation.py;/scripts/junk;/scripts/sfstrace.log;/scripts/SFPipeline.py;/bin/;/lib/;/sample_data/;PublishREADMEToWebsite.sh;/external/;/src/obsolete/;/include/obsolete/;WebsiteHeader.txt;/experimental_configs/;.git/
TBB_LIBRARIES = /usr/local/lib/libtbb.dylib;/usr/local/lib/libtbbmalloc.dylib
Boost_LIBRARIES = 
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/salmon-MbHrR6/sailfish-0.2.7
==> make install
…

Hi @sjackman --- I see what's going on here (and it's frustrating!). OSX is very stubborn in the way that it works with it's (non-compliant) variant of the RPATH variable. Essentially, you have to give it the actual path to the library you want it to be able to find (at install time) if you don't want to have to futz with the DYLD_FALLBACK_LIBRARY_PATH variable. I'd made the mistake of assuming that, for tbb, this would be in the location where it is placed if it's downloaded. That's not the case when e.g. it's already installed. Let me see if I can fix this. In other (good) news, I've eliminated the need for Shark, so the latest version in the repository should be possible to build with Boost 1.57.

Ok --- I believe I've updated the build system in a way that resolves this issue. Now, it will only attempt to run the install_name_tool step for TBB if it has had to install this library itself (otherwise, the library should already be somewhere in your path --- as in your case --- and it shouldn't have to do the install_name_tool magic). I tested this with the TBB from Homebrew on my machine. I haven't tagged a release with this fix yet (it will all make it into v0.2.8), but if you pull from the latest commit, you should be able to (1) build with a Boost newer than 1.55 and (2) use a pre-installed TBB found by the build system. If that works for you, let me know and I'll close the ticket.

Works for me. Thanks, Rob! I'm looking forward to a release with this fix. Cheers, Shaun

Great! The release shouldn't be far off at all (and also brings some other bug fixes and a new feature that are already implemented --- a new and improved error model for alignment-based salmon). Once the next release is tagged, I'll close this ticket.

Sounds good.

OK --- I've tagged and pushed the v0.3.0 release. I'm going to close this ticket now (assuming that I haven't broken anything that I fixed since last time). If there are any issues, just comment here and I'll open it back up.