[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netfilter-devel
Subject:    Re: [PATCH] statically link iptables regarding 1.2.7
From:       Harald Welte <laforge () gnumonks ! org>
Date:       2002-08-26 13:02:40
[Download RAW message or body]


On Tue, Aug 13, 2002 at 12:57:22PM +0200, Roberto Nibali wrote:
> Hi nf-developers,
> 
> I've downloaded the newest iptables package 1.2.7 and I've been running into 
> issues with statically linking iptables. With the following patch it works
> but I have the feeling that I didn't really address the real problem. Anyway,
> I'd like to post it so you get the idea of what I'm fighting with.

Thanks for your patch.

> o s/-rdynamic/$(LDFLAGS)/g:
>        This I needed so not only the objects would be linked and included into
>        iptables statically but also the the resulting iptables binary itself
>        could be linked statically agains (g)libc.
> 
>              ldd /sbin/iptables
> 	       not a dynamic executable
> 
>    Note, that this might also only work for my glibc/gcc dev environment
>    which is to a certain degree somewhat special. Could anymore share his
>    knowledge about statically linking iptables?

no, you are perfectly right.

> o the newly introduced DSCP code (thanks HW) includes "libipt_dscp_helper.c"
>    twice. When dynamically linking the linker handles this stupid dependancy
>    but the statically linking process is a little bit dumber/correct with
>    doubly defined functions. I've not fixed the issue but made a temporary
>    workaround for me. Please have a look into it and fix it correctly,
>    thanks.

The correct fix is to declare the functions static (which I have done now)

The clean implementation of this feature would be to hack the makefiles
in order to support extensions consisting out of multiple source files.
Any takers?

Expect 1.2.7a in a couple of hours.

-- 
Live long and prosper
- Harald Welte / laforge@gnumonks.org               http://www.gnumonks.org/
============================================================================
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M+ 
V-- PS++ PE-- Y++ PGP++ t+ 5-- !X !R tv-- b+++ !DI !D G+ e* h--- r++ y+(*)

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic