Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] unable to cross compile matter bridge for RPI 4 32bit #32661

Closed
mttrRDRSDX opened this issue Mar 21, 2024 · 1 comment
Closed

[BUG] unable to cross compile matter bridge for RPI 4 32bit #32661

mttrRDRSDX opened this issue Mar 21, 2024 · 1 comment
Labels
bug Something isn't working linux needs triage

Comments

@mttrRDRSDX
Copy link

Reproduction steps

Following steps were used
1. generate the sysroot from rpi to our local host

rsync -avz rf6@172.32.1.45:/lib .
rsync -avz rf6@172.32.1.45:/usr/lib usr
rsync -avz rf6@172.32.1.45:/usr/include usr

2. fix the symlinks
ln -s usr/lib lib

3. run the commands to compile and build

PKG_CONFIG_PATH=/home/rf6et/Desktop/saransh_mttr/32bitsysroot/lib/arm-linux-gnueabihf/pkgconfig/ gn gen --args='target_cpu="arm" target_os="linux" sysroot="/home/rf6et/Desktop/saransh_mttr/32bitsysroot" system_libdir="/home/rf6et/Desktop/saransh_mttr/32bitsysroot/lib/arm-linux-gnueabihf" chip_crypto="mbedtls" is_clang=true' out/rpiARMf

4. run ninja

ninja -C out/rpiARMf/

error:
FAILED: address-resolve-tool address-resolve-tool.map
clang++ --target=armv7-linux-gnueabihf -O0 -fPIC -Werror -Wl,--fatal-warnings -Wl,-z,defs -fdiagnostics-color --sysroot=/home/rf6et/Desktop/saransh_mttr/32bitsysroot -Wl,--gc-sections -pie -L/home/rf6et/Desktop/saransh_mttr/32bitsysroot/usr/lib/arm-linux-gnueabihf -Wl,-Map,./address-resolve-tool.map -Wl,--cref @./address-resolve-tool.rsp -o ./address-resolve-tool
ld.lld: error: undefined symbol: __libc_do_syscall

referenced by pthread_join_common.c:73
pthread_join_common.o:(__pthread_clockjoin_ex) in archive /home/rf6et/Desktop/saransh_mttr/32bitsysroot/usr/lib/arm-linux-gnueabihf/libpthread.a
referenced by pthread_join_common.c:145
pthread_join_common.o:(__pthread_clockjoin_ex) in archive /home/rf6et/Desktop/saransh_mttr/32bitsysroot/usr/lib/arm-linux-gnueabihf/libpthread.a
referenced by futex-internal.h:364 (../sysdeps/nptl/futex-internal.h:364)
pthread_once.o:(clear_once_control) in archive /home/rf6et/Desktop/saransh_mttr/32bitsysroot/usr/lib/arm-linux-gnueabihf/libpthread.a
referenced 101 more times

ld.lld: error: undefined symbol: __pointer_chk_guard_local

referenced by unwind.c:72
unwind.o:(unwind_stop) in archive /home/rf6et/Desktop/saransh_mttr/32bitsysroot/usr/lib/arm-linux-gnueabihf/libpthread.a

ld.lld: error: undefined symbol: __dladdr

referenced by dladdr.o:(.text+0x0) in archive /home/rf6et/Desktop/saransh_mttr/32bitsysroot/usr/lib/arm-linux-gnueabihf/libdl.a

ld.lld: error: undefined symbol: _dl_stack_flags

referenced by pthread_create.c:688
pthread_create.o:(__pthread_create_2_1) in archive /home/rf6et/Desktop/saransh_mttr/32bitsysroot/usr/lib/arm-linux-gnueabihf/libpthread.a
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

5. info about symlink of pthread
ls -l usr/lib/arm-linux-gnueabihf/libpthread.so
lrwxrwxrwx 1 rf6et rf6et 41 Mar 21 10:32 usr/lib/arm-linux-gnueabihf/libpthread.so -> ./lib/arm-linux-gnueabihf/libpthread.so.0

6. ARCH OF THE RPI from which sysroot was buit

rf6@ubuntu:$ uname -m
armv7l
rf6@ubuntu:
$ uname -a
Linux ubuntu 5.4.0-1069-raspi #79-Ubuntu SMP PREEMPT Thu Aug 18 18:18:46 UTC 2022 armv7l armv7l armv7l GNU/Linux

Bug prevalence

always

GitHub hash of the SDK that was being used

Platform

raspi

Platform Version(s)

No response

Anything else?

No response

@mttrRDRSDX mttrRDRSDX added bug Something isn't working needs triage labels Mar 21, 2024
@github-actions github-actions bot added the linux label Mar 21, 2024
@mttrRDRSDX
Copy link
Author

symlinks issue , FIXED NOW

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linux needs triage
Projects
None yet
Development

No branches or pull requests

1 participant