First Last Prev Next    No search results available
Details
: GIT HEAD fails to build under --as-needed because of xtab...
Bug#: 559
: iptables
: iptables
Status: RESOLVED
Resolution: FIXED
: All
: All
: CVS (please indicate timestamp)
: P3
: normal

:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Nix <nix@esperi.org.uk>
Assigned To: Patrick McHardy <kaber@trash.net>
:

Attachments
Fix, granting xtables the appropriate dependencies directly (1.51 KB, text/x-diff)
2008-10-25 19:29, Nix
Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2008-10-25 19:28
(Seen with ecae0c3efc6851d767c759b77d897d113af821a0.)

The split of xtables into its own library means that iptables itself no longer
uses libdl: only xtables does; yet -ldl precedes xtables in the link line, and
xtables itself is not dependent upon libdl. So if -Wl,--as-needed is on, this
happens:

libtool: link: gcc -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64
-D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations
-Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline
-pipe -DXTABLES_LIBDIR=\"/usr/libexec/xtables\" -DXTABLES_INTERNAL -I./include
-I./include -Wstrict-overflow=1 -g -fasynchronous-unwind-tables
-fomit-frame-pointer -pipe -march=native -D__NO_STRING_INLINES
-D__NO_MATH_INLINES -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE64_SOURCE -ffast-math -O2 -rdynamic -Wl,--enable-new-dtags
-Wl,--hash-style=gnu -Wl,-O1 -Wl,-z -Wl,relro -pipe -o .libs/iptables
iptables-standalone.o iptables.o  -ldl -lm libiptc/libiptc.a
extensions/libext4.a ./.libs/libxtables.so
./.libs/libxtables.so: undefined reference to `dlerror'
./.libs/libxtables.so: undefined reference to `dlopen'
collect2: ld returned 1 exit status
make[2]: *** [iptables] Error 1
make[2]: Leaving directory `/usr/packages/iptables/i686-loki'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/packages/iptables/i686-loki'
make: *** [all] Error 2
------- Comment #1 From Nix 2008-10-25 19:29:48 -------
Created an attachment (id=292) [details]
Fix, granting xtables the appropriate dependencies directly
------- Comment #2 From Mike Frysinger 2008-10-26 22:32:45 -------
that patch is incomplete ... the -lm needs to be after the .a archives

this one (by Arfrever Frehtes Taifersar Arahesis) is better i think:
http://bugs.gentoo.org/attachment.cgi?id=169948
------- Comment #3 From Nix 2008-10-26 23:02:51 -------
Oops. Yes, agreed, I missed that. (I suppose it works because pretty much
*everything* pulls in -lm anyway...)
------- Comment #4 From Jan Engelhardt 2009-03-30 01:25:23 -------
Fixed as of commit v1.4.3-rc1-107-g1288bf7.

First Last Prev Next    No search results available