Hello,
I need dynamic libraries to load with Java/JNI.
On macOS Monterey 12.0.1 M1 I successfully compiled libwebp-1.2.4 using:
./configure --prefix=$HOME
make
sudo make install
This compiled for arm64 and also seemed to work fine loading it with a arm64 Java through JNA.
Now I also need it for x86-64 Mac.
I tried the following, hoping that it would set the correct things:
./configure --prefix=$HOME --host=x86-64-darwin
./configure --prefix=$HOME --build=x86-64-darwin --host=x86-64-darwin
The compiled libraries looked different (smaller file size), but trying to load it with a x86_64 Java (still on M1) I got an error about "mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')".
I also tried the following, but it didn't even compile:
arch -x86_64 ./configure --prefix=$HOME
arch -x86_64 make
Can anyone point me in the right direction?
Thanks