Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 558238 - net-firewall/iptables-1.4.21-r2[static-libs]: undefined reference while linking
Summary: net-firewall/iptables-1.4.21-r2[static-libs]: undefined reference while linking
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
Depends on:
Reported: 2015-08-20 09:47 UTC by Attila Tóth
Modified: 2015-09-09 13:08 UTC (History)
0 users

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

iptables-link-iptables-against-libnetfilter_conntrack.patch (iptables-link-iptables-against-libnetfilter_conntrack.patch,444 bytes, patch)
2015-08-20 09:48 UTC, Attila Tóth
Details | Diff
build.log (build.log.gz,9.83 KB, application/gzip)
2015-09-09 13:04 UTC, Attila Tóth

Note You need to log in before you can comment on or make changes to this bug.
Description Attila Tóth 2015-08-20 09:47:18 UTC
Fails to build from source with the following error message:
/bin/sh ../libtool --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -Wall -Waggregate-return -Wmissing-declarations       -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes  -Winline -pipe -DALL_INCLUSIVE -DENABLE_IPV4 -DENABLE_IPV6 -O2 -march=native -pipe  -Wl,-O1 -Wl,--as-needed -o xtables-multi xtables_multi-xtables-multi.o xtables_multi-iptables-xml.o xtables_multi-iptables-save.o xtables_multi-iptables-restore.o xtables_multi-iptables-standalone.o xtables_multi-iptables.o xtables_multi-ip6tables-save.o xtables_multi-ip6tables-restore.o xtables_multi-ip6tables-standalone.o xtables_multi-ip6tables.o xtables_multi-xshared.o ../extensions/libext.a ../libiptc/ ../extensions/libext4.a ../libiptc/ ../extensions/libext6.a ../libxtables/ -lm -lpcap
libtool: link: x86_64-pc-linux-gnu-gcc -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline -pipe -DALL_INCLUSIVE -DENABLE_IPV4 -DENABLE_IPV6 -O2 -march=native -pipe -Wl,-O1 -o .libs/xtables-multi xtables_multi-xtables-multi.o xtables_multi-iptables-xml.o xtables_multi-iptables-save.o xtables_multi-iptables-restore.o xtables_multi-iptables-standalone.o xtables_multi-iptables.o xtables_multi-ip6tables-save.o xtables_multi-ip6tables-restore.o xtables_multi-ip6tables-standalone.o xtables_multi-ip6tables.o xtables_multi-xshared.o  -Wl,--as-needed ../extensions/libext.a ../libiptc/.libs/ ../extensions/libext4.a ../libiptc/.libs/ ../extensions/libext6.a ../libxtables/.libs/ -lm -lpcap
../extensions/libext.a(libxt_connlabel.o): In function `connlabel_get_name':
libxt_connlabel.c:(.text+0x30): undefined reference to `nfct_labelmap_get_name'
../extensions/libext.a(libxt_connlabel.o): In function `connlabel_mt_parse':
libxt_connlabel.c:(.text+0x24b): undefined reference to `nfct_labelmap_get_bit'
../extensions/libext.a(libxt_connlabel.o): In function `libxt_connlabel_init':
libxt_connlabel.c:(.text+0x3a9): undefined reference to `nfct_labelmap_new'
collect2: error: ld returned 1 exit status

Reproducible: Always

The bug is related to this bug:

But the issue should be addressed in a different Makefile by a conditional LDADD.
Comment 1 Attila Tóth 2015-08-20 09:48:41 UTC
Created attachment 409552 [details, diff]

Proposed patch works for me.
Comment 2 Michael Palimaka (kensington) gentoo-dev 2015-08-22 19:25:09 UTC
Please attach emerge --info and the failing build log.
Comment 3 Attila Tóth 2015-09-09 13:04:43 UTC
Created attachment 411422 [details]

build.log requested
Comment 4 Attila Tóth 2015-09-09 13:05:15 UTC
Portage (python 2.7.10-final-0, hardened/linux/amd64/no-multilib, gcc-4.9.3, glibc-2.21-r1, 4.1.6-hardened-r1 x86_64)
System uname: Linux-4.1.6-hardened-r1-x86_64-Intel-R-_Core-TM-_i7-2630QM_CPU_@_2.00GHz-with-gentoo-2.2
KiB Mem:     7926692 total,   3827016 free
KiB Swap:   17070076 total,  17070076 free
Timestamp of repository gentoo: Tue, 08 Sep 2015 14:00:01 +0000
sh bash 4.3_p42
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
ccache version 3.1.9 [disabled]
app-shells/bash:          4.3_p42::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.0::gentoo
dev-lang/python:          2.7.10::gentoo, 3.2.5-r6::gentoo, 3.3.5-r1::gentoo, 3.4.3::gentoo
dev-util/ccache:          3.1.9-r4::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r3::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.9.6-r4::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.7.4::gentoo, 4.8.4::gentoo, 4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo

    location: /usr/local/portage
    masters: gentoo
    priority: 3
    eclass-overrides: hardened-development

    location: /home/atoth/public_html/overlay
    masters: gentoo
    priority: 4
    eclass-overrides: hardened-development

    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://
    priority: 5
    eclass-overrides: hardened-development

    location: /var/lib/layman/anarchy
    masters: gentoo
    priority: 6
    eclass-overrides: hardened-development

    location: /var/lib/layman/hardened-development
    masters: gentoo
    priority: 7
    eclass-overrides: hardened-development

    location: /var/lib/layman/science
    masters: gentoo
    priority: 8
    eclass-overrides: hardened-development

CFLAGS="-O2 -march=native -pipe"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3 -l8"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="64bit 7zip GNU R X X509 Xaw3d a52 aac aalib acl acpi action_modeswitch addbookmarks adobe-cff aiglx aio airdrop-ng airgraph-ng aisleriot alsa amd64 amr analitza ansi aotuv apache2 apng applet archive ares argyllcms arping asf asm asn1 atahpt atmo attica audio audiofile autoconf-archive automount autoreplace avcodec avformat avs avx awt bash-completion battstat bazaar bcmath bdf beautifulsoup3 berkdb bfio binfilter bitbang_spi bitmap-fonts bittorrent blas bluetooth bogofilter bonobo boost botan branding browserplugin bugzilla buspirate_spi bzip2 bzr cacert cairo calendar canberra canvas caps cblas-external cdaudio cdda cddax cddb cdio cdparanoia cdr cdrom celt chappa chardet charmap checkpath cheese chm cholmod chromaprint clamav clamdtop clang cli client client-libs clipboard clockdiff clutter cmdmon coinmp collada color colord combination-explosion-check command-not-found conntrack contactnotes context contrib convert convert-mozilla-cookies corefonts coverage cpufreq_bench cracklib cramfs crash-reporter crashreporter crnl-as-line-terminator cron crypt cryptsetup crywrap css cue cups curl cvs cxx datahub dba dbm dbus dcmtk ddate declarative dediprog designer designer-plugin deskbar desktopglobe detex devhelp device-mapper dga dhcp dia dicom dii dirac discard-path divx divx4linux djbfft djvu dlloader dmi dns dot downloads-monitor doxysearch dpi drawing dri dri3 drkaiser drm dselect dtmf dts dv dvbpsi dvd dvdnav dvdr dvdread dvi dvi2tty dvipdfm eap-sim ebook edd editor eds egl eglfs eigen elfutils emerald enca enchant encode epiphany epspdf epub equalizer evdev evo ewf exif expat exporter extensions extra extraengine extrafilters extras faac faad facebook fallback fam fame fat fax fbosd fcitx fdformat fdk ffmpeg ffmpegsource fftw filecaps filter-aaaa finger firefox firefox-bookmarks firmware firmware-loader fits flac flash flashback flatfile flickr floppy fltk fontconfig fontforge fonts foomaticdb force-cgi-redirect fortran fox fpx freerdp ftdi ftp fuse g3dvl g726 gadu gajim galago gallium gbm gcj gconf gcrypt gd gdal gdata gdb gdbm gdk-pixbuf gdl gdm gdu geany gedit geoloc gif gimp gimpprint ginac git glade glchess gles gles1 glibc glpk gltf gme gmedia gmp gnet gnome gnome-keyring gnome-online-accounts gnome-screensaver gnumeric gnuplot gnutls gold google gopher gpac gpg gphoto2 gpm graph graphics graphviz groupwise grp gs gsf gsl gsm gstreamer gtalk gtk gtk2 gtk3 gtkhtml gtkstyle gudev gui guile h224 h281 h323 handbook hardened hdaps hdf hdf5 hdfview hid hid2hci highlight history hpack-tools hpcups hpijs hs2-0 html http http2 httpd hub hwdb ibus icedtea7 iconv icu id3tag idle idn iec61883 ieee1394 ilbc imagemagick imaging imap imlib inherit-graph inkjar inotify int-quality int64 internal introspection iodbc ipc iplayer iplsrc iprint iptc ipv6 irc irda ivr jabber jadetex java java6 javascript jbootstrap jce jemalloc jemalloc3 jingle jpeg jpeg2k jrtplib json juju justify kate kde kdenlive kdepim kdrive keybinder keymap kipi kms kontact kpathsea ktp l10n ladspa lame lapack laptop latex latex3 lcms ldb ldns leaps_timezone lensfun libass libburn libcaca libcanberra libffi libgda libindicate libkms liblockfile libnl libnotify libopts libplot libsamplerate libsecret libssh2 libtar libtiger libv4l2 libvisual lightning live lldb llvm llvm-shared-libs lm_sensors lock log4j logger logitech-mouse loop-aes lto lxde lxpanel lyx lz4 lzma lzo lzw m17n-lib mad map math mathml matio matroska mbim mbox mcal mclib md5sum mdev meanwhile mediawiki melt memlimit mercurial metapost metis midi mikmod mime miner-fs mjpeg mktemp mmap mmx mmxext mng mobi mobipocket mod mode-owner modplug modules motif mozbranding mozcalendar mp2 mp3 mp4 mpeg mpeg1 mpeg2 mplayer msn mta mtp mudflap mumps musepack mxit mysql mysqli nat native-headset natspec nautilus ncat ncurses ndiff nemesi netifrc netlink network networking networkmanager nic3com nicintel nicintel_spi nicnatsemi nicrealtek nifti nls nmap-update nntp nokia nopop3d notification nowlistening nping nptl nsplugin nss nss-pem ntfs ntfsdecrypt ntlm nullok numpy nut nuv oauth oav obex ocr odbc odk office offlinehelp ofx ogg oggvorbis ogm ogp_spi oil okular onaccess oniguruma openal opencore-amr openct opencv openexr opengl openmax openmp openpty openssl optimisememory optreg opus oqgraph orbit oscar osmesa otr pam pam_chroot pam_ssh pam_timestamp pango passwdqc paste64 pasteafter patented pax_kernel pbxt pcap pccts pcmcia pcre pcre16 pcre32 pcsc-lite pda pdf pear perl pgp phc phonon php physfs pic pidgin pie pipes pkcs11 plasma playlist playtools plotutils plugin-autowep plugin-btscan plugin-checksum plugin-doat plugin-dot15d4 plugin-fishlim plugin-ptw plugin-spectools plugin-sysinfo plugins png pnm policykit pony_spi posix postproc postscript ppds pps pptx prevent-removal printsupport prison privacy projectm pstricks ptpax publishers pulseaudio pvr pwquality python python2 qalculate qhull qml qpak qt3support qt4 qt5 quicktime quotas qwt r600-llvm-compiler rar rarpd raw rawio rc5 rcs rdesktop rdisc rdp readline realmedia reencrypt refclock reiserfs remote remoteosd rendering replytolist review rle rss rtc rtf rtmp ruby20 ruby21 ruby22 rule_generator samba sasl satamv satasii sbc sbsms scanner scenarios schroedinger science scim screen script scripting scripttools scsi sdl sdl-sound sdlgfx seccomp secure secure-delete seed semantic-desktop sendmail sendto sensord serprog servletapi session sftp sftplogging shapefile shared shared-dricore shared-glapi shm short-touchpad-timeout showtabbar sid sidebar silc sip sipe sipim skins skype slang smbsharemodes smime smp sms smtp snappy sndfile soap socialweb sockets softstore solver soprano sound soundex soundtouch sourceview sox spam-report spamassassin sparse speex spell spf split-ucode sql sqlite3 srt srtp sse sse2 sse2check sse3 sse4_1 ssh ssl ssp ssse3 startup-notification static-analyzer statistics stats steam stemmer stun subtitles subversion sudoku sunec svg swat switcher swscale sysgccxml syslog system-cairo system-icu system-jpeg system-libvpx system-sqlite systemd systemd-units systray sysvipc szip t1lib taglib tagsoup tagwriting tbb tcl tcltk tcmalloc tcpd tdls telepathy templates terminal tetex tex4ht texi2html texteffect tftpd tga themes theora thetvdb thin threads threadsafe thumbnail thunar thunderbird tiff tilepath timidity tk tlen tls-heartbeat tokenizer toolame toolbar tools totem tracepath tracker transcode translator trayicon tremor truetype truetype-fonts trust tts tty-helpers twolame type1-fonts type3 udev udis86 udisks umfpack uncommon-eap-types underscores unicode units_cur unlock-notify unstable update-alternatives upnp-av upower urandom urlpicpreview usb userlocales utils uuid v4l v4l2 vaapi vala valgrind vamp vcd vcdinfo vcdx vdpau verify-file video views virus-scan visio vista visualization vlc vlm vnc voice volpack vorbis vpx vtk vxml wad wallpapers wav wavpack wavplay webgl webkit webm webp webphoto webrtc-aec widgets wifi wiki wimax wma wma-fixed wmf wmp wpg wps wxwidgets wxwindows x264 x265 xa xattr xblas xcap xcb xchat xchatdccserver xcos xdm-auth xdmf2 xephyr xetex xface xforms xft xine xkb xlib-xcb xmedcon xml xml2 xmlrpc xmp xmpp xnest xorg xosd xpm xps xscreensaver xsl xtpax xulrunner xv xvfb xvid xvmc yahoo zeitgeist zenmap zip zlib zvbi" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2 avx" CURL_SSL="nss" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc emu" INPUT_DEVICES="keyboard mouse acecad evdev roccat_kone roccat_koneplus roccat_konepure roccat_konextd roccat_kovaplus roccat_pyra roccat_savu roccat_konepureoptical roccat_ryosmk synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer nlpsolver pdfimport" LINGUAS="hu en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21 ruby22" SANE_BACKENDS="epson epson2 gt68xx ma1509 mustek mustek_usb mustek_usb2 plustek snapscan umax pnm" USERLAND="GNU" VIDEO_CARDS="radeon r600" XFCE_PLUGINS="battery brightness clock power trash" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.4"
Comment 5 Attila Tóth 2015-09-09 13:06:23 UTC
Please note the upstream link in the URL
Comment 6 Attila Tóth 2015-09-09 13:08:52 UTC
net-firewall/iptables-1.4.21-r3[static-libs] still fails the same way and the attached patch on top of the upstream stuff still fixes the problem. The provided solution is conditional and probably harmless for a non-[static-libs] scenario.