tcpdump mailing list archives
problems building shared library on x86 Solaris 10
From: William Piras <william.piras () cacetech com>
Date: Thu, 09 Oct 2008 17:24:26 -0700
HiI'm trying to compile the last release of libpcap (0.9.8) on a i386 machine with Solaris 10 but it seems that there are some problems during the building of the shared library. When I launch "gmake shared" i receive an error from ld, see the attachment at the end of the mail for the error. I'm using gcc for compile an the native sun ld as linker. I don't want to change the ld with the gcc binutils because all the project have to be built with the native ld. Can you tell me if this is possible this and what can I do for build the shared library?
I attach some output. Thanks William Piras --- uname bash-3.00# uname -a SunOS unknown 5.10 Generic_120012-14 i86pc i386 i86pc --- gcc info bash-3.00# gcc -v Reading specs from /usr/local/lib/gcc/i386-pc-solaris2.10/3.4.6/specsConfigured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
Thread model: posix gcc version 3.4.6 --- ld info bash-3.00# ld -V ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.486 --- configure output bash-3.00# ./configure --prefix=/Documents/dep/temp2 checking build system type... i386-pc-solaris2.10 checking host system type... i386-pc-solaris2.10 checking target system type... i386-pc-solaris2.10 checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... 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 gcc version... 3 checking for inline... inline checking for __attribute__... yes checking for u_int8_t using gcc... no checking for u_int16_t using gcc... no checking for u_int32_t using gcc... no checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/sfw/bin/ggrep checking for egrep... /usr/sfw/bin/ggrep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking sys/ioccom.h usability... yes checking sys/ioccom.h presence... yes checking for sys/ioccom.h... yes checking sys/sockio.h usability... yes checking sys/sockio.h presence... yes checking for sys/sockio.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking paths.h usability... no checking paths.h presence... no checking for paths.h... no checking for net/pfvar.h... no checking for netinet/if_ether.h... no configure: Rechecking with some additional includes checking for netinet/if_ether.h... yes checking for ANSI ioctl definitions... yes checking for strerror... yes checking for strlcpy... yes checking for vsnprintf... yes checking for snprintf... yes checking for library containing gethostbyname... -lnsl checking for library containing socket... -lsocket checking for library containing putmsg... none required checking for ether_hostton... yes checking whether ether_hostton is declared... yes checking if --disable-protochain option is specified... enabled checking packet capture type... dlpi checking for getifaddrs... no checking whether we have SIOCGLIFCONF... yes checking if --enable-ipv6 option is specified... no checking whether to build optimizer debugging code... no checking whether to build parser debugging code... no checking sys/bufmod.h usability... yes checking sys/bufmod.h presence... yes checking for sys/bufmod.h... yes checking sys/dlpi_ext.h usability... no checking sys/dlpi_ext.h presence... no checking for sys/dlpi_ext.h... no checking for /dev/dlpi device... no checking for /dev/dlpi directory... no checking whether we have /proc/net/dev... no checking whether we have DAG API headers... no (/usr/local/include) checking whether we have Septel API... no checking for flex... flex checking for flex 2.4 or higher... yes checking for bison... bison checking for ranlib... ranlib checking if sockaddr struct has sa_len member... no checking if sockaddr_storage struct exists... yes checking if dl_hp_ppa_info_t struct has dl_module_id_1 member... no checking if unaligned accesses fail... no checking for a BSD-compatible install... ./install-sh -c configure: creating ./config.status config.status: creating Makefileconfig.status: WARNING: Makefile.in seems to ignore the --datarootdir setting
config.status: creating config.h -------------------------------------- gmake output
bash-3.00# gmakegcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./pcap-dlpi.c gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./fad-glifc.c sed -e 's/.*/static const char pcap_version_string[] = "libpcap version &";/' ./VERSION > version.h
gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./pcap.c gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./inet.c gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./gencode.cgcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./optimize.c gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./nametoaddr.c gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./etherent.c gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./savefile.c
rm -f bpf_filter.c ln -s ./bpf/net/bpf_filter.c bpf_filter.cgcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c bpf_filter.c gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./bpf_image.c gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c ./bpf_dump.c
flex -Ppcap_ -t scanner.l > $$.scanner.c; mv $$.scanner.c scanner.c bison -y -p pcap_ -d grammar.y mv y.tab.c grammar.c mv y.tab.h tokdefs.h gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c scanner.cgcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -Dyylval=pcap_lval -c grammar.c
sed -e 's/.*/char pcap_version[] = "&";/' ./VERSION > version.c gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c version.car rc libpcap.a pcap-dlpi.o fad-glifc.o pcap.o inet.o gencode.o optimize.o nametoaddr.o etherent.o savefile.o bpf_filter.o bpf_image.o bpf_dump.o scanner.o grammar.o version.o ranlib libpcap.a
-------------------- --- gmake shared output bash-3.00# gmake shared|more Text relocation remains referenced against symbol offset in file ctl 0x6b pcap-dlpi.o <unknown> 0x237 pcap-dlpi.o <unknown> 0x2cf pcap-dlpi.o <unknown> 0x31e pcap-dlpi.o <unknown> 0x36a pcap-dlpi.o <unknown> 0x3ce pcap-dlpi.o <unknown> 0x3f2 pcap-dlpi.o <unknown> 0x414 pcap-dlpi.o <unknown> 0x4b9 pcap-dlpi.o <unknown> 0x4c3 pcap-dlpi.o primbuf.1 0x4c8 pcap-dlpi.o primbuf.1 0x4d5 pcap-dlpi.o <unknown> 0x4e2 pcap-dlpi.o <unknown> 0x501 pcap-dlpi.o <unknown> 0x508 pcap-dlpi.o <unknown> 0x50f pcap-dlpi.o <unknown> 0x516 pcap-dlpi.o <unknown> 0x51d pcap-dlpi.o <unknown> 0x524 pcap-dlpi.o .... ... ... ... pcap_char 0x3e6 grammar.o pcap_char 0x3f0 grammar.o pcap_char 0x448 grammar.o ld: fatal: relocations remain against allocatable but non-writable sections collect2: ld returned 1 exit status gmake: *** [libpcap.so] Error 1 - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- problems building shared library on x86 Solaris 10 William Piras (Oct 09)