[MacPorts] #59753: gildas @201911b: does not build for the right C++ stdlib (undefined symbols)
MacPorts
noreply at macports.org
Mon Nov 25 11:22:40 UTC 2019
#59753: gildas @201911b: does not build for the right C++ stdlib (undefined
symbols)
-------------------------+----------------------
Reporter: ryandesign | Owner: bardeau
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.6.2
Resolution: | Keywords:
Port: gildas |
-------------------------+----------------------
Comment (by bardeau):
Dear Ryan,
to have the complete picture, note that there was an attempt to automatize
the detection of libc++ location (file admin/Makefile.def):
{{{
ifeq ($(GAG_COMPILER_CXXKIND),clang++)
# Apple LLVM: we have to link against libc++. No way to find its correct
# location, assume default.
GAG_COMPILER_CXXLIBS = -lc++
else
# GNU: we have to link against libstdc++. Find its correct location (it
# can be at non standard place in case of custom compiler)
GAG_COMPILER_CXXLIBS = $(shell $(GAG_COMPILER_CXXEXE)
$(GAG_32BITS_SWITCH) -print-file-name=libstdc++.$(LIB_CXX_EXT))
endif
}}}
This test is useful for those who compile Gildas by themselves (i.e. not
using MacPorts) like developers or specific users. Unfortunately, as
quoted above, there is no good solution for the Apple compiler. In
particular, it accepts the option `--print-file-name=libc++.dylib` but
fails to returns the full path to its library. This is why the above test
finally ends by using the default `/usr/lib/libc++.dylib`.
For the reason explained just above, I would prefer a solution which works
with or without MacPorts. As the link is the responsibility of the Fortran
compiler, this solution should use portable options like -L, -l, or just a
full path like for the GNU case. In second choice, I can try to fix the
reinplaces to use properly the `@STDCXXLIB@` placeholder.
--
Ticket URL: <https://trac.macports.org/ticket/59753#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list