termux / x11-packages

A set of packages using X11 Windows System.
Other
553 stars 144 forks source link

undefined reference to lzma with webkit2gtk #267

Closed Ludea closed 3 years ago

Ludea commented 3 years ago

Problem description

When building a rust project with webkit2gtk, I get note: /data/data/com.termux/files/usr/bin/ld: /system/lib64/libunwindstack.so: undefined reference toCrc64GenerateTable'` and with lzma function too.

Steps to reproduce

clone webkit and build it on device.

Expected behavior

Sucessfull build

System information

Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.org/packages/ stable main
# game-repo (sources.list.d/game.list)
deb https://grimler.se/game-packages-24 games stable
# science-repo (sources.list.d/science.list)
deb https://grimler.se/science-packages-24 science stable
# root-repo (sources.list.d/root.list)
deb https://grimler.se/termux-root-packages-24 root stable
# x11-repo (sources.list.d/x11.list)
deb https://ipfs.io/ipns/k51qzi5uqu5dgu3homski160l4t4bmp52vb6dbgxb5bda90rewnwg64wnkwxj4 x11 main
Updatable packages:
All packages up to date
Android version:
10
Kernel build information:
Linux localhost 4.19.81-perf+ termux/x11-packages#1 SMP PREEMPT Mon Dec 21 22:45:36 CST 2020 aarch64 Android
Device manufacturer:
OnePlus
Device model:
AC2003
ghost commented 3 years ago

Nothing related to x11 packages or webkit2gtk. Something either injected system libraries into linking path.

Make sure you don't have LD_LIBRARY_PATH set and your build scripts do not involve libs from /system/lib(64).

Ludea commented 3 years ago

With unset LD_LIBRARY_PATH still have issue

Ludea commented 3 years ago

I have to link only $TERMUX_PREFIX lib ? If I link /system/lib64/liblzma.so I get library "libGL.so" not found whereas I link /system/lib64/libOpenSLES.so

leap0x7b commented 3 years ago

Make sure you don't have LD_LIBRARY_PATH set and your build scripts do not involve libs from /system/lib(64).

This might be related to termux/termux-packages#10159

ghost commented 3 years ago

@leapofazzam123 Nope, that's due to Android's private variant of libOpenSLES.so.

For successful linking, a variant from NDK sysroot should be used instead.

liblzma.so inside /system/lib64 is a p7zip library whereas liblzma.so from $PREFIX/lib is a part of XZ project. They are entirely different and cannot be used as drop-in replacement for each other.