LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-25-2012, 01:27 AM   #1
gertyes
LQ Newbie
 
Registered: Jan 2012
Location: Pretoria, S.A.
Distribution: Kubuntu 11.10
Posts: 7

Rep: Reputation: Disabled
shared libraries


Good day all,

I'm new to linux and need to install a program called voiphopper on the latest Kubuntu OS. I read the installation documentation and the following are requirements:
libpcap; c compiler; Linux OS

The installation process goes as follows:
tar xvfz voiphopper-x.xxx
./configure
make
make install

I made sure that all requirements are met and I started with the installation. ./configure worked fine but when I ran sudo make, I got the following error:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking whether gcc and cc understand -c and -o together... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: executing depfiles commands
gert@gert:~/Documents/Linux/voiphopper-2.01$ make
Making all in src
make[1]: Entering directory `/home/gert/Documents/Linux/voiphopper-2.01/src'
gcc -lpthread -lpcap -g -g -O2 -o voiphopper voiphopper-main.o voiphopper-dhcpconfig.o voiphopper-buildmsg.o voiphopper-cache.o voiphopper-udpipgen.o voiphopper-peekfd.o voiphopper-dhcpclient.o voiphopper-arp.o voiphopper-signals.o voiphopper-mac.o voiphopper-netinfo.o voiphopper-voiphop.o voiphopper-asl.o voiphopper-ass.o voiphopper-lldp.o
voiphopper-main.o: In function `main':
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:474: undefined reference to `pcap_findalldevs'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:712: undefined reference to `pthread_create'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:1170: undefined reference to `pcap_lookupnet'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:944: undefined reference to `pcap_lookupnet'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:951: undefined reference to `pcap_open_live'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:957: undefined reference to `pcap_datalink'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:962: undefined reference to `pcap_compile'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:968: undefined reference to `pcap_setfilter'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:986: undefined reference to `pcap_next_ex'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:990: undefined reference to `pcap_next_ex'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:1011: undefined reference to `pcap_next_ex'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:1027: undefined reference to `pcap_freecode'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:1028: undefined reference to `pcap_close'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:1036: undefined reference to `pcap_lookupnet'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:740: undefined reference to `pcap_lookupnet'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:750: undefined reference to `pcap_open_live'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:756: undefined reference to `pcap_datalink'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:761: undefined reference to `pcap_compile'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:767: undefined reference to `pcap_setfilter'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:776: undefined reference to `pcap_next_ex'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:786: undefined reference to `pcap_freecode'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:787: undefined reference to `pcap_close'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:794: undefined reference to `pcap_lookupnet'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:963: undefined reference to `pcap_geterr'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:768: undefined reference to `pcap_geterr'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:762: undefined reference to `pcap_geterr'
/home/gert/Documents/Linux/voiphopper-2.01/src/main.c:729: undefined reference to `pcap_lookupdev'
voiphopper-voiphop.o: In function `create_cdp_pcap':
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:427: undefined reference to `pcap_lookupnet'
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:436: undefined reference to `pcap_open_live'
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:442: undefined reference to `pcap_datalink'
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:447: undefined reference to `pcap_compile'
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:453: undefined reference to `pcap_setfilter'
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:418: undefined reference to `pcap_lookupdev'
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:448: undefined reference to `pcap_geterr'
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:454: undefined reference to `pcap_geterr'
voiphopper-voiphop.o: In function `cdp_mode':
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:818: undefined reference to `pcap_next_ex'
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:827: undefined reference to `pcap_freecode'
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:828: undefined reference to `pcap_close'
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:867: undefined reference to `pcap_next_ex'
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:871: undefined reference to `pcap_next_ex'
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:890: undefined reference to `pcap_next_ex'
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:904: undefined reference to `pcap_freecode'
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:905: undefined reference to `pcap_close'
/home/gert/Documents/Linux/voiphopper-2.01/src/voiphop.c:918: undefined reference to `pthread_create'
voiphopper-asl.o: In function `ctrl_c':
/home/gert/Documents/Linux/voiphopper-2.01/src/asl.c:57: undefined reference to `pcap_breakloop'
/home/gert/Documents/Linux/voiphopper-2.01/src/asl.c:58: undefined reference to `pcap_close'
voiphopper-ass.o: In function `sniff_arp_new':
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:126: undefined reference to `pcap_lookupnet'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:135: undefined reference to `pcap_open_live'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:141: undefined reference to `pcap_datalink'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:146: undefined reference to `pcap_compile'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:152: undefined reference to `pcap_setfilter'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:160: undefined reference to `pcap_next_ex'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:153: undefined reference to `pcap_geterr'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:147: undefined reference to `pcap_geterr'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:115: undefined reference to `pcap_lookupdev'
voiphopper-ass.o: In function `cancelthreads':
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:795: undefined reference to `pthread_cancel'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:785: undefined reference to `pthread_cancel'
voiphopper-ass.o: In function `vlan_hop_cdplldp':
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:687: undefined reference to `pcap_lookupnet'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:755: undefined reference to `pthread_create'
voiphopper-ass.o: In function `sniffer_main':
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:231: undefined reference to `pcap_lookupnet'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:241: undefined reference to `pcap_open_live'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:247: undefined reference to `pcap_datalink'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:252: undefined reference to `pcap_compile'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:258: undefined reference to `pcap_setfilter'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:266: undefined reference to `pcap_next_ex'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:259: undefined reference to `pcap_geterr'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:253: undefined reference to `pcap_geterr'
/home/gert/Documents/Linux/voiphopper-2.01/src/ass.c:220: undefined reference to `pcap_lookupdev'
voiphopper-lldp.o: In function `create_lldp_pcap':
/home/gert/Documents/Linux/voiphopper-2.01/src/lldp.c:990: undefined reference to `pcap_lookupnet'
/home/gert/Documents/Linux/voiphopper-2.01/src/lldp.c:999: undefined reference to `pcap_open_live'
/home/gert/Documents/Linux/voiphopper-2.01/src/lldp.c:1004: undefined reference to `pcap_datalink'
/home/gert/Documents/Linux/voiphopper-2.01/src/lldp.c:1009: undefined reference to `pcap_compile'
/home/gert/Documents/Linux/voiphopper-2.01/src/lldp.c:1015: undefined reference to `pcap_setfilter'
/home/gert/Documents/Linux/voiphopper-2.01/src/lldp.c:981: undefined reference to `pcap_lookupdev'
/home/gert/Documents/Linux/voiphopper-2.01/src/lldp.c:1010: undefined reference to `pcap_geterr'
/home/gert/Documents/Linux/voiphopper-2.01/src/lldp.c:1016: undefined reference to `pcap_geterr'
voiphopper-lldp.o: In function `spoof_lldp_loop':
/home/gert/Documents/Linux/voiphopper-2.01/src/lldp.c:839: undefined reference to `pcap_next_ex'
/home/gert/Documents/Linux/voiphopper-2.01/src/lldp.c:845: undefined reference to `pcap_next_ex'
/home/gert/Documents/Linux/voiphopper-2.01/src/lldp.c:871: undefined reference to `pcap_next_ex'
/home/gert/Documents/Linux/voiphopper-2.01/src/lldp.c:877: undefined reference to `pcap_next_ex'
/home/gert/Documents/Linux/voiphopper-2.01/src/lldp.c:892: undefined reference to `pcap_freecode'
/home/gert/Documents/Linux/voiphopper-2.01/src/lldp.c:893: undefined reference to `pcap_close'
/home/gert/Documents/Linux/voiphopper-2.01/src/lldp.c:904: undefined reference to `pcap_lookupnet'
collect2: ld returned 1 exit status
make[1]: *** [voiphopper] Error 1
make[1]: Leaving directory `/home/gert/Documents/Linux/voiphopper-2.01/src'
make: *** [all-recursive] Error 1


I read about shared libraries and stuff, but don't know about it.

Can someone please help me to solve this problem.

Thank you,

Gert.
 
Old 01-25-2012, 01:34 AM   #2
rodrifra
Member
 
Registered: Mar 2007
Location: Spain
Distribution: Debian
Posts: 201

Rep: Reputation: 36
If you have installed libpcap the compilation is not finding it. I would try locating libpcap and linking it to /lib.
 
Old 01-25-2012, 01:41 AM   #3
gertyes
LQ Newbie
 
Registered: Jan 2012
Location: Pretoria, S.A.
Distribution: Kubuntu 11.10
Posts: 7

Original Poster
Rep: Reputation: Disabled
Hi rodrifra,

Thanks for the reply.

I can find libpcap but how do I link it to /lib ?

Gert.

Last edited by gertyes; 01-25-2012 at 01:46 AM.
 
Old 01-25-2012, 01:49 AM   #4
rodrifra
Member
 
Registered: Mar 2007
Location: Spain
Distribution: Debian
Posts: 201

Rep: Reputation: 36
ln -s /path/original.file /lib
 
Old 01-25-2012, 02:19 AM   #5
gertyes
LQ Newbie
 
Registered: Jan 2012
Location: Pretoria, S.A.
Distribution: Kubuntu 11.10
Posts: 7

Original Poster
Rep: Reputation: Disabled
Ok, now libpcap.a and libpcap.so.0.8.3 are both linked to /lib but the problem is still the same.
 
Old 01-25-2012, 02:40 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,625

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
By compilation, only the development files will work :

sudo apt-get install libpcap-dev libpcap0.8-dev

Provides /usr/lib/i386-linux-gnu/libpcap.so , etc.
http://packages.ubuntu.com/oneiric/i...8-dev/filelist

If your application cannot find libpcap.so in the new odd location,
a link may do ( to e.g. /usr/lib/ ).
Only libpcap.so is used at compilation.
 
Old 01-25-2012, 04:07 AM   #7
gertyes
LQ Newbie
 
Registered: Jan 2012
Location: Pretoria, S.A.
Distribution: Kubuntu 11.10
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks for the help so far.

I re-installed libpcap-dev and libpcap0.8-dev and check for all the files in http://packages.ubuntu.com/oneiric/i...8-dev/filelist and all are present.

In the voiphopper source code the pcap.h header file is included. I found this file in /usr/include/ and /usr/lib/include/ and /usr/include/pcap/ and various other locations. So the file is available on the system. Could it be that gcc cannot find this file or does gcc make use of the required functions from the libpcap.so library?

Oh, and the problem is still the same...
 
Old 01-25-2012, 04:15 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,625

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
Which Ubuntu ( Kubuntu ) version are you using ? ?


And which version of 'voiphopper' ?
 
Old 01-25-2012, 04:36 AM   #9
gertyes
LQ Newbie
 
Registered: Jan 2012
Location: Pretoria, S.A.
Distribution: Kubuntu 11.10
Posts: 7

Original Poster
Rep: Reputation: Disabled
Kubuntu 11.10
Ubuntu 11.10 oneiric and Voiphopper 2.01

Last edited by gertyes; 01-25-2012 at 04:38 AM.
 
Old 01-25-2012, 08:34 PM   #10
gertyes
LQ Newbie
 
Registered: Jan 2012
Location: Pretoria, S.A.
Distribution: Kubuntu 11.10
Posts: 7

Original Poster
Rep: Reputation: Disabled
Any new suggestions?
 
Old 01-26-2012, 01:27 AM   #11
rodrifra
Member
 
Registered: Mar 2007
Location: Spain
Distribution: Debian
Posts: 201

Rep: Reputation: 36
Try this solution.
 
Old 01-26-2012, 02:04 PM   #12
gertyes
LQ Newbie
 
Registered: Jan 2012
Location: Pretoria, S.A.
Distribution: Kubuntu 11.10
Posts: 7

Original Poster
Rep: Reputation: Disabled
Problem solved. Installed Ubuntu 11.04 LTS and it worked. Still can't figure out why it didn't want to compile on Ubuntu 11.10 even if all libraries were in place...
 
Old 01-29-2012, 03:12 PM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,625

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
Compiling voiphopper on (K)Ubuntu 11.10 :

1) sudo apt-get install g++-4.4

2) cd voiphopper-2.01/ && export CC=gcc-4.4 && ./configure
&& make : No errors.

The default compiler, /usr/bin/gcc , version 4.6 will do OK
for the c code of tomorrow. And some perfectly written code.
Older code / current code : Please use gcc-4.5 or gcc-4.4 .

..

Last edited by knudfl; 01-30-2012 at 09:09 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
honeyd: error while loading shared libraries: libdnet.1: cannot open shared object fi secbuddy Linux - Software 2 12-24-2011 02:01 PM
error while loading shared libraries: libhid.so.0: cannot open shared object file: No misungs Linux - Software 4 06-10-2009 12:05 PM
Urgent !!! rpm: error while loading shared libraries: libelf.so.1: cannot open shared tinaa Linux - Software 5 12-02-2008 03:19 PM
gxine: error while loading shared libraries: libmozjs.so: cannot open shared object.. khronosschoty Slackware 10 11-10-2008 07:33 PM
error while loading shared libraries: libdb-4.1.so: cannot open shared object file putquery8581 Linux - Software 1 10-01-2004 07:03 AM


All times are GMT -5. The time now is 03:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration