gjedeer / tuntox

Tunnel TCP connections over the Tox protocol

Home Page:https://gdr.name/tuntox/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build error

aix4c opened this issue · comments

commented

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

commented

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

https://github.com/gjedeer/tuntox/blob/master/BUILD.md

commented

/usr/bin/ld: cannot find -lc

hmm, even libc is missing on your system...

commented

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.

commented

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
commented

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

commented

If you're building static binaries, you need .a files not .so.