Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 697518 - net-analyzer/tcpdump-? with net-libs/libpcap-1.9.1 - pcap-config --libs hard-codes libdir
Summary: net-analyzer/tcpdump-? with net-libs/libpcap-1.9.1 - pcap-config --libs hard-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-11 21:46 UTC by Jack Rosenthal
Modified: 2019-12-05 19:08 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Rosenthal 2019-10-11 21:46:35 UTC
(related to BUG #692772)

pcap-config --libs outputs -L/usr/lib, which is not the correct include directory when cross compiling. This leaks its way into the Makefile generated for net-analyer/tcpdump-4.9.3, which causes compilation failure when cross compiling with lld (gold seems not to care).

(relevant error output):

armv7a-cros-linux-gnueabihf-clang -O2 -pipe  -march=armv8-a+crc -mtune=cortex-a57.cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard -g -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -DHAVE_CONFIG_H  -DHAVE_CAP_NG_H  -D_U_="__attribute__((unused))" -I.   -O2 -pipe  -march=armv8-a+crc -mtune=cortex-a57.cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard -g -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wl,-O2 -Wl,--as-needed  -o tcpdump setsignal.o tcpdump.o version.o addrtoname.o addrtostr.o af.o ascii_strcasecmp.o checksum.o cpack.o gmpls.o gmt2local.o in_cksum.o ipproto.o l2vpn.o machdep.o nlpid.o oui.o parsenfsfh.o print.o print-802_11.o print-802_15_4.o print-ah.o print-ahcp.o print-aodv.o print-aoe.o print-ap1394.o print-arcnet.o print-arp.o print-ascii.o print-atalk.o print-atm.o print-babel.o print-beep.o print-bfd.o print-bgp.o print-bootp.o print-bt.o print-calm-fast.o print-carp.o print-cdp.o print-cfm.o print-chdlc.o print-cip.o print-cnfp.o print-dccp.o print-decnet.o print-dhcp6.o print-domain.o print-dtp.o print-dvmrp.o print-eap.o print-egp.o print-eigrp.o print-enc.o print-esp.o print-ether.o print-fddi.o print-forces.o print-fr.o print-frag6.o print-ftp.o print-geneve.o print-geonet.o print-gre.o print-hncp.o print-hsrp.o print-http.o print-icmp.o print-icmp6.o print-igmp.o print-igrp.o print-ip.o print-ip6.o print-ip6opts.o print-ipcomp.o print-ipfc.o print-ipnet.o print-ipx.o print-isakmp.o print-isoclns.o print-juniper.o print-krb.o print-l2tp.o print-lane.o print-ldp.o print-lisp.o print-llc.o print-lldp.o print-lmp.o print-loopback.o print-lspping.o print-lwapp.o print-lwres.o print-m3ua.o print-medsa.o print-mobile.o print-mobility.o print-mpcp.o print-mpls.o print-mptcp.o print-msdp.o print-msnlb.o print-nflog.o print-nfs.o print-nsh.o print-ntp.o print-null.o print-olsr.o print-openflow-1.0.o print-openflow.o print-ospf.o print-ospf6.o print-otv.o print-pgm.o print-pim.o print-pktap.o print-ppi.o print-ppp.o print-pppoe.o print-pptp.o print-radius.o print-raw.o print-resp.o print-rip.o print-ripng.o print-rpki-rtr.o print-rrcp.o print-rsvp.o print-rt6.o print-rtsp.o print-rx.o print-sctp.o print-sflow.o print-sip.o print-sl.o print-sll.o print-slow.o print-smtp.o print-snmp.o print-stp.o print-sunatm.o print-sunrpc.o print-symantec.o print-syslog.o print-tcp.o print-telnet.o print-tftp.o print-timed.o print-tipc.o print-token.o print-udld.o print-udp.o print-usb.o print-vjc.o print-vqp.o print-vrrp.o print-vtp.o print-vxlan.o print-vxlan-gpe.o print-wb.o print-zephyr.o print-zeromq.o netdissect.o signature.o strtoaddr.o util-print.o  strlcat.o strlcpy.o -L/usr/lib -L/build/elm/usr/lib  -lpcap -L/build/elm/usr/lib -lcap-ng 


ld.lld: error: ipproto.o is incompatible with armelf_linux_eabi
ld.lld: error: l2vpn.o is incompatible with armelf_linux_eabi
ld.lld: error: machdep.o is incompatible with armelf_linux_eabi
ld.lld: error: nlpid.o is incompatible with armelf_linux_eabi
ld.lld: error: oui.o is incompatible with armelf_linux_eabi
ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-10-12 05:53:53 UTC
(In reply to Jack Rosenthal from comment #0)
> (related to BUG #692772)
> 
> pcap-config --libs outputs -L/usr/lib, which is not the correct include
> directory when cross compiling.

In that case the wrong pcap-config was called. Since it's net-analyzer/tcpdump doing that, please attach its entire build log to this bug report.
Comment 2 Brian Norris 2019-12-03 21:02:30 UTC
I believe this is a duplicate of https://bugs.gentoo.org/699802. Multiple people in the Chromium project were looking at similar issues, it seems. The Chromium bug tracker has some additional notes on this (https://crbug.com/1001156) if you'd like more info.

(I can't change bug status, IIUC, so just leaving a comment.)
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2019-12-03 21:12:40 UTC
(In reply to Brian Norris from comment #2)
> I believe this is a duplicate of https://bugs.gentoo.org/699802.

Not a duplicate as such, but fixing pcap-config did kill two birds with one stone.

> Multiple
> people in the Chromium project were looking at similar issues, it seems. The
> Chromium bug tracker has some additional notes on this
> (https://crbug.com/1001156) if you'd like more info.
> 
> (I can't change bug status, IIUC, so just leaving a comment.)

I guess you want me to close it? :)