[Simh] Newbie has network compile problem

Mark Pizzolato mark at infocomm.com
Fri Mar 19 11:14:27 EST 2004


Hi Steve,

Since you mention libpcap 0.8.1, you've picked a recent version. 
However, it seems not to be being referenced appropriately in your
build.  This could be because it hasn't been installed (by doing the
following as root in the libpcap directory: ./configure; make
install), and/or because the makefile you're using isn't referencing
it appropriately.

Below is the top part of the latest makefile, which should have the
appropriate reference (Be careful that this mailer didn't wrap the
longer lines (i.e. starting with NETWORK_OPT).  Let me know if you
still have problems.

- Mark Pizzolato

# CC Command
#
# Note: -O2 is sometimes broken in GCC when setjump/longjump is being
# used. Try -O2 only with released simulators.
#
ifeq ($(WIN32),)
#Unix Environments
ifeq ($(OSTYPE),solaris)
OS_CCDEFS = -lsocket -lnsl -lpthread -D_GNU_SOURCE
endif
CC = gcc -O2 -g -lm $(OS_CCDEFS) -I .
ifeq ($(USE_NETWORK),)
else
NETWORK_OPT = -DUSE_NETWORK -lpcap -isystem /usr/local/include -L 
/usr/local/lib
endif
else
#Win32 Environments
LDFLAGS = -lm -lwsock32
CC = gcc -O0 -I.
EXE = .exe
ifeq ($(USE_NETWORK),)
else
NETWORK_OPT = -DUSE_NETWORK -lwpcap -lpacket
endif
endif




--- Steve Smith <ssmith94132 at yahoo.com> wrote:
> I didn't see anything on the newsgroups about this.
> I'm sure it's simple, but I'm not having any luck.
> Using "make USE_NETWORK=1". TIA.
> 
> 
> Linux version 2.4.18-3
> (bhcompile at stripples.devel.redhat.com) (gcc version
> 2.96
> 20000731 (Red Hat Linux 7.3 2.96-110))
> 
> libpcap 0.8.1
> 
> /tmp/cc3ffVSZ.o: In function `eth_open':
> /tmp/cc3ffVSZ.o(.text+0x4fa): undefined reference to
> `pcap_setnonblock'
> /tmp/cc3ffVSZ.o: In function `eth_filter':
> /tmp/cc3ffVSZ.o(.text+0xd8b): undefined reference to
> `pcap_setnonblock'
> /tmp/cc3ffVSZ.o: In function `eth_devices':
> /tmp/cc3ffVSZ.o(.text+0xdd3): undefined reference to
> `pcap_findalldevs'
> /tmp/cc3ffVSZ.o(.text+0xf01): undefined reference to
> `pcap_freealldevs'
> collect2: ld returned 1 exit status
> make: *** [BIN/pdp11] Error 1




More information about the Simh mailing list