tcpdump mailing list archives

Re: libpcap on AIX 5.2


From: "Lowrie, Tom" <tlowrie () munis com>
Date: Thu, 29 Jul 2004 16:11:33 -0400

Alex,

Adding -lcfg along with -lodm solves my problem. Thanks for the
push in the right direction.

Next step will be to figure how to compile the libpcap source so
that these libraries are included.

Thanks again.

Tom


-----Original Message-----
From: tcpdump-workers-owner () lists tcpdump org
[mailto:tcpdump-workers-owner () lists tcpdump org]On Behalf Of alex
medvedev
Sent: Thursday, July 29, 2004 1:46 PM
To: tcpdump-workers () lists tcpdump org
Subject: Re: [tcpdump-workers] libpcap on AIX 5.2


hi,

not sure this will help, but try adding "-lodm" to your cc command.
the libpcap should have been already compiled with -lodm...

-alexm
13:37 29/07/2004

On Thu, 29 Jul 2004, Lowrie, Tom wrote:

Greetings,

I have a 43P Model 150 rs/6000 running AIX 5.2.0.0 ML 03, using C For AIX 6.0
with the latest (April 2004) PTF applied.

I installed from the source code libpcap 0.8.3 with no problems. I used:

 ./configure
  make
  make install

and noticed no problems. I then used the sample test from Tim Carstons document
with the following results:

Test code:

#include <stdio.h>
#include <pcap.h>

int main()
{
 char *dev, errbuf[PCAP_ERRBUF_SIZE];
 dev = pcap_lookupdev(errbuf);
 printf("Device is: %s\n", dev);
 return(0);
}

# cc -bnoquiet -lpcap -L/usr/local/lib -I/usr/local/include -o get_dev get_dev.c

(ld): halt 4
(ld): lrgpage 0
(ld): savename get_dev
(ld): filelist 5 1
(ld): i /lib/crt0.o
(ld): lib /usr/local/lib/libpcap.a
(ld): i get_dev.o
(ld): lib /usr/lib/libxlopt.a
(ld): lib /usr/lib/libc.a
LIBRARY: Shared object libc.a[shr.o]: 2526 symbols imported.
LIBRARY: Shared object libc.a[meth.o]: 2 symbols imported.
LIBRARY: Shared object libc.a[posix_aio.o]: 17 symbols imported.
LIBRARY: Shared object libc.a[aio.o]: 11 symbols imported.
LIBRARY: Shared object libc.a[pse.o]: 5 symbols imported.
LIBRARY: Shared object libc.a[dl.o]: 4 symbols imported.
LIBRARY: Shared object libc.a[pty.o]: 1 symbols imported.
FILELIST: Number of previously inserted files processed: 5
(ld): resolve
RESOLVE: 450 of 4316 symbols were kept.
(ld): addgl /usr/lib/glink.o
ADDGL: Glink code added for 57 symbols.
(ld): er full
ld: 0711-318 ERROR: Undefined symbols were found.
        The following symbols are in error:
 Symbol                    Inpndx  TY CL Source-File(Object-File) OR Import-File{Shared-object}
                              RLD: Address  Section  Rld-type Referencing Symbol
 ----------------------------------------------------------------------------------------------
 .genmajor                 [104]   ER PR ./pcap-bpf.c(/usr/local/lib/libpcap.a[pcap-bpf.o])
                                   000000a4 .text    R_RBR    [14]    <.bpf_load>
 .getminor                 [110]   ER PR ./pcap-bpf.c(/usr/local/lib/libpcap.a[pcap-bpf.o])
                                   00000100 .text    R_RBR    [14]    <.bpf_load>
 .genminor                 [112]   ER PR ./pcap-bpf.c(/usr/local/lib/libpcap.a[pcap-bpf.o])
                                   00000128 .text    R_RBR    [14]    <.bpf_load>
 .odm_unlock               [126]   ER PR ./pcap-bpf.c(/usr/local/lib/libpcap.a[pcap-bpf.o])
                                   00000480 .text    R_RBR    [16]    <.bpf_odmcleanup>
 odmerrno                  [52]    ER UA ./pcap-bpf.c(/usr/local/lib/libpcap.a[pcap-bpf.o])
                                   000013c8 .data    R_POS    [54]    <odmerrno>
 .odm_err_msg              [128]   ER PR ./pcap-bpf.c(/usr/local/lib/libpcap.a[pcap-bpf.o])
                                   0000049c .text    R_RBR    [16]    <.bpf_odmcleanup>
                                   00000518 .text    R_RBR    [16]    <.bpf_odmcleanup>
                                   000005d4 .text    R_RBR    [18]    <.bpf_odminit>
                                   0000065c .text    R_RBR    [18]    <.bpf_odminit>
 .odm_terminate            [130]   ER PR ./pcap-bpf.c(/usr/local/lib/libpcap.a[pcap-bpf.o])
                                   000004fc .text    R_RBR    [16]    <.bpf_odmcleanup>
 .odm_initialize           [132]   ER PR ./pcap-bpf.c(/usr/local/lib/libpcap.a[pcap-bpf.o])
                                   000005b4 .text    R_RBR    [18]    <.bpf_odminit>
 .odm_lock                 [134]   ER PR ./pcap-bpf.c(/usr/local/lib/libpcap.a[pcap-bpf.o])
                                   0000063c .text    R_RBR    [18]    <.bpf_odminit>
ER: The return code is 8.


Can someone point me in the direction I need to go to fix this?

Thanks,

Tom

-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.
-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.


Current thread: