LINUX.ORG.RU

Ошибка при компиляции OpenWrt

 , , ,


0

1

Всем добрый вечер. Прежде чем убить свой роутер и винить себя за то, что не попробовал на виртуалке, решил не допускать таких ошибок и попробовать собрать свою прошивку OpenWrt для x86. Выбрал нужные пакеты, лишнее убрал, сохранил. Запускаю процесс компиляции и вижу такую картину

make[1] world
 make[2] tools/install
 make[2] package/cleanup
 make[3] -C tools/patch compile
 make[3] -C tools/make-ext4fs compile
 make[3] -C tools/sstrip compile
 make[3] -C tools/firmware-utils compile
 make[3] -C tools/patch-image compile
 make[3] -C tools/flock compile
 make[3] -C tools/sstrip install
 make[3] -C tools/make-ext4fs install
 make[3] -C tools/patch-image install
 make[3] -C tools/flock install
 make[3] -C tools/firmware-utils install
 make[3] -C tools/patch install
 make[3] -C tools/xz compile
 make[3] -C tools/m4 compile
 make[3] -C tools/sed compile
 make[3] -C tools/yaffs2 compile
 make[3] -C tools/cmake compile
 make[3] -C tools/scons compile
 make[3] -C tools/lzma compile
 make[3] -C tools/sed install
 make[3] -C tools/m4 install
 make[3] -C tools/pkg-config compile
 make[3] -C tools/mkimage compile
 make[3] -C tools/yaffs2 install
 make[3] -C tools/scons install
 make[3] -C tools/lzma install
 make[3] -C tools/autoconf compile
 make[3] -C tools/pkg-config install
 make[3] -C tools/xz install
 make[3] -C tools/mkimage install
 make[3] -C tools/squashfs4 compile
 make[3] -C tools/autoconf install
 make[3] -C tools/automake compile
 make[3] -C tools/missing-macros compile
 make[3] -C tools/automake install
 make[3] -C tools/missing-macros install
 make[3] -C tools/libtool compile
 make[3] -C tools/squashfs4 install
 make[3] -C tools/libtool install
 make[3] -C tools/gmp compile
 make[3] -C tools/libelf compile
 make[3] -C tools/flex compile
 make[3] -C tools/mklibs compile
 make[3] -C tools/e2fsprogs compile
 make[3] -C tools/mm-macros compile
 make[3] -C tools/gengetopt compile
 make[3] -C tools/patchelf compile
 make[3] -C tools/gmp install
 make[3] -C tools/libelf install
 make[3] -C tools/flex install
 make[3] -C tools/mklibs install
 make[3] -C tools/e2fsprogs install
 make[3] -C tools/mm-macros install
 make[3] -C tools/cmake install
 make[3] -C tools/qemu compile
 make[3] -C tools/mpfr compile
 make[3] -C tools/bison compile
 make[3] -C tools/mtd-utils compile
 make[3] -C tools/patchelf install
 make[3] -C tools/qemu install
 make[3] -C tools/mpfr install
 make[3] -C tools/mtd-utils install
 make[3] -C tools/mpc compile
 make[3] -C tools/gengetopt install
 make[3] -C tools/mpc install
 make[3] -C tools/bison install
 make[3] -C tools/findutils compile
 make[3] -C tools/bc compile
 make[3] -C tools/bc install
 make[3] -C tools/findutils install
 make[3] -C tools/padjffs2 compile
 make[3] -C tools/quilt compile
 make[3] -C tools/padjffs2 install
 make[3] -C tools/quilt install
 make[2] toolchain/install
 make[3] -C toolchain/gdb prepare
 make[3] -C toolchain/binutils prepare
 make[3] -C toolchain/gcc/minimal prepare
 make[3] -C toolchain/kernel-headers prepare
 make[3] -C toolchain/uClibc/headers prepare
 make[3] -C toolchain/gdb compile
 make[3] -C toolchain/binutils compile
 make[3] -C toolchain/uClibc prepare
 make[3] -C toolchain/uClibc/utils prepare
 make[3] -C toolchain/gdb install
 make[3] -C toolchain/gcc/initial prepare
 make[3] -C toolchain/gcc/final prepare
 make[3] -C toolchain/binutils install
 make[3] -C toolchain/gcc/minimal compile
 make[3] -C toolchain/kernel-headers compile
 make[3] -C toolchain/gcc/minimal install
 make[3] -C toolchain/kernel-headers install
 make[3] -C toolchain/uClibc/headers compile
 make[3] -C toolchain/uClibc/headers install
 make[3] -C toolchain/gcc/initial compile
 make[3] -C toolchain/gcc/initial install
 make[3] -C toolchain/uClibc compile
 make[3] -C toolchain/uClibc install
 make[3] -C toolchain/gcc/final compile
 make[3] -C toolchain/gcc/final install
 make[3] -C toolchain/uClibc/utils compile
 make[3] -C toolchain/uClibc/utils install
 make[2] target/compile
 make[3] -C target/linux compile
 make[2] package/compile
 make[3] -C package/libs/toolchain compile
 make[3] -C package/libs/ncurses host-compile
 make[3] -C package/system/opkg host-compile
 make[3] -C package/system/usign host-compile
 make[3] -C feeds/luci/modules/luci-base host-compile
 make[3] -C package/firmware/linux-firmware compile
 make[3] -C package/utils/lua host-compile
 make[3] -C package/libs/polarssl compile
 make[3] -C feeds/luci/protocols/luci-proto-ipv6 compile
 make[3] -C package/libs/ocf-crypto-headers compile
 make[3] -C package/network/services/dropbear compile
 make[3] -C package/libs/libpcap compile
 make[3] -C package/network/utils/linux-atm compile
 make[3] -C package/network/utils/resolveip compile
 make[3] -C package/utils/busybox compile
 make[3] -C package/utils/mkelfimage compile
 make[3] -C package/libs/libnl-tiny compile
 make[3] -C package/libs/libjson-c compile
 make[3] -C package/utils/lua compile
 make[3] -C package/libs/lzo compile
 make[3] -C package/libs/zlib compile
 make[3] -C package/libs/ncurses compile
 make[3] -C package/kernel/linux compile
 make[3] -C feeds/luci/libs/luci-lib-ip compile
 make[3] -C feeds/luci/libs/luci-lib-nixio compile
 make[3] -C feeds/luci/protocols/luci-proto-ppp compile
 make[3] -C feeds/luci/themes/luci-theme-bootstrap compile
 make[3] -C package/libs/openssl compile
 make[3] -C package/network/ipv6/odhcp6c compile
 make[3] -C package/network/services/dnsmasq compile
 make[3] -C package/network/services/ppp compile
 make[3] -C package/network/utils/iproute2 compile
 make[3] -C package/libs/libubox compile
 make[3] -C package/utils/util-linux compile
 make[3] -C package/utils/jsonfilter compile
 make[3] -C package/system/usign compile
 make[3] -C package/network/utils/iptables compile
 make[3] -C package/libs/ustream-ssl compile
 make[3] -C package/system/mtd compile
 make[3] -C package/system/ubus compile
 make[3] -C package/system/uci compile
 make[3] -C package/network/services/uhttpd compile
 make[3] -C package/libs/libevent2 compile
 make[3] -C package/network/services/odhcpd compile
 make[3] -C package/system/opkg compile
 make[3] -C package/network/config/netifd compile
 make[3] -C package/system/ubox compile
 make[3] -C package/utils/ubi-utils compile
 make[3] -C package/network/config/firewall compile
 make[3] -C package/network/utils/iwinfo compile
 make[3] -C feeds/packages/net/redsocks compile
 make[3] -C package/system/fstools compile
 make[3] -C package/system/procd compile
 make[3] -C feeds/luci/applications/luci-app-firewall compile
 make[3] -C package/system/rpcd compile
 make[3] -C package/base-files compile
 make[3] -C feeds/luci/modules/luci-base compile
 make[3] -C feeds/luci/modules/luci-mod-admin-full compile
 make[3] -C feeds/luci/collections/luci compile
 make[2] package/install
 make[3] package/preconfig
 make[2] target/install
 make[3] -C target/linux install
make -r world: build failed. Please re-run make with -j1 V=s to see what's going on
/home/user/OpenWRT/openwrt/include/toplevel.mk:181: ошибка выполнения рецепта для цели «world»
make: *** [world] Ошибка 1
Ага, ошибка, ладно наверно не хватает пакетов, запускаю make -j1 V=s, сначала все нормально, затем вижу следующее
grub-mkimage: error: cannot open `/home/user/OpenWRT/openwrt/staging_dir/host/lib/grub/i386-pc/moddep.lst': No such file or directory.
Makefile:234: recipe for target 'install' failed
make[5]: *** [install] Error 1
make[5]: Leaving directory '/home/user/OpenWRT/openwrt/target/linux/x86/image'
Makefile:22: recipe for target 'install' failed
make[4]: *** [install] Error 2
make[4]: Leaving directory '/home/user/OpenWRT/openwrt/target/linux/x86'
Makefile:13: recipe for target 'install' failed
make[3]: *** [install] Error 2
make[3]: Leaving directory '/home/user/OpenWRT/openwrt/target/linux'
target/Makefile:21: recipe for target 'target/linux/install' failed
make[2]: *** [target/linux/install] Error 2
make[2]: Leaving directory '/home/user/OpenWRT/openwrt'
target/Makefile:17: recipe for target '/home/user/OpenWRT/openwrt/staging_dir/target-i386_i486_uClibc-0.9.33.2/stamp/.target_install' failed
make[1]: *** [/home/user/OpenWRT/openwrt/staging_dir/target-i386_i486_uClibc-0.9.33.2/stamp/.target_install] Error 2
make[1]: Leaving directory '/home/user/OpenWRT/openwrt'
/home/user/OpenWRT/openwrt/include/toplevel.mk:181: ошибка выполнения рецепта для цели «world»
make: *** [world] Ошибка 2
Ему не хватает файла moddep.lst. Проверяю, всей директории grub/i386-pc/moddep.lst нету по указанному адресу. Делал по такой инструкции
mkdir ~/openwrt
cd ~/openwrt 
git clone git://git.openwrt.org/openwrt.git
make clean
make defconfig
make prereq
make menuconfig
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
make -j $(nproc)
В каталоге Build_dir/host/ отсутствует каталог lib/grub/i386-pc/moddep.lst если это важно. Что посоветуйте, в чем может быть причина? На двух форумах писал, ни на одном не помогли. Надежда на вас


У меня тоже ошибка, но другая :) Может, кто подскажет чего?

~/mikrotik/openwrt$ make
Makefile:2657: *** empty variable name.  Stop.
Makefile:24: recipe for target 'image-prereq' failed
make[5]: *** [image-prereq] Error 2
Makefile:13: recipe for target 'prereq' failed
make[4]: *** [prereq] Error 2
target/Makefile:21: recipe for target 'target/linux/prereq' failed
make[3]: *** [target/linux/prereq] Error 2
target/Makefile:15: recipe for target '/home/eugene/mikrotik/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.target_prereq' failed
make[2]: *** [/home/eugene/mikrotik/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.target_prereq] Error 2
/home/eugene/mikrotik/openwrt/include/toplevel.mk:178: recipe for target 'prereq' failed
make[1]: *** [prereq] Error 2
/home/eugene/mikrotik/openwrt/include/toplevel.mk:192: recipe for target 'world' failed
make: *** [world] Error 2

Gannet ★★★
()
Ответ на: комментарий от mky

Как я уже намучился с этой ошибкой. Добавил строку

[ -d $(STAGING_DIR_HOST)/lib/grub ] && mkdir -p $(PKG_BUILD_DIR)/staging_dir/host/lib && cp -a $(STAGING_DIR_HOST)/lib/grub $(PKG_BUILD_DIR)/staging_dir/host/lib
в файл target/imagebuilder/Makefile как было сказано в патче, все почистил, запускаю процесс компиляции, опять эта же ошибка, хоть ты тресни. Может попробовать другую версию исходников скачать? Все равно сборка тестовая, чтобы попробовать, посмотреть, все настроить, а потом уже под роутер собирать.

Pindos
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.