Question

We are using Dell SUSE Enterprise. No choice.

SUSE doesn't have libpcap-devel or anything similar in the zypper repositories.

I've downloaded and installed libpcap from the GIT repository. libpcap requires both flex and bison to be compiled. flex version 2.5.35 is in the repo, as is bison.

However, I can't get any problem that uses libpcap-devel to compile. The autoconf script fails on attempts to link in libpcap.so:

configure:3633: $? = 1
configure:3636: checking whether we are using the GNU C++ compiler
configure:3665: g++ -c   conftest.cpp >&5
configure:3672: $? = 0
configure:3689: result: yes
configure:3698: checking whether g++ accepts -g
configure:3728: g++ -c -g  conftest.cpp >&5
configure:3735: $? = 0
configure:3836: result: yes
configure:3861: checking dependency style of g++
configure:3952: result: gcc3
configure:3981: checking for a BSD-compatible install
configure:4049: result: /usr/bin/install -c
configure:4067: checking for pcap_lookupdev in -lpcap
configure:4102: gcc -o conftest -g -O2   conftest.c -lpcap   >&5
/usr/local/lib/libpcap.so: undefined reference to `pcap_lex'
collect2: ld returned 1 exit status
configure:4109: $? = 1
configure: failed program was:

Running nm on the archive, I find:

$ nm /usr/local/lib/libpcap.so | grep pcap_lex
                 U pcap_lex

of course, pcap_lex is really a #define from yylex.

I'm not in over my head here. I'm trying to figure out why none of this stuff compiles properly on Suse. Does anybody have a clue?

Was it helpful?

Solution

Somehow, whatever you did to compile libpcap caused it not to build correctly.

Without:

  1. the config.log file from the libpcap directory;
  2. the Makefile from the libpcap directory;
  3. the output of the build in the libpcap directory;

it will be impossible to determine what that was, and thus it will be impossible to fix the process so that libpcap builds correctly. I have never seen a problem with libpcaps built on Linux, so I cannot determine what's happening here.

(If you supply this information, you will be helping not only yourself but all the people who have reported similar problems but have refused to respond to similar questions and thus have not supplied any of the information in question.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top