OpenWrt Forum Archive

Topic: unable to compile trunk when place additional file into package

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

Hello,

I used to place some files into openwrt root directory. To achieve that just copy them into package/base-files/files/ directory
It work for me so far. I decide to download trunk and do the same, but when place a file inside package/base .....   it fails to compile, here is the last lines from compilation (make V=s).
Actually after many retries looks like one of my files make compilation fail, it is 11k binary file compiled for mips , here is the last lines from compilation (make V=s).


mkdir -p /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/tmp
mkdir -p /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/usr/lib
mkdir -p /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/usr/bin
mkdir -p /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/sys
mkdir -p /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/www
mkdir -p /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/root
ln -sf /proc/mounts /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/etc/mtab
rm -f /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/var
ln -sf /tmp /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/var
mkdir -p /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/etc
ln -sf /tmp/resolv.conf /tmp/fstab /tmp/TZ /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/etc/
chmod 0600 /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/etc/shadow
chmod 1777 /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/tmp
rm -f /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/etc/config/network
for conffile in /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/etc/config/*; do if [ -f "$conffile" ]; then grep "${conffile##/storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files}" /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/CONTROL/conffiles || echo "${conffile##/storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files}" >> /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/CONTROL/conffiles; fi done
grep: /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files/CONTROL/conffiles: No such file or directory
find /storage/openwrt/dd_1/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/base-files/ipkg-ar71xx/base-files -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
Package base-files is missing dependencies for the following libraries:
libc.so.0
make[3]: *** [/storage/openwrt/dd_1/bin/ar71xx/packages/base/base-files_159-r47048_ar71xx.ipk] Error 1
make[3]: Leaving directory `/storage/openwrt/dd_1/package/base-files'
make[2]: *** [package/base-files/compile] Error 2
make[2]: Leaving directory `/storage/openwrt/dd_1'
make[1]: *** [/storage/openwrt/dd_1/staging_dir/target-mips_34kc_musl-1.1.11/stamp/.package_compile] Error 2
make[1]: Leaving directory `/storage/openwrt/dd_1'
make: *** [world] Error 2


any ideas how to correct this  problem?

I did nothing wrong and curious thing is that one file cause compilation to fail, if I include other files, there is no problem, but if put this file, never mind in what base-files directory, compilation fails with the above error. Very strange ................. (same file is included in BB_14.07 compilation and it work without problem)

(Last edited by nedoskiv on 28 Sep 2015, 07:39)

What is the file?  (There is the warning about a missing "libc" dependency, which looks strange).

My guess is that somehow your file replaces a normal file and compilation fails as the system thinks that the base-files package needs a new dependency.

Like Borromini indicated via the wiki link, the normal place to add custom files is NOT <buildroot>/package/base-files/files. Normal place is <buildroot>/files and the files placed there should be handled properly. Have you tried that already?

(Last edited by hnyman on 28 Sep 2015, 07:34)

Thank u for your help guys, looks like I was in mistake putting files into packages directory, it works fine so far, but now you show me the better/right way and  it worked, thank you.

(Last edited by nedoskiv on 28 Sep 2015, 11:19)

The discussion might have continued from here.