Error compiling latest mosquitto source
Hi,
When I compile the latest mosquitto source, I received the error message /usr/bin/ld: cannot find -lmosquitto. I have copied below the compiler output. Can you please tell what is the error?
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c messages_mosq.c -o messages_mosq.o
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c net_mosq.c -o net_mosq.o
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c read_handle.c -o read_handle.o
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c read_handle_
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c send_mosq.c -o send_mosq.o
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c send_client_mosq.c -o send_client_mosq.o
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c util_mosq.c -o util_mosq.o
gcc -shared -Wl,-soname,
make -C cpp
make[1]: Entering directory `/home/
g++ -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c mosquittopp.cpp -o mosquittopp.o
g++ -shared -Wl,-soname,
=======
/usr/bin/ld: cannot find -lmosquitto
collect2: ld returned 1 exit status
make[1]: *** [libmosquittopp
=======
make[1]: Leaving directory `/home/
make: *** [all] Error 2
=======
venky@sybrant-
venky@sybrant-
venky@sybrant-
for d in lib client src man; do make -C ${d} clean; done
make[1]: Entering directory `/home/
rm -f *.o libmosquitto.so.0 libmosquitto.so
make -C cpp clean
make[2]: Entering directory `/home/
rm -f *.o libmosquittopp.so.0
make[2]: Leaving directory `/home/
make[1]: Leaving directory `/home/
make[1]: Entering directory `/home/
rm -f *.o mosquitto_pub mosquitto_sub
make[1]: Leaving directory `/home/
make[1]: Entering directory `/home/
rm -f *.o mosquitto
make[1]: Leaving directory `/home/
make[1]: Entering directory `/home/
make[1]: Nothing to be done for `clean'.
make[1]: Leaving directory `/home/
venky@sybrant-
for d in lib client src man; do make -C ${d}; done
make[1]: Entering directory `/home/
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c mosquitto.c -o mosquitto.o
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c logging_mosq.c -o logging_mosq.o
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c messages_mosq.c -o messages_mosq.o
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c net_mosq.c -o net_mosq.o
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c read_handle.c -o read_handle.o
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c read_handle_
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c send_mosq.c -o send_mosq.o
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c send_client_mosq.c -o send_client_mosq.o
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c util_mosq.c -o util_mosq.o
gcc -shared -Wl,-soname,
make -C cpp
make[2]: Entering directory `/home/
g++ -I. -I.. -ggdb -Wall -O2 -I../lib -fPIC -c mosquittopp.cpp -o mosquittopp.o
g++ -shared -Wl,-soname,
/usr/bin/ld: cannot find -lmosquitto
collect2: ld returned 1 exit status
make[2]: *** [libmosquittopp
make[2]: Leaving directory `/home/
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/
make[1]: Entering directory `/home/
cc -I../lib -Wall -ggdb -c -o pub_client.o pub_client.c
cc pub_client.o -o mosquitto_pub -L../lib -lmosquitto
/usr/bin/ld: cannot find -lmosquitto
collect2: ld returned 1 exit status
make[1]: *** [mosquitto_pub] Error 1
make[1]: Leaving directory `/home/
make[1]: Entering directory `/home/
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -DVERSION=
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -DVERSION=
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -DVERSION=
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -DVERSION=
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -DVERSION=
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -DVERSION=
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -DVERSION=
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -DVERSION=
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -DVERSION=
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -DVERSION=
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -DVERSION=
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -DVERSION=
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -DVERSION=
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -DVERSION=
gcc -I. -I.. -ggdb -Wall -O2 -I../lib -DVERSION=
gcc mosquitto.o bridge.o conf.o context.o database.o logging.o memory.o net.o raw_send.o raw_send_client.o raw_send_server.o read_handle.o read_handle_
/usr/bin/ld: cannot find -llibmosquitto
collect2: ld returned 1 exit status
make[1]: *** [mosquitto] Error 1
make[1]: Leaving directory `/home/
make[1]: Entering directory `/home/
docbook2man.pl mosquitto.8.xml
make[1]: docbook2man.pl: Command not found
make[1]: *** [mosquitto.8] Error 127
make[1]: Leaving directory `/home/
make: *** [mosquitto] Error 2
venky@sybrant-
venky@sybrant-
total 312
drwxr-xr-x 2 venky venky 4096 2010-07-28 11:59 cpp
-rwxr-xr-x 1 venky venky 73509 2010-07-28 11:59 libmosquitto.so.0
-rw-r--r-- 1 venky venky 2302 2010-07-26 06:44 logging_mosq.c
-rw-r--r-- 1 venky venky 1683 2010-07-26 06:44 logging_mosq.h
-rw-r--r-- 1 venky venky 8468 2010-07-28 11:59 logging_mosq.o
-rw-r--r-- 1 venky venky 1307 2010-07-26 06:44 Makefile
-rw-r--r-- 1 venky venky 4788 2010-07-26 06:44 messages_mosq.c
-rw-r--r-- 1 venky venky 2120 2010-07-26 06:44 messages_mosq.h
-rw-r--r-- 1 venky venky 10036 2010-07-28 11:59 messages_mosq.o
-rw-r--r-- 1 venky venky 13354 2010-07-26 06:44 mosquitto.c
-rw-r--r-- 1 venky venky 5043 2010-07-26 06:44 mosquitto.h
-rw-r--r-- 1 venky venky 21172 2010-07-28 11:59 mosquitto.o
-rw-r--r-- 1 venky venky 1999 2010-07-26 06:44 mqtt3_protocol.h
-rw-r--r-- 1 venky venky 5892 2010-07-26 06:44 net_mosq.c
-rw-r--r-- 1 venky venky 2695 2010-07-26 06:44 net_mosq.h
-rw-r--r-- 1 venky venky 15704 2010-07-28 11:59 net_mosq.o
drwxr-xr-x 2 venky venky 4096 2010-07-27 19:12 python
-rw-r--r-- 1 venky venky 6563 2010-07-26 06:44 read_handle.c
-rw-r--r-- 1 venky venky 3728 2010-07-26 06:44 read_handle_
-rw-r--r-- 1 venky venky 9068 2010-07-28 11:59 read_handle_
-rw-r--r-- 1 venky venky 2117 2010-07-26 06:44 read_handle.h
-rw-r--r-- 1 venky venky 13092 2010-07-28 11:59 read_handle.o
-rw-r--r-- 1 venky venky 5285 2010-07-26 06:44 send_client_mosq.c
-rw-r--r-- 1 venky venky 10428 2010-07-28 11:59 send_client_mosq.o
-rw-r--r-- 1 venky venky 5831 2010-07-26 06:44 send_mosq.c
-rw-r--r-- 1 venky venky 2536 2010-07-26 06:44 send_mosq.h
-rw-r--r-- 1 venky venky 11980 2010-07-28 11:59 send_mosq.o
-rw-r--r-- 1 venky venky 2721 2010-07-26 06:44 util_mosq.c
-rw-r--r-- 1 venky venky 1752 2010-07-26 06:44 util_mosq.h
-rw-r--r-- 1 venky venky 6688 2010-07-28 11:59 util_mosq.o
venky@sybrant-
for d in lib client src man; do make -C ${d} clean; done
make[1]: Entering directory `/home/
rm -f *.o libmosquitto.so.0 libmosquitto.so
make -C cpp clean
make[2]: Entering directory `/home/
rm -f *.o libmosquittopp.so.0
make[2]: Leaving directory `/home/
make[1]: Leaving directory `/home/
make[1]: Entering directory `/home/
rm -f *.o mosquitto_pub mosquitto_sub
make[1]: Leaving directory `/home/
make[1]: Entering directory `/home/
rm -f *.o mosquitto
make[1]: Leaving directory `/home/
make[1]: Entering directory `/home/
make[1]: Nothing to be done for `clean'.
make[1]: Leaving directory `/home/
venky@sybrant-
venky@sybrant-
for d in lib client src man; do make -C ${d} clean; done
make[1]: Entering directory `/home/
rm -f *.o libmosquitto.so.0 libmosquitto.so
make -C cpp clean
make[2]: Entering directory `/home/
rm -f *.o libmosquittopp.so.0
make[2]: Leaving directory `/home/
make[1]: Leaving directory `/home/
make[1]: Entering directory `/home/
rm -f *.o mosquitto_pub mosquitto_sub
make[1]: Leaving directory `/home/
make[1]: Entering directory `/home/
rm -f *.o mosquitto
make[1]: Leaving directory `/home/
make[1]: Entering directory `/home/
make[1]: Nothing to be done for `clean'.
make[1]: Leaving directory `/home/
venky@sybrant-
venky@sybrant-
/usr/bin/ld: cannot find -lmosquitto
collect2: ld returned 1 exit status
make[2]: *** [libmosquittopp
make[1]: *** [all] Error 2
/usr/bin/ld: cannot find -lmosquitto
collect2: ld returned 1 exit status
make[1]: *** [mosquitto_pub] Error 1
/usr/bin/ld: cannot find -lmosquitto
collect2: ld returned 1 exit status
make[1]: *** [mosquitto] Error 1
make[1]: docbook2man.pl: Command not found
make[1]: *** [mosquitto.8] Error 127
make: *** [mosquitto] Error 2
venky@sybrant-
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- mosquitto Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Venkates Velayutham
- Solved:
- Last query:
- Last reply: