All of lore.kernel.org
 help / color / mirror / Atom feed
* Only use libdl when shared builds are enabled (was: Only build iptables-xml)
@ 2009-07-20  9:10 Jan Engelhardt
  2009-07-21  0:22 ` Philip Craig
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Engelhardt @ 2009-07-20  9:10 UTC (permalink / raw)
  To: Philip Craig; +Cc: Netfilter Developer Mailing List

Hi Philip,


try this one instead.


parent efebafa0021f36f4547b7fcc47620274f333e001 (v1.4.4-2-gefebafa)
commit 906025e7be97f760cd11cc0f93f769f827bf6f70
Author: Jan Engelhardt <jengelh@medozas.de>
Date:   Mon Jul 20 11:08:14 2009 +0200

build: only use libdl when shared builds are enabled

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 Makefile.am |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index fd99098..5608bde 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,10 @@ libiptc_libiptc_la_LDFLAGS = -version-info 0:0:0
 lib_LTLIBRARIES      += libxtables.la
 libxtables_la_SOURCES = xtables.c
 libxtables_la_LDFLAGS = -version-info ${libxtables_vcurrent}:0:${libxtables_vage}
-libxtables_la_LIBADD  = -ldl
+libxtables_la_LIBADD  =
+if ENABLE_SHARED
+libxtables_la_LIBADD += -ldl
+endif
 
 # iptables, dynamic
 iptables_SOURCES          = iptables-standalone.c iptables.c
-- 
# Created with git-export-patch


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: Only use libdl when shared builds are enabled (was: Only build iptables-xml)
  2009-07-20  9:10 Only use libdl when shared builds are enabled (was: Only build iptables-xml) Jan Engelhardt
@ 2009-07-21  0:22 ` Philip Craig
  2009-07-22 11:54   ` Henrik Nordstrom
  0 siblings, 1 reply; 9+ messages in thread
From: Philip Craig @ 2009-07-21  0:22 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List

Jan Engelhardt wrote:
> Hi Philip,
> 
> 
> try this one instead.

Doesn't work:

ucfront-gcc m68k-uclinux-gcc -m5307 -DCONFIG_COLDFIRE 
-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=\"/libexec/xtables\" -DXTABLES_INTERNAL -I./include 
-I../include -Os -g -fomit-frame-pointer -pipe -fno-common -fno-builtin 
-Wall -DCONFIG_SECUREEDGE -DEMBED -msep-data -Dlinux -D__linux__ -Dunix 
-D__uClinux__ -Wl,-elf2flt -Wl,-move-rodata -msep-data -Wl,-elf2flt 
-Wl,-move-rodata -msep-data -o iptables-xml iptables-xml.o 
./.libs/libxtables.a
iptables-xml.elf2flt: In function `xtables_find_match':
/home/gerg/uClinux-dist/user/iptables/build/../xtables.c:579: undefined 
reference to `dlerror'
iptables-xml.elf2flt: In function `load_extension':
/home/gerg/uClinux-dist/user/iptables/build/../xtables.c:502: undefined 
reference to `dlopen'
/home/gerg/uClinux-dist/user/iptables/build/../xtables.c:511: undefined 
reference to `dlerror'
/home/gerg/uClinux-dist/user/iptables/build/../xtables.c:519: undefined 
reference to `dlopen'
/home/gerg/uClinux-dist/user/iptables/build/../xtables.c:526: undefined 
reference to `dlerror'
iptables-xml.elf2flt: In function `xtables_find_target':
/home/gerg/uClinux-dist/user/iptables/build/../xtables.c:633: undefined 
reference to `dlerror'
collect2: ld returned 1 exit status


The problem is that iptables-xml links against libxtables.la, and we never
build a version of libxtables.la that has -DNO_SHARED_LIBS=1.  This isn't
a problem for iptables-static because we build xtables.c separately for it,
rather than linking against libxtables.la.

Also we can't just add -DNO_SHARED_LIBS=1 to the cflags for libxtables.la
because that would break when both --enable-static and --enable-shared
are specified.


> parent efebafa0021f36f4547b7fcc47620274f333e001 (v1.4.4-2-gefebafa)
> commit 906025e7be97f760cd11cc0f93f769f827bf6f70
> Author: Jan Engelhardt <jengelh@medozas.de>
> Date:   Mon Jul 20 11:08:14 2009 +0200
> 
> build: only use libdl when shared builds are enabled
> 
> Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
> ---
>  Makefile.am |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index fd99098..5608bde 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -21,7 +21,10 @@ libiptc_libiptc_la_LDFLAGS = -version-info 0:0:0
>  lib_LTLIBRARIES      += libxtables.la
>  libxtables_la_SOURCES = xtables.c
>  libxtables_la_LDFLAGS = -version-info ${libxtables_vcurrent}:0:${libxtables_vage}
> -libxtables_la_LIBADD  = -ldl
> +libxtables_la_LIBADD  =
> +if ENABLE_SHARED
> +libxtables_la_LIBADD += -ldl
> +endif
>  
>  # iptables, dynamic
>  iptables_SOURCES          = iptables-standalone.c iptables.c


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Only use libdl when shared builds are enabled (was: Only build iptables-xml)
  2009-07-21  0:22 ` Philip Craig
@ 2009-07-22 11:54   ` Henrik Nordstrom
  2009-07-22 12:50     ` Jan Engelhardt
  0 siblings, 1 reply; 9+ messages in thread
From: Henrik Nordstrom @ 2009-07-22 11:54 UTC (permalink / raw)
  To: Philip Craig; +Cc: Jan Engelhardt, Netfilter Developer Mailing List

tis 2009-07-21 klockan 10:22 +1000 skrev Philip Craig:
> Jan Engelhardt wrote:
> > Hi Philip,
> > 
> > 
> > try this one instead.
> 
> Doesn't work:

And you are sure you used --disable-shared when you ran configure?

Regards
Henrik


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Only use libdl when shared builds are enabled (was: Only build iptables-xml)
  2009-07-22 11:54   ` Henrik Nordstrom
@ 2009-07-22 12:50     ` Jan Engelhardt
  2009-07-23  0:07       ` Only use libdl when shared builds are enabled Philip Craig
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Engelhardt @ 2009-07-22 12:50 UTC (permalink / raw)
  To: Henrik Nordstrom; +Cc: Philip Craig, Netfilter Developer Mailing List


On Wednesday 2009-07-22 13:54, Henrik Nordstrom wrote:
>tis 2009-07-21 klockan 10:22 +1000 skrev Philip Craig:
>> Jan Engelhardt wrote:
>> > Hi Philip,
>> > 
>> > 
>> > try this one instead.
>> 
>> Doesn't work:
>
>And you are sure you used --disable-shared when you ran configure?

I know, I hit this too. Needs more thought, disable-shared won't fix it 
atm.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Only use libdl when shared builds are enabled
  2009-07-22 12:50     ` Jan Engelhardt
@ 2009-07-23  0:07       ` Philip Craig
  2009-07-23  1:06         ` Jan Engelhardt
  2009-07-23 15:50         ` Jan Engelhardt
  0 siblings, 2 replies; 9+ messages in thread
From: Philip Craig @ 2009-07-23  0:07 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Henrik Nordstrom, Netfilter Developer Mailing List

Jan Engelhardt wrote:
> I know, I hit this too. Needs more thought, disable-shared won't fix it 
> atm.

Is there any reason to support both --enable-shared and --enable-static
at the same time?

If we don't support that then the fix is fairly straightforward.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Only use libdl when shared builds are enabled
  2009-07-23  0:07       ` Only use libdl when shared builds are enabled Philip Craig
@ 2009-07-23  1:06         ` Jan Engelhardt
  2009-07-23 15:50         ` Jan Engelhardt
  1 sibling, 0 replies; 9+ messages in thread
From: Jan Engelhardt @ 2009-07-23  1:06 UTC (permalink / raw)
  To: Philip Craig; +Cc: Henrik Nordstrom, Netfilter Developer Mailing List


On Thursday 2009-07-23 02:07, Philip Craig wrote:
>Jan Engelhardt wrote:
>> I know, I hit this too. Needs more thought, disable-shared won't fix it 
>> atm.
>
>Is there any reason to support both --enable-shared and --enable-static
>at the same time?

Yes, it is just implemented suboptimally; --enable-static has an 
overloaded meaning ATM.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Only use libdl when shared builds are enabled
  2009-07-23  0:07       ` Only use libdl when shared builds are enabled Philip Craig
  2009-07-23  1:06         ` Jan Engelhardt
@ 2009-07-23 15:50         ` Jan Engelhardt
  2009-07-24  9:02           ` Philip Craig
  1 sibling, 1 reply; 9+ messages in thread
From: Jan Engelhardt @ 2009-07-23 15:50 UTC (permalink / raw)
  To: Philip Craig; +Cc: Henrik Nordstrom, Netfilter Developer Mailing List


On Thursday 2009-07-23 02:07, Philip Craig wrote:
>Jan Engelhardt wrote:
>> I know, I hit this too. Needs more thought, disable-shared won't fix it 
>> atm.
>
>Is there any reason to support both --enable-shared and --enable-static
>at the same time?

Well yes. I fixed it now, please try

	git://dev.medozas.de/iptables master

for new instructions see `git log -p INSTALL`.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Only use libdl when shared builds are enabled
  2009-07-23 15:50         ` Jan Engelhardt
@ 2009-07-24  9:02           ` Philip Craig
  2009-07-24  9:26             ` Jan Engelhardt
  0 siblings, 1 reply; 9+ messages in thread
From: Philip Craig @ 2009-07-24  9:02 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Henrik Nordstrom, Netfilter Developer Mailing List

Jan Engelhardt wrote:
> On Thursday 2009-07-23 02:07, Philip Craig wrote:
>> Is there any reason to support both --enable-shared and --enable-static
>> at the same time?
> 
> Well yes. I fixed it now, please try
> 
> 	git://dev.medozas.de/iptables master
> 
> for new instructions see `git log -p INSTALL`.

The changes look good, and I understand what you meant by overloaded
meaning for enable-static now.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Only use libdl when shared builds are enabled
  2009-07-24  9:02           ` Philip Craig
@ 2009-07-24  9:26             ` Jan Engelhardt
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Engelhardt @ 2009-07-24  9:26 UTC (permalink / raw)
  To: Philip Craig; +Cc: Henrik Nordstrom, Netfilter Developer Mailing List


On Friday 2009-07-24 11:02, Philip Craig wrote:
>Jan Engelhardt wrote:
>> On Thursday 2009-07-23 02:07, Philip Craig wrote:
>>> Is there any reason to support both --enable-shared and --enable-static
>>> at the same time?
>> 
>> Well yes. I fixed it now, please try
>> 
>> 	git://dev.medozas.de/iptables master
>> 
>> for new instructions see `git log -p INSTALL`.
>
>The changes look good, and I understand what you meant by overloaded
>meaning for enable-static now.
>
Well now it's less overloaded :)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-07-24  9:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-20  9:10 Only use libdl when shared builds are enabled (was: Only build iptables-xml) Jan Engelhardt
2009-07-21  0:22 ` Philip Craig
2009-07-22 11:54   ` Henrik Nordstrom
2009-07-22 12:50     ` Jan Engelhardt
2009-07-23  0:07       ` Only use libdl when shared builds are enabled Philip Craig
2009-07-23  1:06         ` Jan Engelhardt
2009-07-23 15:50         ` Jan Engelhardt
2009-07-24  9:02           ` Philip Craig
2009-07-24  9:26             ` Jan Engelhardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.