Skip to contentSkip to conversation

How to install xtables extension to arbitrary path when cross compiling iptables?

DISCUSSION Kevin Wilson 3 participants 6 messages Apr 16, 2012 – Apr 17, 2012

lore
Share & tools
lore
#0 lore raw

how to install xtables extension to arbitrary path when cross compiling?

I have this issue, which I cannot resolve, when cross compiling iptables 1.4.8
with
./configure --prefix=/home/kevin/fs/test1_iptables ... and running afterwards make and make install, and then

on the target machine (which access the fs by NFS) I run:

iptables -t nat -A POSTROUTING -o ppp0 -j SNAT -s 10.1.1.25 The error I get is:

./iptables -A FORWARD -i eth1 -j SNAT
iptables v1.4.8: Couldn't load target `SNAT' :/home/kevin/fs/test1_iptables/libexec/xtables/libipt_SNAT.so: cannot open shared object file: No such file or directory

Of course I don't have /home/kevin/fs/ on the boards (this path is on the machine on which I ran the cross compile).
I saw
this post in gmane.comp.security.firewalls.netfilter.general.
http://comments.gmane.org/gmane.comp.security.firewalls.netfilter.general/40914

but it seems that the problem persists.

I tried also to work with DESTDIR and with other ideas from this post, but nothing helped.

What is the problem here, does anybody know ? I believe that cross compiling iptables and setting a path to xtables libs not to an absolute path is possible. Any ideas ?

#1 lore raw
Quoted 11 lines · Kevin Wilson

on the target machine (which access the fs by NFS) I run:

iptables -t nat -A POSTROUTING -o ppp0 -j SNAT -s 10.1.1.25 The error I get is:

./iptables -A FORWARD -i eth1 -j SNAT
iptables v1.4.8: Couldn't load target `SNAT' :/home/kevin/fs/test1_iptables/libexec/xtables/libipt_SNAT.so: cannot open shared object file: No such file or directory
how to install xtables extension to arbitrary path when cross compiling?

Like any other automake project, DESTDIR specifies the basepath for staged installs, and args to configure are what the target looks in.

	./configure --prefix=/test1_iptables
	make install DESTDIR=/home/kevin/fs
#2 lore raw

Hi,

Tried as you said and got
after make install DESTDIR=/home/kevin/fs

mv -f .deps/iptables_multi-xshared.Tpo .deps/iptables_multi-xshared.Po make[1]: *** No rule to make target extensions/libext4.a', needed by iptables-multi'. Stop.
make[1]: Leaving directory `/work/src/iptables-1.4.8'
make: *** [install-recursive] Error 1

----

Any ideas ?
KW

#3 lore raw
Quoted 4 lines · Kevin Wilson

Hi,

Tried as you said and got
after make install DESTDIR=/home/kevin/fs

You have to run make before make install.

Quoted 5 lines

mv -f .deps/iptables_multi-xshared.Tpo .deps/iptables_multi-xshared.Po make[1]: *** No rule to make target extensions/libext4.a', needed by iptables-multi'. Stop.
make[1]: Leaving directory `/work/src/iptables-1.4.8'
make: *** [install-recursive] Error 1

#4 lore raw

Check out cmdline parameter -host, -target, -build for configuring the build. I think you might have gone wrong in there.

Quoted 18 lines · Jan Engelhardt
Quoted 4 lines · Kevin Wilson

Hi,

Tried as you said and got
after make install DESTDIR=/home/kevin/fs

You have to run make before make install.

Quoted 5 lines

mv -f .deps/iptables_multi-xshared.Tpo .deps/iptables_multi-xshared.Po make[1]: *** No rule to make target extensions/libext4.a', needed by iptables-multi'.  Stop.
make[1]: Leaving directory `/work/src/iptables-1.4.8'
make: *** [install-recursive] Error 1

--
To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Signature · 2 lines
Regards,
Sri.
#5 lore raw
Quoted 2 lines · Sri Ram Vemulpali

Check out cmdline parameter -host, -target, -build for configuring the build. I think you might have gone wrong in there.

The value of those parameters is not even used, so no.

Quoted 15 lines · Jan Engelhardt
Quoted 14 lines · Kevin Wilson
Quoted 5 lines

Hi,

Tried as you said and got
after make install DESTDIR=/home/kevin/fs

You have to run make before make install.

Quoted 5 lines

mv -f .deps/iptables_multi-xshared.Tpo .deps/iptables_multi-xshared.Po make[1]: *** No rule to make target extensions/libext4.a', needed by iptables-multi'.  Stop.
make[1]: Leaving directory `/work/src/iptables-1.4.8'
make: *** [install-recursive] Error 1