Socklab make problem
Mehdi-F opened this issue · 3 comments
To whom it may concern,
I'm on Ubuntu 16.04 (Virtual Machine )
I used this code to install Readline (sudo apt-get install -y libreadline-dev)
and this one too (sudo apt-get install libreadline6 libreadline6-dev)
but everytime I do a make i get this :
cc -Wall -c -o tools.o tools.c
echo 'const char* socklab_version = "1.1.0";' > version.c
cc -Wall -c -o version.o version.c
cc -lreadline -lhistory socklab.o prim.o options.o tools.o tcp.o udp.o version.o -o socklab
socklab.o: In function socklab_completion': socklab.c:(.text+0x18e2): undefined reference to
rl_attempted_completion_over'
socklab.c:(.text+0x18fd): undefined reference to rl_completion_matches' socklab.o: In function
ihm':
socklab.c:(.text+0x1963): undefined reference to rl_attempted_completion_function' socklab.c:(.text+0x1976): undefined reference to
readline'
socklab.c:(.text+0x19d1): undefined reference to add_history' tools.o: In function
rl_gets':
tools.c:(.text+0x15): undefined reference to `readline'
collect2: error: ld returned 1 exit status
: recipe for target 'socklab' failed
make: *** [socklab] Error 1
Can you please help me solve this problem ? It's urgent !!
Thank you for understanding.
I can't easily test on Ubuntu 16.04. I just tried on Debian jessie that has the same version of readline (6.3) and it worked fine.
Did you start from a clean VM? Did you install build-essential? Which compiler are you using?
I downloaded an image on a website, i build the build-essential is already installed and using the Terminal directly to execute the commands
I finally got around to testing with ubuntu 16.04, and found the error comes from the old version of GCC that needs specific ordering of its arguments.
I have fixed the problem and released 1.1.1, thanks for reporting.