build error
aix4c opened this issue · comments
GEN gitversion.h
CC log.o
CC client.o
CC mach.o
CC main.o
CC util.o
CC gitversion.o
gcc -o tuntox log.o client.o mach.o main.o util.o gitversion.o -lpthread -g -pthread -lm -static -lrt -ltoxcore -lrt -lsodium -lopus -lvpx -lm -lpthread
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lm
/usr/bin/ld: cannot find -lrt
/usr/bin/ld: cannot find -lrt
/usr/bin/ld: cannot find -lsodium
/usr/bin/ld: cannot find -lopus
/usr/bin/ld: cannot find -lvpx
/usr/bin/ld: cannot find -lm
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lc
collect2: ld errorlvel 1
make: *** [tuntox] Error 1
"ldconfig -p" output
libsodium.so.23 (libc6,x86-64) => /lib64/libsodium.so.23
libsodium.so.13 (libc6,x86-64) => /lib64/libsodium.so.13
libsodium.so (libc6,x86-64) => /lib64/libsodium.so
Please install libtoxcore with all its dependencies first
https://github.com/TokTok/c-toxcore/blob/master/INSTALL.md#building
and, in general, read the building docs
/usr/bin/ld: cannot find -lc
hmm, even libc is missing on your system...
toxcore already present.
ldconfig -p | grep toxcore
libtoxcore.so.2 (libc6,x86-64) => /lib64/libtoxcore.so.2
libtoxcore.so (libc6,x86-64) => /lib64/libtoxcore.so
Buld process will be complete with "make tuntox_nostatic" only.
Maybe your distro doesn't install static versions of libraries by default? I'd understand that -lopus is missing but -lc is the most basic library that almost every program is using.
➜ ~ find /lib /usr/lib -name libc.a
/usr/lib/x86_64-linux-gnu/libc.a
ldconfig -p | grep opus
libopus.so.0 (libc6,x86-64) => /lib64/libopus.so.0
libopus.so (libc6,x86-64) => /lib64/libopus.so
"libc" seem too present too.
libc.so.6 (libc6,x86-64, ABI ОС: Linux 2.6.32) => /lib64/libc.so.6
If you're building static binaries, you need .a files not .so.