Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#60839 closed defect (fixed)

gnuradio @3.8.1.0_0 not building on 10.11 and older, also 10.13 fails

Reported by: snowflake (Dave Evans) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.6.99
Keywords: Cc:
Port: gnuradio

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Here is the error:

[ 84%] Linking CXX shared library libgnuradio-digital.dylib
cd /opt/local/var/macports/build/_Users_davidevans_macports_sources_github.com_macports_macports-ports_science_gnuradio/gnuradio/work/build/gr-digital/lib && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/gnuradio-digital.dir/link.txt --verbose=ON
/usr/bin/clang++ -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -O3 -DNDEBUG -arch x86_64 -mmacosx-version-min=10.11 -dynamiclib -Wl,-headerpad_max_install_names -Wl,-headerpad_max_install_names -compatibility_version 3.8.1 -current_version 3.8.1 -o libgnuradio-digital.3.8.1.0.dylib -install_name /opt/local/lib/libgnuradio-digital.3.8.1.dylib CMakeFiles/gnuradio-digital.dir/additive_scrambler_bb_impl.cc.o CMakeFiles/gnuradio-digital.dir/binary_slicer_fb_impl.cc.o CMakeFiles/gnuradio-digital.dir/burst_shaper_impl.cc.o CMakeFiles/gnuradio-digital.dir/chunks_to_symbols_impl.cc.o CMakeFiles/gnuradio-digital.dir/clock_recovery_mm_cc_impl.cc.o CMakeFiles/gnuradio-digital.dir/clock_recovery_mm_ff_impl.cc.o CMakeFiles/gnuradio-digital.dir/clock_tracking_loop.cc.o CMakeFiles/gnuradio-digital.dir/cma_equalizer_cc_impl.cc.o CMakeFiles/gnuradio-digital.dir/constellation.cc.o CMakeFiles/gnuradio-digital.dir/constellation_decoder_cb_impl.cc.o CMakeFiles/gnuradio-digital.dir/constellation_receiver_cb_impl.cc.o CMakeFiles/gnuradio-digital.dir/constellation_soft_decoder_cf_impl.cc.o CMakeFiles/gnuradio-digital.dir/corr_est_cc_impl.cc.o CMakeFiles/gnuradio-digital.dir/correlate_access_code_bb_impl.cc.o CMakeFiles/gnuradio-digital.dir/correlate_access_code_tag_bb_impl.cc.o CMakeFiles/gnuradio-digital.dir/correlate_access_code_tag_ff_impl.cc.o CMakeFiles/gnuradio-digital.dir/correlate_access_code_bb_ts_impl.cc.o CMakeFiles/gnuradio-digital.dir/correlate_access_code_ff_ts_impl.cc.o CMakeFiles/gnuradio-digital.dir/costas_loop_cc_impl.cc.o CMakeFiles/gnuradio-digital.dir/cpmmod_bc_impl.cc.o CMakeFiles/gnuradio-digital.dir/crc32.cc.o CMakeFiles/gnuradio-digital.dir/crc32_bb_impl.cc.o CMakeFiles/gnuradio-digital.dir/crc32_async_bb_impl.cc.o CMakeFiles/gnuradio-digital.dir/descrambler_bb_impl.cc.o CMakeFiles/gnuradio-digital.dir/diff_decoder_bb_impl.cc.o CMakeFiles/gnuradio-digital.dir/diff_encoder_bb_impl.cc.o CMakeFiles/gnuradio-digital.dir/diff_phasor_cc_impl.cc.o CMakeFiles/gnuradio-digital.dir/fll_band_edge_cc_impl.cc.o CMakeFiles/gnuradio-digital.dir/framer_sink_1_impl.cc.o CMakeFiles/gnuradio-digital.dir/glfsr.cc.o CMakeFiles/gnuradio-digital.dir/glfsr_source_b_impl.cc.o CMakeFiles/gnuradio-digital.dir/glfsr_source_f_impl.cc.o CMakeFiles/gnuradio-digital.dir/hdlc_deframer_bp_impl.cc.o CMakeFiles/gnuradio-digital.dir/hdlc_framer_pb_impl.cc.o CMakeFiles/gnuradio-digital.dir/header_buffer.cc.o CMakeFiles/gnuradio-digital.dir/header_payload_demux_impl.cc.o CMakeFiles/gnuradio-digital.dir/kurtotic_equalizer_cc_impl.cc.o CMakeFiles/gnuradio-digital.dir/lms_dd_equalizer_cc_impl.cc.o CMakeFiles/gnuradio-digital.dir/map_bb_impl.cc.o CMakeFiles/gnuradio-digital.dir/modulate_vector.cc.o CMakeFiles/gnuradio-digital.dir/mpsk_snr_est.cc.o CMakeFiles/gnuradio-digital.dir/mpsk_snr_est_cc_impl.cc.o CMakeFiles/gnuradio-digital.dir/msk_timing_recovery_cc_impl.cc.o CMakeFiles/gnuradio-digital.dir/ofdm_carrier_allocator_cvc_impl.cc.o CMakeFiles/gnuradio-digital.dir/ofdm_chanest_vcvc_impl.cc.o CMakeFiles/gnuradio-digital.dir/ofdm_cyclic_prefixer_impl.cc.o CMakeFiles/gnuradio-digital.dir/ofdm_equalizer_base.cc.o CMakeFiles/gnuradio-digital.dir/ofdm_equalizer_simpledfe.cc.o CMakeFiles/gnuradio-digital.dir/ofdm_equalizer_static.cc.o CMakeFiles/gnuradio-digital.dir/ofdm_frame_equalizer_vcvc_impl.cc.o CMakeFiles/gnuradio-digital.dir/ofdm_serializer_vcc_impl.cc.o CMakeFiles/gnuradio-digital.dir/ofdm_sync_sc_cfb_impl.cc.o CMakeFiles/gnuradio-digital.dir/header_format_base.cc.o CMakeFiles/gnuradio-digital.dir/header_format_default.cc.o CMakeFiles/gnuradio-digital.dir/header_format_counter.cc.o CMakeFiles/gnuradio-digital.dir/header_format_crc.cc.o CMakeFiles/gnuradio-digital.dir/header_format_ofdm.cc.o CMakeFiles/gnuradio-digital.dir/protocol_formatter_async_impl.cc.o CMakeFiles/gnuradio-digital.dir/protocol_formatter_bb_impl.cc.o CMakeFiles/gnuradio-digital.dir/protocol_parser_b_impl.cc.o CMakeFiles/gnuradio-digital.dir/packet_header_default.cc.o CMakeFiles/gnuradio-digital.dir/packet_header_ofdm.cc.o CMakeFiles/gnuradio-digital.dir/packet_headergenerator_bb_impl.cc.o CMakeFiles/gnuradio-digital.dir/packet_headerparser_b_impl.cc.o CMakeFiles/gnuradio-digital.dir/packet_sink_impl.cc.o CMakeFiles/gnuradio-digital.dir/pfb_clock_sync_ccf_impl.cc.o CMakeFiles/gnuradio-digital.dir/pfb_clock_sync_fff_impl.cc.o CMakeFiles/gnuradio-digital.dir/pn_correlator_cc_impl.cc.o CMakeFiles/gnuradio-digital.dir/probe_density_b_impl.cc.o CMakeFiles/gnuradio-digital.dir/probe_mpsk_snr_est_c_impl.cc.o CMakeFiles/gnuradio-digital.dir/scrambler_bb_impl.cc.o CMakeFiles/gnuradio-digital.dir/simple_correlator_impl.cc.o CMakeFiles/gnuradio-digital.dir/simple_framer_impl.cc.o CMakeFiles/gnuradio-digital.dir/interpolating_resampler.cc.o CMakeFiles/gnuradio-digital.dir/symbol_sync_cc_impl.cc.o CMakeFiles/gnuradio-digital.dir/symbol_sync_ff_impl.cc.o CMakeFiles/gnuradio-digital.dir/timing_error_detector.cc.o  -Wl,-rpath,/opt/local/lib ../../gr-analog/lib/libgnuradio-analog.3.8.1.0.dylib ../../gr-filter/lib/libgnuradio-filter.3.8.1.0.dylib ../../gr-fft/lib/libgnuradio-fft.3.8.1.0.dylib /opt/local/lib/libfftw3f.dylib /opt/local/lib/libfftw3f_threads.dylib ../../gr-blocks/lib/libgnuradio-blocks.3.8.1.0.dylib ../../gnuradio-runtime/lib/libgnuradio-runtime.3.8.1.0.dylib ../../gnuradio-runtime/lib/pmt/libgnuradio-pmt.3.8.1.0.dylib /opt/local/lib/libboost_program_options-mt.dylib /opt/local/lib/libboost_filesystem-mt.dylib /opt/local/lib/libboost_system-mt.dylib /opt/local/lib/libboost_regex-mt.dylib /opt/local/lib/libboost_thread-mt.dylib /opt/local/lib/libboost_chrono-mt.dylib /opt/local/lib/libboost_date_time-mt.dylib /opt/local/lib/libboost_atomic-mt.dylib /opt/local/lib/liblog4cpp.dylib /opt/local/lib/libmpirxx.dylib /opt/local/lib/libmpir.dylib /opt/local/lib/libvolk.2.3.dylib -lm 
Undefined symbols for architecture x86_64:
  "gr::digital::map_bb_impl::s_map_size", referenced from:
      gr::digital::map_bb_impl::set_map(std::__1::vector<int, std::__1::allocator<int> > const&) in map_bb_impl.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [gr-digital/lib/libgnuradio-digital.3.8.1.0.dylib] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_Users_davidevans_macports_sources_github.com_macports_macports-ports_science_gnuradio/gnuradio/work/build'
make[1]: *** [gr-digital/lib/CMakeFiles/gnuradio-digital.dir/all] Error 2

Attachments (1)

gnuradio-snowflake-1.log.bz2 (66.3 KB) - added by snowflake (Dave Evans) 4 years ago.
Built on 10.11.6, same error, but earlier in the file. 15/Jul/2020 19:50

Download all attachments as: .zip

Change History (23)

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

comment:2 Changed 4 years ago by michaelld (Michael Dickens)

Please do the following:

sudo port clean gnuradio
sudo port install gnuradio

and, if that dies again, post the whole build log here.

comment:3 Changed 4 years ago by michaelld (Michael Dickens)

I'll load up an older OSX and test shortly too.

Changed 4 years ago by snowflake (Dave Evans)

Built on 10.11.6, same error, but earlier in the file. 15/Jul/2020 19:50

comment:4 Changed 4 years ago by michaelld (Michael Dickens)

I'm updating MP on 10.11.6 ... will get to this issue soon-ish ...

comment:5 Changed 4 years ago by michaelld (Michael Dickens)

LOL I can't make it through 'configure' yet:

:info:configure -- Python checking for Gtk (GI) >= 3.10.8 - not found
[snip]
:info:configure -- Configuring gnuradio-companion support...
[snip]
:info:configure --   Dependency GTK_GI_FOUND = FALSE
[snip]
:info:configure CMake Error at cmake/Modules/GrComponent.cmake:75 (message):
:info:configure   user force-enabled gnuradio-companion but configuration checked failed
:info:configure Call Stack (most recent call first):
:info:configure   grc/CMakeLists.txt:95 (GR_REGISTER_COMPONENT)
:info:configure -- Configuring incomplete, errors occurred!

comment:6 Changed 4 years ago by michaelld (Michael Dickens)

hmmm ... next step in debugging:

>>> from gi.repository import Gtk
** (process:25437): WARNING **: 16:17:32.337: Failed to load shared library '@rpath/libgdk_pixbuf-2.0.0.dylib' referenced by the typelib: dlopen(@rpath/libgdk_pixbuf-2.0.0.dylib, 9): image not found

hmmm ... the library is /opt/local/lib/libgdk_pixbuf-2.0.0.dylib ... which is owned by gdk-pixbuf2 ... let me try reinstalling that...

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

yup that did the trick ... let me try the GR install again ... cruft happens I guess!

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

OK .. yup I see this too. Will debug.

comment:9 Changed 4 years ago by michaelld (Michael Dickens)

I think this is a compiler issue. Trying a blacklist of Clang <= 800 as a starting point. That's not too bad all things considered, as there are ports that will require a MacPorts' Clang already.

comment:10 Changed 4 years ago by michaelld (Michael Dickens)

OK ... not <= since that doesn't seem to work ... trying < 900 instead, which is looking more promising.

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

Resolution: fixed
Status: assignedclosed

In 27d08b688325cf1818181da636c04d32e061ea9e/macports-ports (master):

gnuradio: fix build on older OSX by blacklisting Xcode compilers < 900

Closes: #60839

comment:12 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

And you are certain that this "static constexpr" is a feature that is supposed to work in C++11? Because it would be surprising to me if a feature of C++11, which is supposed to be fully supported since clang 500, actually requires clang 900. Are you sure this is not a C++17 feature? clang 900 introduced C++17 support. I don't know modern C++, but a quick search turned up this stack overflow question, the answer to which seems to say that something changed about "static constexpr" in C++17. Maybe gnuradio is relying on that C++17 behavior.

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

Interesting. Let me look into that question & get back to you. That might be the case ...

comment:14 Changed 4 years ago by michaelld (Michael Dickens)

Either way my change should fix the issue ...

comment:15 Changed 4 years ago by michaelld (Michael Dickens)

hmm ... well I see this issue on 10.12 as well with Clang 900 ... hmmm ... let me see about fixing the base issue instead of finding the right compiler

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

worth noting the current clangs default to c++17 unless specified otherwise ...

comment:17 Changed 4 years ago by michaelld (Michael Dickens)

GR explicitly sets the C++ standard in CMake (to 2011).

I've worked out what's going on. I'll push a patch shortly.

comment:18 Changed 4 years ago by michaelld (Michael Dickens)

Done in efc66db516383605d891949fa1efeff8da5dd667/macports-ports

I'll also submit this upstream.

comment:19 Changed 4 years ago by ra1nb0w

I get

** (process:70772): WARNING **: 10:01:28.839: Failed to load  shared library 'libgdk_pixbuf-2.0.0.dylib' referenced by the typelib:
  dlopen(libgdk_pixbuf-2.0.0.dylib, 9): image not found

during the configure phase on a fresh macOS 10.14 install. using DYLD_FALLBACK_LIBRARY_PATH works but it is a weird work-around.

Seems something related to gobject-introspection.

Ideas?

comment:21 in reply to:  19 Changed 4 years ago by michaelld (Michael Dickens)

Replying to ra1nb0w:

I get

** (process:70772): WARNING **: 10:01:28.839: Failed to load  shared library 'libgdk_pixbuf-2.0.0.dylib' referenced by the typelib:
  dlopen(libgdk_pixbuf-2.0.0.dylib, 9): image not found

during the configure phase on a fresh macOS 10.14 install. using DYLD_FALLBACK_LIBRARY_PATH works but it is a weird work-around.

Seems something related to gobject-introspection.

Ideas?

@ra1nb0w : Guessing you need to reinstall gdk-pixbuf2 as noted here < https://trac.macports.org/ticket/60839#comment:6 > ...

comment:22 Changed 4 years ago by michaelld (Michael Dickens)

As the issue for this PR is fixed, let's please take the discussion to another ticket / elsewhere ... or, if this issue is still relevant then please reopen this ticket and provide a build log.

Note: See TracTickets for help on using tickets.