OpenWrt Forum Archive

Topic: what is this "stripping" error ?

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

/wrt54g/openwrt/buildroot/build_mipsel/staging_dir/bin/mipsel-linux-uclibc-strip --remove-section=.comment --remove-section=.
note /wrt54g/openwrt/buildroot/build_mipsel/root/usr/sbin/iptables*
/wrt54g/openwrt/buildroot/build_mipsel/staging_dir/bin/mipsel-linux-uclibc-strip: Warning: Output file cannot represent archi
tecture UNKNOWN!
============================================================
I did nothing but just download the CVS and make.

It seems only related to the iptable builds as other core package like dnsmasq has the same command but goes smoothly.

Since this is actually an error, the resulted "stripped" file is incomplete(only 144 bytes) and cannot be used.

EDIT:

Seems that when I first build with "make", it was fine. However, after that, I did a "make package" which also build the iptables packages and after that, I begin to see this error if I want to make the rootfs binary again.

I need to go into build_mipsel/iptables* and do a 'make clean' then I can make the rootfs binary again.

I have redo it a number of times and can confirm that the "make package" way of making iptables does something bad.

EDIT2:

Found the problem but don't know how to fix it. The whole sequence is like this :

1. "make" would copy only iptables(not v6) files to root and run strip, this is fine
2. make package would additionally copy  v6 related files(but not the v4 files) to there and run strip again. The problem starts from here as strip seems to have problem striping already stripped files(the v4 files already there). This gives me 92 byte files, without any warning or error message even though this is already wrong.
3. "make" again would once again run strip which now barks because it sees the 92 byte files.

Seems like a bug in strip.

Find a temp fix. I change the iptables.mk and add the following two "touch"

$(TARGET_DIR)/sbin/iptables: $(IPTABLES_BUILD_DIR)/iptables
        touch $(IPTABLES_BUILD_DIR)/iptables
        touch $(IPTABLES_BUILD_DIR)/extensions/*so

this would force the "install" to recopy the non-stripped files to root again which strip would feel happy.

Please consider adding this. Otherwise, even the following would fail :

1. make
this would make the firmware correctly.

2. make
making it again would already results in error without any warning.

The discussion might have continued from here.