You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiling with make static leaves libquadmath still dynamically linked:
$ make static
$ otool -L lagrit
lagrit:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)
/usr/local/opt/gcc/lib/gcc/10/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
It appears that the Mac OS X linker is hard-wired to search dynamic libraries before static ones...Note that you cannot pass a file extension to the -l switch (-lantlr3c.a) to force the static library to be used. One way to force the static library to be used is to simply remove the dynamic version.
A way I have compiled static libraries in the past is to do something like:
Compiling with
make static
leaveslibquadmath
still dynamically linked:This is a problem for binary portability.
On macOS, static linking is really hard:
A way I have compiled static libraries in the past is to do something like:
That works but is not a good general solution. Currently trying to solve this in the branch mac-os-fix. https://github.com/lanl/LaGriT/tree/macos-static-fix
The text was updated successfully, but these errors were encountered: