yahoo / UDPing

UDPing measures latency and packet loss across a link.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

impossible to compile

jvleur opened this issue · comments

I am unable to compile the code due to the following errors.
The server that I am using is running Debian 8.

cd src; make clean
make[1]: Entering directory '/home/jeroen/UDPing/src'
rm -f udping_client udping_server *.o
make[1]: Leaving directory '/home/jeroen/UDPing/src'
cd tests; make clean
make[1]: Entering directory '/home/jeroen/UDPing/tests'
rm -f .o test results.xml
make[1]: Leaving directory '/home/jeroen/UDPing/tests'
cd bin; rm -f udping_client udping_server
/bin/sh: 1: cd: can't cd to bin
cd src; make
make[1]: Entering directory '/home/jeroen/UDPing/src'
rm -f udping_client udping_server .o
g++ -I../include -I /home/y/include -g -c -o options.o options.cc
g++ -I../include -I /home/y/include -g -c -o delay.o delay.cc
g++ -I../include -I /home/y/include -g -c -o protocol.o protocol.cc
g++ -I../include -I /home/y/include -g -c -o stats.o stats.cc
g++ -I../include -I /home/y/include -g -c -o client.o client.cc
client.cc: In function ‘int main(int, char
)’:
client.cc:16:16: error: ‘getuid’ was not declared in this scope
if (getuid()) {
^
client.cc:51:17: error: ‘getuid’ was not declared in this scope
if (!getuid()) {
^
client.cc:55:35: error: ‘setgid’ was not declared in this scope
if (setgid(pwd->pw_gid)) {
^
client.cc:58:35: error: ‘setuid’ was not declared in this scope
if (setuid(pwd->pw_uid)) {
^
: recipe for target 'client.o' failed
make[1]: *** [client.o] Error 1
make[1]: Leaving directory '/home/jeroen/UDPing/src'
Makefile:9: recipe for target 'local' failed
make: *** [local] Error 2

Update:

g++ -I../include -I /home/y/include -g -c -o options.o options.cc
g++ -I../include -I /home/y/include -g -c -o delay.o delay.cc
g++ -I../include -I /home/y/include -g -c -o protocol.o protocol.cc
g++ -I../include -I /home/y/include -g -c -o stats.o stats.cc
g++ -I../include -I /home/y/include -g -c -o client.o client.cc
g++ -I../include -I /home/y/include -g -c -o clientsession.o clientsession.cc
g++ -I../include -I /home/y/include -g -c -o maclist.o maclist.cc
g++ -I../include -I /home/y/include -g -c -o ifinfo.o ifinfo.cc
g++ -L/home/y/lib64 -Wl,-rpath,/home/y/lib64 -lrt -lm -lymonsb2 -o udping_client client.o options.o delay.o protocol.o clientsession.o maclist.o ifinfo.o
/usr/bin/ld: cannot find -lymonsb2
collect2: error: ld returned 1 exit status
Makefile:10: recipe for target 'client' failed
make[1]: *** [client] Error 1
make[1]: Leaving directory '/home/jeroen/UDPing/src'
Makefile:9: recipe for target 'local' failed
make: *** [local] Error 2

I'm getting the same error on Centos 6

Fixed. I accidentally left an invalid dependency in there.