tcpdump mailing list archives
Re: Libpcap 1.3.0 not building on OpenBSD 5.2 sparc64
From: Kaya Saman <kayasaman () gmail com>
Date: Mon, 10 Dec 2012 22:56:45 +0000
On 12/10/2012 07:58 PM, Guy Harris wrote:
On Dec 10, 2012, at 9:50 AM, Kaya Saman <kayasaman () gmail com> wrote:I'm trying to build libpcap 1.3.0 on my Sun Fire V210 running OpenBSD 5.2 however, I keep getting errors?? The configuration script doesn't come up with anything claiming to be an errorThat's because there isn't anything on the system that would inherently prevent it from building.however, if I run 'make' afterwards I get this: # make VER=`cat ./VERSION`; MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' ./VERSION`; gcc -shared -Wl,-soname,libpcap.so.$MAJOR_VER -o libpcap.so.$VER pcap-bpf.o fad-getad.o pcap.o inet.o gencode.o optimize.o nametoaddr.o etherent.o savefile.o sf-pcap.o sf-pcap-ng.o pcap-common.o bpf_image.o bpf_dump.o scanner.o grammar.o bpf_filter.o version.o scanner.o(.text+0x3b8): In function `pcap__load_buffer_state': /home/libpcap-1.3.0/scanner.c:4207: relocation truncated to fit: R_SPARC_GOT13 yy_n_charsThat's probably because it needs to be compiled with -fPIC rather than -fpic - offsets in SPARC instructions are, I think, shorter than in at least some other instruction sets, so if the global offset table is too large (which it apparently is, perhaps due to the Flex-generated scanner, given that the complaints from the linker are about it), the compiler might need to generate instructions that synthesize larger offsets than will fit in the 13-bit offset field.Would anyone be able to give me a hand to build it into my system?Edit the Makefile and replace all occurrences of "-fpic" with "-fPIC", do "make clean", and then try doing "make" again. I'll fix the configure script by adding OpenBSD to the list of platforms where 64-bit SPARC requires -fPIC.
Many thanks Guy, this worked fine :-)I just hope it's installed properly; though the installation of Snort and Daq went perfectly so will just need to test more.
Regards, Kaya _______________________________________________ tcpdump-workers mailing list tcpdump-workers () lists tcpdump org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Current thread:
- Libpcap 1.3.0 not building on OpenBSD 5.2 sparc64 Kaya Saman (Dec 10)
- Re: Libpcap 1.3.0 not building on OpenBSD 5.2 sparc64 Guy Harris (Dec 10)
- Re: Libpcap 1.3.0 not building on OpenBSD 5.2 sparc64 Kaya Saman (Dec 10)
- Re: Libpcap 1.3.0 not building on OpenBSD 5.2 sparc64 Guy Harris (Dec 10)