dora icon indicating copy to clipboard operation
dora copied to clipboard

make install gave undefined reference error for examples/cmake-dataflow project

Open bobd988 opened this issue 1 year ago • 2 comments

some errors for undefined reference to `pthread_getattr_np' in cmake example after make install. The target link needs to add a few libraries in examples/cmake-dataflow/CMakeLists.txt

bobd988 avatar Apr 21 '24 00:04 bobd988

Thanks for the PR! This seems to fail our CI job unfortunately with the following error:

/usr/bin/ld: cannot find -lpcap: No such file or directory

Given that the job works on main, I don't think that pcap should be needed.

I'm not familiar with CMake, maybe @XxChang can help?

phil-opp avatar Apr 21 '24 11:04 phil-opp

Indeed, it is unnecessary. It depends.

Please type readelf -a node_c_api | grep "pthread_getattr_np" on your terminal.

This is what show on my PC:

0000029c40b0  015e00000006 R_X86_64_GLOB_DAT 0000000000000000 pthread_getattr_np@GLIBC_2.32 + 0

It is said that pthread_getattr_np was defined in glibc.

Check what kind of libc you used in your PC with ldd node_c_api. These may be a different libc in your environment.

same problem with shm_open https://github.com/dora-rs/dora/issues/485

See this blog, why glibc remove libpthread

XxChang avatar Apr 21 '24 14:04 XxChang