[MacPorts] #72023: swi-prolog @9.2.9: Patch idea for macOS 10.11.6
MacPorts
noreply at macports.org
Sat Feb 8 02:55:24 UTC 2025
#72023: swi-prolog @9.2.9: Patch idea for macOS 10.11.6
-------------------------+--------------------
Reporter: kogule | Owner: (none)
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.10.5
Keywords: | Port:
-------------------------+--------------------
Swi-prolog fails to build on old macOS such as:
{{{
:info:build : && /opt/local/bin/clang++-mp-16 -pipe -Os -DNDEBUG
-I/opt/local/include -stdlib=libc++ -O3 -DNDEBUG -arch x86_64 -mmacosx-
version-min=10.11 -bundle -Wl,-headerpad_max_install_names
-L/opt/local/lib -Wl,-headerpad_max_install_names -o
packages/cpp/test_cpp.so
packages/cpp/CMakeFiles/plugin_test_cpp.dir/test_cpp.cpp.o
-Wl,-rpath,/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_lang_swi-prolog/swi-
prolog/work/build/src src/libswipl.9.2.9.dylib && :
:info:build Undefined symbols for architecture x86_64:
:info:build "std::__1::__shared_mutex_base::lock_shared()", referenced
from:
:info:build _pl_atom_atom_find__2(unsigned long, int,
__PL_foreign_context*) in test_cpp.cpp.o
}}}
It is because the system libc++ is old and does not include newer classes.
To resolve this, let it link against clang's new libc++ instead of
system's. Attached patches do that and work fine with clang-16.
Unfortunately these patches embedded the prefix (`/opt/local`) and clang's
version (`llvm-16`).
I don't know what the macports proper way is in such situation but report
for your information.
--
Ticket URL: <https://trac.macports.org/ticket/72023>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list