homebrew-gnuradio
homebrew-gnuradio copied to clipboard
Build fails due to boost on osx 10.9
Not sure if this is a 10.9 issue or if something has crept into Boost. Gnuradio compiles all the way and then during link it complains:
Undefined symbols for architecture x86_64:
"boost::filesystem::path_traits::dispatch(boost::filesystem::directory_entry const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::codecvt<wchar_t, char, __mbstate_t> const&)", referenced from:
boost::filesystem::path::path<boost::filesystem::directory_entry>(boost::filesystem::directory_entry const&, boost::enable_if<boost::filesystem::path_traits::is_pathable<boost::decay<boost::filesystem::directory_entry>::type>, void>::type*)in gr_prefs.cc.o
ld: symbol(s) not found for architecture x86_64
My C++ is a little rusty and this kind of crazy template error is exactly why I hate C++ and Boost. I think it's saying boost::filesystem is missing something -- or not really missing but some aspect is not showing up in the link.
I just built boost today for this reason and I think it was using clang c++11 where gnuradio is using gcc42. Could there be some fighting between the stdc++ libraries? I don't know. I'll keep digging. I'll try forcing boost to build with gcc42 and do some googling for related problems ...
Looks like it fails not because of boost, but due to libc++ vs libstdc++ for std::codecvt and other std::* staff. There is a workaround discussed on MacPorts http://trac.macports.org/changeset/113092 to disable SWIG (which currently does not support C++11 code generation), but it has to be investigated.
Ok, here it is a workaround:
-
Unlink swig
brew unlink swig
-
Edit formula file /usr/Local/Library/Formula/gnuradio.rb find and comment out lines to disable swig and switch from gcc to clang:
# depends_on 'swig' # # Force compilation with gcc-4.2 # ENV['CC'] = '/usr/local/bin/gcc-4.2' # ENV['LD'] = '/usr/local/bin/gcc-4.2' # ENV['CXX'] = '/usr/local/bin/g++-4.2'
-
Run brew with -vd flags and tell ignore to warnings regarding libstdc++ vs libc++. Note that applications and recompile them on the next step.
-
Recompile failed libstdc++ libs like: jpeg libtiff pango atk
-
Now you can link swig back, but remember that there are still some issues: http://sourceforge.net/p/swig/bugs/1331/
There seems to be an update to Macports that supports 10.9, including GRC. See http://gnuradio.4.n7.nabble.com/Status-of-GNU-Radio-with-OSX-10-9-td44553.html. Any chance of a similar fix for homebrew?
same issue here. Any fixes?
same issue
ugggg Same issue after hours of work getting to this point :(