termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.34k stars 3.08k forks source link

addpkg(main/libraw): 0.21.3 #22211

Closed Biswa96 closed 1 week ago

Biswa96 commented 1 week ago

openmp is disabled because imagemagick also disabled it. Otherwise, the following runtime error is shown with imagemagick. CANNOT LINK EXECUTABLE "magick": cannot locate symbol "__kmpc_global_thread_num" referenced by "PREFIX/lib/libraw_r.so"

Biswa96 commented 1 week ago

Oh, I forgot to mention that the termux_step_pre_configure() function in libraw is required to workaround the following linker error.

ld.lld: error: non-exported symbol '__aarch64_ldadd8_acq_rel' in '/home/builder/.termux-build/_cache/android-r27c-api-24-v1/lib/clang/18/lib/linux/libclang_rt.builtins-aarch64-android.a(outline_atomic_ldadd8_4.S.o)' is referenced by DSO 'lib/.libs/libraw.so'
ld.lld: error: non-exported symbol '__aarch64_swp8_acq_rel' in '/home/builder/.termux-build/_cache/android-r27c-api-24-v1/lib/clang/18/lib/linux/libclang_rt.builtins-aarch64-android.a(outline_atomic_swp8_4.S.o)' is referenced by DSO 'lib/.libs/libraw.so'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:1031: bin/raw-identify] Error 1
twaik commented 1 week ago

I think you should put a reference to #8029 .

Biswa96 commented 1 week ago

The workaround was already provided in #8029 and fixed in 1b126e9572100f9c2f92903c26c51bf7ef56aac8 commit.

twaik commented 1 week ago

I know. I mean you should mention it in comment to let people know why you put this line of code there. It's not obvious thing.

Biswa96 commented 1 week ago

It seems that the workaround in that issue causes warning with libtool. It is explained here https://stackoverflow.com/a/8352756. I'll add the new workaround.