#53839 closed defect (fixed)
nco +gcc6 failing to build with missing symbols from antlr
Reported by: | gnurser (George Nurser) | Owned by: | tenomoto (Takeshi Enomoto) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.4.1 |
Keywords: | Cc: | petrrr, gnw3 | |
Port: | nco |
Description (last modified by mf2k (Frank Schima))
Mac OS 10.12.3, Xcode 8.2.1 with gcc6 @6.3.0_2, openmpi-gcc6
nco build fails at linking stage with missing antlr symbols. First error:
:info:build libtool: link: /opt/local/bin/g++-mp-6 -pipe -Os -Wl,-headerpad_max_install_names -o ncap2 Invoke.o ncap2.o ncap2_utl.o ncap2_att.o sdo_utl.o sym_cls.o fmc_cls.o fmc_all_cls.o fmc_gsl_cls.o prs_cls.o NcapVar.o NcapVarVector.o ncoLexer.o ncoParser.o ncoTree.o nco_gsl.o -L../nco /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_nco/nco/work/nco-4.6.4/src/nco/.libs/libnco.a -L/opt/local/lib -lantlr -lhdf5_hl -lhdf5 -ldl -lz -lxerces-c -lvecLibFort -lexpat -lresolv -lintl -lm -lnetcdf -lcurl -lgsl -lgslcblas -ludunits2 -fopenmp :info:build Undefined symbols for architecture x86_64: :info:build "antlr::ASTFactory::create(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from: :info:build ncoParser::dmn_list_p() in ncoParser.o
Attachments (1)
Change History (8)
Changed 8 years ago by gnurser (George Nurser)
comment:1 Changed 8 years ago by mf2k (Frank Schima)
Cc: | takeshi@… removed |
---|---|
Keywords: | sierra removed |
Owner: | set to tenomoto |
Port: | +gcc6 removed |
Status: | new → assigned |
comment:2 Changed 8 years ago by mf2k (Frank Schima)
Description: | modified (diff) |
---|
comment:3 Changed 8 years ago by petrrr
Cc: | petrrr added |
---|
comment:4 Changed 7 years ago by gnw3
Cc: | gnw3 added |
---|
comment:5 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
This looks similar to #59674, only the other way around.
nco uses antlr's static library which has been built with the default compiler (clang) and linked with the default c++ standard library. On your macOS 10.12 system, that's libc++. But now you're building nco with g++, and g++ doesn't use libc++; it uses its own c++ standard library called libstdc++, which is not compatible with libc++. I don't see how using g++ here could ever work. (It could have worked back on OS X 10.8 and earlier, back when the default c++ standard library was libstdc++.) I don't know why the port gives you the option of attempting a build that will never work. It seems like the gcc variants should be removed from the port.
comment:6 Changed 5 years ago by tenomoto (Takeshi Enomoto)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:7 Changed 4 years ago by tenomoto (Takeshi Enomoto)
In 542b27150e6255a82b7e95bfc1f0bdecc03583b7/macports-ports (dar, master, py38-reproject, revert-6945-rust-1.43.0, wireshark):
main.log