Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#53187 closed defect (wontfix)

gr-osmosdr fails to build on OSX 10.7.5

Reported by: nr0q (Matthew Chambers) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.3.5
Keywords: lion Cc:
Port: gr-osmosdr

Description

$ sudo port install gr-osmosdr
--->  Computing dependencies for gr-osmosdr
--->  Fetching archive for gr-osmosdr
--->  Attempting to fetch gr-osmosdr-20160622_0+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+sdrplay+soapysdr+swig+uhd.darwin_11.x86_64.tbz2 from https://packages.macports.org/gr-osmosdr
--->  Attempting to fetch gr-osmosdr-20160622_0+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+sdrplay+soapysdr+swig+uhd.darwin_11.x86_64.tbz2 from http://sea.us.packages.macports.org/macports/packages/gr-osmosdr
--->  Attempting to fetch gr-osmosdr-20160622_0+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+sdrplay+soapysdr+swig+uhd.darwin_11.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/gr-osmosdr
--->  Fetching distfiles for gr-osmosdr
--->  Verifying checksums for gr-osmosdr
--->  Extracting gr-osmosdr
--->  Configuring gr-osmosdr
--->  Building gr-osmosdr
Error: org.macports.build for port gr-osmosdr returned: command execution failed
Please see the log file for port gr-osmosdr for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port gr-osmosdr failed

Attachments (1)

main.log (387.5 KB) - added by nr0q (Matthew Chambers) 8 years ago.
main.log file

Download all attachments as: .zip

Change History (14)

Changed 8 years ago by nr0q (Matthew Chambers)

Attachment: main.log added

main.log file

comment:1 Changed 8 years ago by kencu (Ken)

fails finding type_traits, which is a c++11 feature. So it appears that this will likely need to be in the cxx11 portgroup -- which complicates life a bit for you on 10.7 unless you've upgraded to LibcxxOnOlderSystems.

For a quick try-out, you might just try running a build line something like this:

sudo port -v install gr-osmosdr configure.cflags-append="-stdlib=libc++" configure.cxxflags-append="-stdlib=libc++" configure.ldflags-append="-stdlib=libc++" cxx_stdlib="libc++"

If I'm correct, this should install it as a one-off to see if this will work or not. If it does, you'll know LibcxxOnOlderSystems is worth doing.

comment:2 in reply to:  1 Changed 8 years ago by nr0q (Matthew Chambers)

Ran

sudo port -v install gr-osmosdr configure.cflags-append="-stdlib=libc++" configure.cxxflags-append="-stdlib=libc++" configure.ldflags-append="-stdlib=libc++" cxx_stdlib="libc++"

produced the following error

/opt/local/include/boost/thread/detail/move.hpp:31:10: fatal error: 'type_traits' file not found
#include <type_traits>
         ^
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build'
[ 36%] Built target osmosdr_swig_swig_2d0df
/usr/bin/make -f swig/CMakeFiles/pygen_swig_d21bb.dir/build.make swig/CMakeFiles/pygen_swig_d21bb.dir/depend
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build'
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/gr-osmosdr-ae686c462df73285fc13d3a0dc76f360a911500b /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/gr-osmosdr-ae686c462df73285fc13d3a0dc76f360a911500b/swig /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build/swig /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build/swig/CMakeFiles/pygen_swig_d21bb.dir/DependInfo.cmake --color=
Dependee "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build/swig/CMakeFiles/pygen_swig_d21bb.dir/DependInfo.cmake" is newer than depender "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build/swig/CMakeFiles/pygen_swig_d21bb.dir/depend.internal".
Dependee "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build/swig/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build/swig/CMakeFiles/pygen_swig_d21bb.dir/depend.internal".
Scanning dependencies of target pygen_swig_d21bb
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build'
/usr/bin/make -f swig/CMakeFiles/pygen_swig_d21bb.dir/build.make swig/CMakeFiles/pygen_swig_d21bb.dir/build
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build'
[ 38%] Generating osmosdr_swig.pyc
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build/swig && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build/python_compile_helper.py /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build/swig/osmosdr_swig.py /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build/swig/osmosdr_swig.pyc
1 error generated.
make[2]: *** [lib/CMakeFiles/gnuradio-osmosdr.dir/source_impl.cc.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build'
make[1]: *** [lib/CMakeFiles/gnuradio-osmosdr.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 40%] Generating osmosdr_swig.pyo
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build/swig && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 -O /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build/python_compile_helper.py /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build/swig/osmosdr_swig.py /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build/swig/osmosdr_swig.pyo
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build'
[ 42%] Built target pygen_swig_d21bb
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/work/build" && /usr/bin/make -j2 -w all VERBOSE=ON 
Exit code: 2
Error: org.macports.build for port gr-osmosdr returned: command execution failed
Warning: targets not executed for gr-osmosdr: org.macports.activate org.macports.build org.macports.destroot org.macports.install
Please see the log file for port gr-osmosdr for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gr-osmosdr/gr-osmosdr/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port gr-osmosdr failed

comment:3 Changed 8 years ago by kencu (Ken)

Ah, sorry to hear that didn't work. This looks like it might take some digging, then.

I don't want to keep guessing and wasting your time, but the first thing that comes to mind to me is that you might need to use one of the newer macports compilers as well, something like clang-3.7, adding configure.compiler=macports-clang-3.7 to the previous build line.

comment:4 Changed 8 years ago by kencu (Ken)

I thought I would boot up a 10.7.5 machine I have (which has been upgraded to LibcxxOnOlderSystems) and see what might be going on with this port for you, but there is still an active problem with qt4-mac installing on this system when using libc++ <https://trac.macports.org/ticket/50481> and at the moment, things get stuck at the qt4-mac installation.

comment:5 Changed 8 years ago by mf2k (Frank Schima)

Owner: set to michaelld
Status: newassigned

In the future, please Cc the port maintainers (port info --maintainers gr-osmosdr), if any.

comment:6 Changed 8 years ago by mf2k (Frank Schima)

Keywords: lion added

comment:7 Changed 8 years ago by michaelld (Michael Dickens)

gr-osmosdr does not use type_traits. This file is a legacy include within boost when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined. Maybe we need to define this variable to make sure the header is not included? Can you try that Ken? You shouldn't need C++11 support to build gr-osmosdr.

comment:8 in reply to:  7 ; Changed 8 years ago by kencu (Ken)

Replying to michaelld:

gr-osmosdr does not use type_traits. This file is a legacy include within boost when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined.

Ah, I see -- that's inside knowledge, to be sure. My 10.7 system is no longer stock, and has been upgraded to LibcxxOnOlderSystems, but I presume you mean something like this:

$ BOOST_NO_CXX11_RVALUE_REFERENCES=1 sudo port -v install gr-osmosdr

Perhaps the original poster might try that on his stock system...

Here's what I did to install it -- after:

  1. installing clang-3.7 and setting that as default compiler
  2. fixing the qt4-mac issue as per the comments on this ticket <https://trac.macports.org/ticket/50481>
  3. fixing the wxWidgets issue again <https://trac.macports.org/ticket/53040>

Overnight, gr-osmosdr did build through to completion without errors:

$ port -v installed gr-osmosdr
The following ports are currently installed:
  gr-osmosdr @20160622_0+airspy+bladeRF+docs+fcdproplus+hackrf+rtlsdr+sdrplay+soapysdr+swig+uhd (active) platform='darwin 11' archs='x86_64'

So that method does work to get it installed.

I should point out, however, that when I tried to actually run it, I got this:

$ /opt/local/bin/osmocom_siggen
Traceback (most recent call last):
  File "/opt/local/bin/osmocom_siggen", line 23, in <module>
    from gnuradio import gr
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/gr/__init__.py", line 56, in <module>
    log.add_console_appender(log_file, "gr::log %d :%p: %m%n")
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/gr/runtime_swig.py", line 6984, in add_console_appender
    return _runtime_swig.logger_add_console_appender(self, target, pattern)
RuntimeError: unterminated conversion specifier in 'gr::log %d :%p: %m%n' at index -1
$ /opt/local/bin/osmocom_siggen_nogui
Traceback (most recent call last):
  File "/opt/local/bin/osmocom_siggen_nogui", line 23, in <module>
    from gnuradio import gr
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/gr/__init__.py", line 56, in <module>
    log.add_console_appender(log_file, "gr::log %d :%p: %m%n")
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/gr/runtime_swig.py", line 6984, in add_console_appender
    return _runtime_swig.logger_add_console_appender(self, target, pattern)
RuntimeError: unterminated conversion specifier in 'gr::log %d :%p: %m%n' at index -1
$ /opt/local/bin/osmocom_fft
Traceback (most recent call last):
  File "/opt/local/bin/osmocom_fft", line 33, in <module>
    import osmosdr
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/osmosdr/__init__.py", line 26, in <module>
    from osmosdr_swig import *
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 17, in <module>
    _osmosdr_swig = swig_import_helper()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 16, in swig_import_helper
    return importlib.import_module('_osmosdr_swig')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named _osmosdr_swig

And I'm not sure what this means, if anything.

I hope this helps out the OP.

comment:9 Changed 8 years ago by nr0q (Matthew Chambers)

Ok, this helped enough to get it built. I mostly needed it as a dependency of another port (gqrx) so I'm not sure how much I'll actually be using this one. Thanks

I think we can say we have a working work-around. Not sure if you'd call it resolved or not though.

comment:10 in reply to:  8 Changed 8 years ago by nr0q (Matthew Chambers)

Replying to kencu:

I should point out, however, that when I tried to actually run it, I got this:

$ /opt/local/bin/osmocom_siggen
Traceback (most recent call last):
  File "/opt/local/bin/osmocom_siggen", line 23, in <module>
    from gnuradio import gr
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/gr/__init__.py", line 56, in <module>
    log.add_console_appender(log_file, "gr::log %d :%p: %m%n")
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/gr/runtime_swig.py", line 6984, in add_console_appender
    return _runtime_swig.logger_add_console_appender(self, target, pattern)
RuntimeError: unterminated conversion specifier in 'gr::log %d :%p: %m%n' at index -1
$ /opt/local/bin/osmocom_siggen_nogui
Traceback (most recent call last):
  File "/opt/local/bin/osmocom_siggen_nogui", line 23, in <module>
    from gnuradio import gr
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/gr/__init__.py", line 56, in <module>
    log.add_console_appender(log_file, "gr::log %d :%p: %m%n")
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/gr/runtime_swig.py", line 6984, in add_console_appender
    return _runtime_swig.logger_add_console_appender(self, target, pattern)
RuntimeError: unterminated conversion specifier in 'gr::log %d :%p: %m%n' at index -1
$ /opt/local/bin/osmocom_fft
Traceback (most recent call last):
  File "/opt/local/bin/osmocom_fft", line 33, in <module>
    import osmosdr
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/osmosdr/__init__.py", line 26, in <module>
    from osmosdr_swig import *
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 17, in <module>
    _osmosdr_swig = swig_import_helper()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 16, in swig_import_helper
    return importlib.import_module('_osmosdr_swig')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named _osmosdr_swig

I've gotten to the same point with the same error now

comment:11 Changed 8 years ago by michaelld (Michael Dickens)

Has duplicate #53236 .

Version 0, edited 8 years ago by michaelld (Michael Dickens) (next)

comment:12 Changed 8 years ago by michaelld (Michael Dickens)

Resolution: wontfix
Status: assignedclosed

comment:13 Changed 8 years ago by michaelld (Michael Dickens)

So there issue here is that CMake is adding in a compile flag "-std=gnu++11" for some reason. I can't even figure out where that's happening, and there's no good way to override it except by switching out compilers. If you install gr-osmosdr using "configure.compiler=macports-clang-3.4", then it works. I think the issue is that the default Xcode clang is version 4.2.1 (GCC 4.2.1 replica of sorts), which triggers the gnu++11 flag, while using the MacPorts clang 3.4 doesn't trigger the flag. Stupid. I'm guessing there's a way in CMake to disable this "feature"; I just don't know what it is. Thus, I think that there's really no good solution to this issue at this time.

Note: See TracTickets for help on using tickets.