OpenWrt Forum Archive

Topic: Trouble compiling openwrt

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

I'm having some problems compiling OpenWRT.

When I run 'make', I get so far and then i get this:

make[3]: Entering directory '/home/a_wgaa/sources/openwrt/package/libs/libjson-c'
mkdir -p /home/a_wgaa/sources/openwrt/bin/mvebu/packages /home/a_wgaa/sources/openwrt/build_dir/target-arm-unknown-linux-gnu/json-c-0.12/ipkg-mvebu/libjson-c/CONTROL /home/a_wgaa/sources/openwrt/staging_dir/target-arm-unknown-linux-gnu/pkginfo
install -d -m0755 /home/a_wgaa/sources/openwrt/build_dir/target-arm-unknown-linux-gnu/json-c-0.12/ipkg-mvebu/libjson-c/usr/lib
cp -fpR /home/a_wgaa/sources/openwrt/build_dir/target-arm-unknown-linux-gnu/json-c-0.12/ipkg-install/usr/lib/libjson-c.so.* /home/a_wgaa/sources/openwrt/build_dir/target-arm-unknown-linux-gnu/json-c-0.12/ipkg-mvebu/libjson-c/usr/lib/
find /home/a_wgaa/sources/openwrt/build_dir/target-arm-unknown-linux-gnu/json-c-0.12/ipkg-mvebu/libjson-c -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
Package libjson-c is missing dependencies for the following libraries:
libc.so
Makefile:55: recipe for target '/home/a_wgaa/sources/openwrt/bin/mvebu/packages/base/libjson-c_0.12-1_mvebu.ipk' failed
make[3]: *** [/home/a_wgaa/sources/openwrt/bin/mvebu/packages/base/libjson-c_0.12-1_mvebu.ipk] Error 1
make[3]: Leaving directory '/home/a_wgaa/sources/openwrt/package/libs/libjson-c'
package/Makefile:191: recipe for target 'package/libs/libjson-c/compile' failed
make[2]: *** [package/libs/libjson-c/compile] Error 2
make[2]: Leaving directory '/home/a_wgaa/sources/openwrt'
package/Makefile:188: recipe for target '/home/a_wgaa/sources/openwrt/staging_dir/target-arm-unknown-linux-gnu/stamp/.package_compile' failed
make[1]: *** [/home/a_wgaa/sources/openwrt/staging_dir/target-arm-unknown-linux-gnu/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/a_wgaa/sources/openwrt'
/home/a_wgaa/sources/openwrt/include/toplevel.mk:191: recipe for target 'world' failed
make: *** [world] Error 2

I am using the following patch, but it shouldn't make a difference:

--- a/tmp/.config-package.in    2016-01-19 15:17:27.964628021 -0600
+++ b/tmp/.config-package.in    2016-01-19 15:43:22.634385006 -0600
@@ -29609,3 +29609,3 @@ menu "1. Collections"
         select PACKAGE_luci-mod-admin-full
-        select PACKAGE_luci-proto-ppp
+        select PACKAGE_luci-proto-ppp if PACKAGE_ppp
         select PACKAGE_luci-proto-ipv6 if IPV6
@@ -29613,3 +29613,3 @@ menu "1. Collections"
         select PACKAGE_librt if USE_GLIBC
-        select PACKAGE_luci-theme-bootstrap
+        select PACKAGE_luci-theme-material
         select PACKAGE_uhttpd
@@ -29621,3 +29621,3 @@ menu "1. Collections"
         help
-         Standard OpenWrt set including full admin with ppp support and the default Bootstrap theme
+         Standard OpenWrt set including full admin with the default Material theme

If you ask me, the above patch (or a variant thereof) should be integrated upstream. Not everybody needs or wants PPP support.

Regardless, any clue as to what dependencies are missing? I installed all packages according to the Buildroot wiki page, including the ones it doesn't explicitly check for.

Do you want me to post my .config?

Pixus wrote:

Please post output of ./scripts/diffconfig.sh .

Here you go:

CONFIG_TARGET_mvebu=y
CONFIG_TARGET_mvebu_Shelby=y
CONFIG_TARGET_BOARD="mvebu"
CONFIG_DEVEL=y
CONFIG_EXTERNAL_TOOLCHAIN=y
# CONFIG_FEED_management is not set
# CONFIG_FEED_routing is not set
# CONFIG_FEED_targets is not set
# CONFIG_FEED_telephony is not set
CONFIG_IMAGEOPT=y
# CONFIG_IPV6 is not set
# CONFIG_KERNEL_DEBUG_INFO is not set
# CONFIG_KERNEL_DEBUG_KERNEL is not set
# CONFIG_KERNEL_ELF_CORE is not set
# CONFIG_KERNEL_IPV6 is not set
# CONFIG_KERNEL_KALLSYMS is not set
# CONFIG_KERNEL_MAGIC_SYSRQ is not set
CONFIG_LIBC_FILE_SPEC="./lib/ld{-*.so,-linux*.so.*} ./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,resolv,util}{-*.so,.so.*}"
CONFIG_LIBC_ROOT_DIR="/home/a_wgaa/sources/openwrt/extchain"
CONFIG_LIBGCC_FILE_SPEC="./lib/libgcc_s.so.*"
CONFIG_LIBGCC_ROOT_DIR="/home/a_wgaa/sources/openwrt/extchain"
CONFIG_LIBSSP_FILE_SPEC="./lib/libssp.so.*"
CONFIG_LIBSSP_ROOT_DIR="/home/a_wgaa/sources/openwrt/extchain"
CONFIG_PACKAGE_kmod-fs-hfsplus=y
CONFIG_PACKAGE_kmod-fs-msdos=y
CONFIG_PACKAGE_kmod-fs-vfat=y
CONFIG_PACKAGE_kmod-nls-utf8=y
# CONFIG_PACKAGE_kmod-ppp is not set
CONFIG_PACKAGE_libiwinfo-lua=y
CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_libncurses=y
CONFIG_PACKAGE_libssp=y
CONFIG_PACKAGE_libubus-lua=y
CONFIG_PACKAGE_libuci-lua=y
CONFIG_PACKAGE_lua=y
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-lib-ip=y
CONFIG_PACKAGE_luci-lib-jsonc=y
CONFIG_PACKAGE_luci-lib-nixio=y
CONFIG_PACKAGE_luci-mod-admin-full=y
CONFIG_PACKAGE_luci-proto-ppp=n
CONFIG_PACKAGE_luci-theme-bootstrap=y
CONFIG_PACKAGE_luci-theme-material=y
CONFIG_PACKAGE_nano=y
# CONFIG_PACKAGE_ppp is not set
CONFIG_PACKAGE_rpcd=y
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_uhttpd=y
CONFIG_PACKAGE_uhttpd-mod-ubus=y
# CONFIG_PER_FEED_REPO_ADD_DISABLED is not set
CONFIG_SSP_SUPPORT=y
CONFIG_TARGET_NAME="arm-unknown-linux-gnu"
CONFIG_TOOLCHAIN_BIN_PATH="./usr/bin ./bin"
CONFIG_TOOLCHAIN_INC_PATH="./usr/include ./include"
CONFIG_TOOLCHAIN_LIBC="uclibc"
CONFIG_TOOLCHAIN_LIB_PATH="./usr/lib ./lib"
CONFIG_TOOLCHAIN_PREFIX="arm-unknown-linux-gnu-"
CONFIG_TOOLCHAIN_ROOT="/home/a_wgaa/sources/openwrt/extchain"
CONFIG_USE_EXTERNAL_LIBC=y
CONFIG_PACKAGE_kmod-lib-crc-ccitt=y
CONFIG_PACKAGE_libip6tc=y
CONFIG_USE_SSTRIP=y
# CONFIG_USE_STRIP is not set

(Last edited by WizKid on 20 Jan 2016, 23:50)

Are you intentionally using external toolchain and external libc instead of OpenWRT-provided (MUSL or GLIBC)?

Pixus wrote:

Are you intentionally using external toolchain and external libc instead of OpenWRT-provided (MUSL or GLIBC)?

It is OpenWRT-provided. got it from the trunk OpenWRT-Tollchain*

Compiling GCC takes *forever* on a VMware Fusion VM with 1.5GB of RAM and 1 core allocated (using a Core i7-4870HQ).

Does it have something to do with the toolchain being from January 6th?

(Last edited by WizKid on 21 Jan 2016, 00:00)

I am not sure how the external toolchain works, I am using full buildroot.
But this line in your config:
CONFIG_TARGET_NAME="arm-unknown-linux-gnu"

is different from what your toolchain archive has in it:
arm-openwrt-linux-muslgnueabi
.

Also, I believe you can build your own toolchain in under 24h, at least mine builds overnight inside VBox VM on i5 with -j3 flag.

Just a quick FYI that I am also having build problems. I've been trying on releases from the last couple of days. I'll post more details later:

make[3] -C tools/patchelf install
make[3] -C tools/mpfr compile
make[3] -C tools/bison compile
make -r world: build failed. Please re-run make with -j1 V=s to see what's going on
/home/user/proj/openwrt/openwrt-20160128173822-1/include/toplevel.mk:191: recipe for target 'world' failed
make: *** [world] Error 1
Command exited with non-zero status 2
481.55user 31.20system 2:33.72elapsed 333%CPU (0avgtext+0avgdata 374860maxresident)k
296296inputs+319672outputs (394major+7719705minor)pagefaults 0swaps

This a build on ar71xx target FYI

It shold be much faster install a linux system native or run live mode manjaro exsample provide all needed tools for build openwrt out of the box.
just download lates manjaro iso cp to a usb stick under windows rufus is nice tool to copy it.

Then openwrt with toolchain shold build under 30min ! smile EDIT: for one Target

(Last edited by trismo on 29 Jan 2016, 12:37)

WizKid wrote:

Compiling GCC takes *forever* on a VMware Fusion VM with 1.5GB of RAM and 1 core allocated (using a Core i7-4870HQ).

You could be right. However, it sure takes a much longer time to wait for a correct answer from forum replies to resolve your issue.

WizKid wrote:

Compiling GCC takes *forever* on a VMware Fusion VM with 1.5GB of RAM and 1 core allocated (using a Core i7-4870HQ).

I build OpenWrt images on my laptop with an i5 540M when I need one on the go. My usual build, which includes LuCI with some apps and their dependencies, OpenVPN and some other things totaling around 6.5 MB, takes ~3 hours to build - tools, toolchain and target binaries.

This thread is a week old. How much time have you saved so far? smile

(Last edited by makro on 29 Jan 2016, 16:58)

My issue turned out to be two problems: First, the Github outage over the last few days. That was actually causing my build to break because their website was going inaccessible (long after hours which they claim they were back up).

The second problem is that there is a bug in busybox vi when the "Enable regex in search and replace" option is enabled, which it is not by default.

I'll be filing a bug on that later one.

Ignore my previous post. It's not related to your issue. (unless it was the github outage too)

The discussion might have continued from here.