kingsfordgroup / sailfish

Rapid Mapping-based Isoform Quantification from RNA-Seq Reads
http://www.cs.cmu.edu/~ckingsf/software/sailfish
GNU General Public License v3.0
124 stars 45 forks source link

salmon 0.3.0: error: no member named 'all_of' in namespace 'std' #74

Closed sjackman closed 9 years ago

sjackman commented 9 years ago

Salmon 0.3.0 does not compile on Mac OS X Mountain Lion. See http://bot.brew.sh/job/Homebrew%20Science%20Pull%20Requests/1053/version=mountain_lion/console

  CXX    lib/misc.lo
lib/misc.cc:86:11: error: no member named 'all_of' in namespace 'std'
  if(std::all_of(arg.begin(), arg.end(), isblunt))
     ~~~~~^
1 error generated.
make[4]: *** [lib/misc.lo] Error 1
make[3]: *** [install] Error 2
make[2]: *** [libjellyfish-prefix/src/libjellyfish-stamp/libjellyfish-install] Error 2
make[1]: *** [CMakeFiles/libjellyfish.dir/all] Error 2
make: *** [all] Error 2
sjackman commented 9 years ago

Does Salmon require C++11? http://en.cppreference.com/w/cpp/algorithm/all_of

rob-p commented 9 years ago

Hi @sjackman,

Yes; salmon (like sailfish) uses C++11 extensively. In fact, it's not just sailfish and salmon that require C++11, but many of the libraries on which they depend (e.g. the concurrent queue that is used to distribute work and the library that is used for logging). I've tested (and compiled) sailfish and salmon successfully using gcc-4.7.2 and up. I've also successfully compiled it with clang-3.4 & 3.5 (3.3 may work but I've not tested). Finally, in terms of OSX, I've built it using the latest XCode (which uses Apple's on variant of Clang), but don't have access to older OSX systems to attempt to build / test.

--Rob

rob-p commented 9 years ago

Interestingly, the build at this point seems to not to have even gotten to building salmon. The offending (as much as using C++11 can be consider "offending" ;) ) line occurs in the build of jellyfish 2.1.3.

sjackman commented 9 years ago

Yes, jellyfish also fails to build on Mountain Lion. There's a related StackOverflow question 24764478 with no answer.

rob-p commented 9 years ago

Interesting --- in that case the OP is trying to use clang++-3.4, which should support C++11 completely (assuming the paired libc++). I got a similar type of error (not finding something from the standard library) when trying to compile with clang (on linux, actually). The resolution in that case was to install libc++-dev --- apparently that package contained the appropriate headers. On OSX, are you trying to build with the built-in XCode version of clang, or with a different (tagged) version of clang (e.g. 3.4 / 3.5)?

sjackman commented 9 years ago

http://bot.brew.sh/job/Homebrew%20Science%20Pull%20Requests/1053/version=mountain_lion/console

==> cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/salmon/0.3.0 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev
-- The C compiler identification is AppleClang 5.1.0.5030040
-- The CXX compiler identification is AppleClang 5.1.0.5030040
==> Configuration
OS X: 10.8.5-x86_64
Xcode: 5.1.1
CLT: 5.1.0.0.1.1396320587
Clang: 5.1 build 503
rob-p commented 9 years ago

Despite that this isn't quite resolved, I'm going to close all salmon-related issues in this repo. Feel free to reopen there and reference this.