Skip to content

compiling error on gcc -m64 flag #2

@guyharris

Description

@guyharris

Converted from SourceForge issue 573005, submitted by nobody

I am running Solaris 9 with gcc version 3.1
at the Makfile change CCOPT to -O2 -m64.
If I delete the -m64 option, I could compile tcpdump
successfully.

the following error occurs:
print-esp.c: In function `esp_print_decodesecret':
print-esp.c:164: warning: cast to pointer from integer of
different size

....

gcc -O2 -m64 -DHAVE_CONFIG_H -I. -I../libpcap-0.7.1 -
I./missing -o tcpdump addrtoname.o gmt2local.o
machdep.o parsenfsfh.o print-802_11.o print-ah.o print-
arcnet.o print-arp.o print-ascii.o print-atalk.o print-atm.o
print-bgp.o print-bootp.o print-beep.o print-cdp.o print-
chdlc.o print-cip.o print-cnfp.o print-decnet.o print-
domain.o print-dvmrp.o print-egp.o print-esp.o print-ether.o
print-fddi.o print-gre.o print-hsrp.o print-icmp.o print-igmp.o
print-igrp.o print-ip.o print-ipcomp.o print-ipx.o print-
isakmp.o print-isoclns.o print-krb.o print-l2tp.o print-lane.o
print-lcp.o print-llc.o print-lwres.o print-msdp.o print-
mobile.o print-mpls.o print-nfs.o print-ntp.o print-null.o print-
ospf.o print-pim.o print-ppp.o print-pppoe.o print-pptp.o
print-radius.o print-raw.o print-rip.o print-rx.o print-sctp.o
print-sl.o print-sll.o print-snmp.o print-stp.o print-sunrpc.o
print-tcp.o print-telnet.o print-tftp.o print-timed.o print-
token.o print-udp.o print-vjc.o print-vrrp.o print-wb.o print-
zephyr.o setsignal.o tcpdump.o util.o version.o print-smb.o
smbutil.o ../libpcap-0.7.1/libpcap.a -lsocket -lnsl
ld: warning: file ../libpcap-0.7.1/libpcap.a(pcap-dlpi.o):
wrong ELF class: ELFCLASS32
Undefined first referenced
symbol in file
pcap_file tcpdump.o
pcap_geterr tcpdump.o
pcap_datalink tcpdump.o
pcap_open_offline tcpdump.o
pcap_dump tcpdump.o
pcap_dump_open tcpdump.o
pcap_stats tcpdump.o
pcap_version tcpdump.o
pcap_loop tcpdump.o
bpf_dump tcpdump.o
pcap_compile tcpdump.o
pcap_strerror util.o
pcap_lookupdev tcpdump.o
pcap_setfilter tcpdump.o
eproto_db addrtoname.o
pcap_next_etherent addrtoname.o
pcap_lookupnet tcpdump.o
pcap_close tcpdump.o
pcap_open_live tcpdump.o
pcap_snapshot tcpdump.o
pcap_dump_close tcpdump.o
ld: fatal: Symbol referencing errors. No output written to
tcpdump
collect2: ld returned 1 exit status

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions