OpenWrt Forum Archive

Topic: unable to compile from sources on debian

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

hello
I used to compile openwrt on slackware and it works fine, but decided to migrate to debian (orange pi)

Using debian 8 jessie, I install all dependicies discribed in openwrt buildroot page,

copy same sources I used on slackware, make distlclean, menu config and start compiling and an error occurs:

mkdir -p /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files/www
mkdir -p /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files/root
ln -sf /proc/mounts /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files/etc/mtab
rm -f /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files/var
ln -sf /tmp /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files/var
mkdir -p /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files/etc
ln -sf /tmp/resolv.conf /tmp/fstab /tmp/TZ /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files/etc/
chmod 0600 /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files/etc/shadow
chmod 1777 /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files/tmp
rm -f /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files/etc/config/network
for conffile in /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files/etc/config/*; do if [ -f "$conffile" ]; then grep "${conffile##/storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files}" /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files/CONTROL/conffiles || echo "${conffile##/storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files}" >> /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files/CONTROL/conffiles; fi done
grep: /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files/CONTROL/conffiles: No such file or directory
SHELL= /storage/openwrt/rc8_dd_47249/staging_dir/host/bin/flock /storage/openwrt/rc8_dd_47249/tmp/.root-copy.flock -c 'cp -fpR /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files/. /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/'
rm -rf /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-base-files
touch /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/stamp/.base-files_installed
if [ -f /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/pkginfo/base-files.default.install.clean ]; then rm -f /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/pkginfo/base-files.default.install /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/pkginfo/base-files.default.install.clean; fi; echo "base-files" >> /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/pkginfo/base-files.default.install
make[3]: Leaving directory '/storage/openwrt/rc8_dd_47249/package/base-files'
make[3]: Entering directory '/storage/openwrt/rc8_dd_47249/package/boot/uboot-ar71xx'
rm -rf /storage/openwrt/rc8_dd_47249/bin/ar71xx/uboot-ar71xx-nbg460n_550n_550nh
install -d -m0755 /storage/openwrt/rc8_dd_47249/bin/ar71xx/uboot-ar71xx-nbg460n_550n_550nh
install -d -m0755 /storage/openwrt/rc8_dd_47249/bin/ar71xx/uboot-ar71xx-nbg460n_550n_550nh
cp -fpR /storage/openwrt/rc8_dd_47249/build_dir/target-mips_34kc_musl-1.1.11/linux-ar71xx_generic/u-boot-nbg460n_550n_550nh/u-boot-2010.03/u-boot.bin /storage/openwrt/rc8_dd_47249/bin/ar71xx/openwrt-ar71xx-generic-nbg460n_550n_550nh-u-boot.bin
make[3]: Leaving directory '/storage/openwrt/rc8_dd_47249/package/boot/uboot-ar71xx'
make[3]: Entering directory '/storage/openwrt/rc8_dd_47249/package/boot/uboot-envtools'
rm -rf /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-uboot-envtools
mkdir -p /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/stamp /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-uboot-envtools
install -d -m0755 /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-uboot-envtools/usr/sbin
install -m0755 /storage/openwrt/rc8_dd_47249/build_dir/target-mips_34kc_musl-1.1.11/u-boot-2014.10/tools/env/fw_printenv /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-uboot-envtools/usr/sbin
ln -sf fw_printenv /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-uboot-envtools/usr/sbin/fw_setenv
install -d -m0755 /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-uboot-envtools/lib
install -m0644 ./files/uboot-envtools.sh /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-uboot-envtools/lib
install -d -m0755 /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-uboot-envtools/etc/uci-defaults
install -m0644 ./files/ar71xx /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-uboot-envtools/etc/uci-defaults/30_uboot-envtools
SHELL= /storage/openwrt/rc8_dd_47249/staging_dir/host/bin/flock /storage/openwrt/rc8_dd_47249/tmp/.root-copy.flock -c 'cp -fpR /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-uboot-envtools/. /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/'
rm -rf /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/tmp-uboot-envtools
touch /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/root-ar71xx/stamp/.uboot-envtools_installed
if [ -f /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/pkginfo/uboot-envtools.default.install.clean ]; then rm -f /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/pkginfo/uboot-envtools.default.install /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/pkginfo/uboot-envtools.default.install.clean; fi; echo "uboot-envtools" >> /storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/pkginfo/uboot-envtools.default.install
make[3]: Leaving directory '/storage/openwrt/rc8_dd_47249/package/boot/uboot-envtools'
make[3]: Entering directory '/storage/openwrt/rc8_dd_47249/feeds/luci/modules/luci-base'
install -d -m0755 /bin
install -m0755 src/po2lmo /bin/po2lmo
install: cannot create regular file '/bin/po2lmo': Permission denied
Makefile:45: recipe for target '/storage/openwrt/rc8_dd_47249/staging_dir/host/stamp/.luci-base_installed' failed
make[3]: *** [/storage/openwrt/rc8_dd_47249/staging_dir/host/stamp/.luci-base_installed] Error 1
make[3]: Leaving directory '/storage/openwrt/rc8_dd_47249/feeds/luci/modules/luci-base'
package/Makefile:191: recipe for target 'package/feeds/luci/luci-base/host/compile' failed
make[2]: *** [package/feeds/luci/luci-base/host/compile] Error 2
make[2]: Leaving directory '/storage/openwrt/rc8_dd_47249'
package/Makefile:188: recipe for target '/storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/stamp/.package_compile' failed
make[1]: *** [/storage/openwrt/rc8_dd_47249/staging_dir/target-mips_34kc_musl-1.1.11/stamp/.package_compile] Error 2
make[1]: Leaving directory '/storage/openwrt/rc8_dd_47249'
/storage/openwrt/rc8_dd_47249/include/toplevel.mk:177: recipe for target 'world' failed
make: *** [world] Error 2

as long as I see by some reason this package is trying to install in system /bin direcotry instead of openwrt build directory, any idea how to fix that?

I don't know what the problem is, but did you try to do a fresh checkout, copy over .config and see what happens?

That looks like you are trying to compile a very old DD version from 2015? Then you should also use all feeds like Luci from the same time. I guess that the po2lmo error is due to new Luci with old main sources.

Use up-to-date sources for everything.

how can I use old luci sources then? I just run ./feed update -a and install -a
guess gonna restore archive and try with less make clean, probabbly dirclean instead of distclean

If you want to compile an old source version, then you should git checkout Luci and packages feeds from the same date as the main source. That requires some git knowledge but can be done with git.

But that old source of yours has e.g. Musl clib 1.11 while it is now 1.15. and it is ancient also otherwise. You would likely be better off with updated main sources.

The discussion might have continued from here.