Add new comment

Building, shipping libraw on macos Big Sur

Hi,

a while ago I updated to macos Big Sur. So I wanted to update libraw on macos and pulled new sources from the github repository. Running './configure' and 'make' did not yield the expected results from earlier builds on my mac, however.

Earlier 'make' created a static library that could be linked static to code. Now, the library seems to be scattered into a static part and a dynamic library (shared object). I do not really understand why this is the case. It took me a while to figure out a simple make created the files in a hidden folder '.libs' under 'lib'. So I tried to link the static libraries from here. But running the application it complains not to have found a share library counterpart, that is not found at the location '/usr/local/lib/...'.

Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/tbauer/git/ArgusPro/dll/libDSPJNative.dylib: dlopen(/Users/tbauer/git/ArgusPro/dll/libDSPJNative.dylib, 1): Library not loaded: /usr/local/lib/libraw.20.dylib

(Note: This is an exception from a Java app, that uses libraw under hood, linked statically to a native dylib).

The bad side with this construction however is, that any fat binary on the mac, that shall be shipped must follow a consistent folder structure that is completely signed by the developer. So, it is not possible to ship separate libraries, that have to be copied somewhere else in the operating file system (which means they will not be signed at their location.

Questions:

How can I obtain a single static library from make?
How to avoid, the static library is split into parts, that are missing a library from a hard coded system folder outside of the signed application bunde?

Thank you in advance!

Thilo

Forums: