OpenWrt Forum Archive

Topic: Compilation error for openwrt source code

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

Hello all,

I am a newbie as far as WRT is concerned. I am trying to compile source code for x86_64 platform with and VMDK image option.

I am facing following issue. Any help is really appreciated.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

install -d -m0755 /home/gaurav/OpenWrt/openwrt/tmp/stage-openssl/usr/include
cp -fpR /home/gaurav/OpenWrt/openwrt/build_dir/target-x86_64_uClibc-0.9.33.2/openssl-1.0.1j/ipkg-install/usr/include/openssl /home/gaurav/OpenWrt/openwrt/tmp/stage-openssl/usr/include/
install -d -m0755 /home/gaurav/OpenWrt/openwrt/tmp/stage-openssl/usr/lib/
cp -fpR /home/gaurav/OpenWrt/openwrt/build_dir/target-x86_64_uClibc-0.9.33.2/openssl-1.0.1j/ipkg-install/usr/lib/lib{crypto,ssl}.{a,so*} /home/gaurav/OpenWrt/openwrt/tmp/stage-openssl/usr/lib/
install -d -m0755 /home/gaurav/OpenWrt/openwrt/tmp/stage-openssl/usr/lib/pkgconfig
cp -fpR /home/gaurav/OpenWrt/openwrt/build_dir/target-x86_64_uClibc-0.9.33.2/openssl-1.0.1j/ipkg-install/usr/lib/pkgconfig/{openssl,libcrypto,libssl}.pc /home/gaurav/OpenWrt/openwrt/tmp/stage-openssl/usr/lib/pkgconfig/
[ -n "-L/home/gaurav/OpenWrt/openwrt/staging_dir/target-x86_64_uClibc-0.9.33.2/usr/lib -L/home/gaurav/OpenWrt/openwrt/staging_dir/target-x86_64_uClibc-0.9.33.2/lib -L/home/gaurav/OpenWrt/openwrt/staging_dir/toolchain-x86_64_gcc-4.8-linaro_uClibc-0.9.33.2/usr/lib -L/home/gaurav/OpenWrt/openwrt/staging_dir/toolchain-x86_64_gcc-4.8-linaro_uClibc-0.9.33.2/lib" ] && /home/gaurav/OpenWrt/openwrt/staging_dir/host/bin/sed -i -e 's#-L/home/gaurav/OpenWrt/openwrt/staging_dir/target-x86_64_uClibc-0.9.33.2/usr/lib -L/home/gaurav/OpenWrt/openwrt/staging_dir/target-x86_64_uClibc-0.9.33.2/lib -L/home/gaurav/OpenWrt/openwrt/staging_dir/toolchain-x86_64_gcc-4.8-linaro_uClibc-0.9.33.2/usr/lib -L/home/gaurav/OpenWrt/openwrt/staging_dir/toolchain-x86_64_gcc-4.8-linaro_uClibc-0.9.33.2/lib##g' /home/gaurav/OpenWrt/openwrt/tmp/stage-openssl/usr/lib/pkgconfig/{openssl,libcrypto,libssl}.pc || true
find /home/gaurav/OpenWrt/openwrt/tmp/stage-openssl -name '*.la' | xargs -r rm -f;
if [ -f /home/gaurav/OpenWrt/openwrt/staging_dir/target-x86_64_uClibc-0.9.33.2/packages/openssl.list ]; then /home/gaurav/OpenWrt/openwrt/scripts/clean-package.sh "/home/gaurav/OpenWrt/openwrt/staging_dir/target-x86_64_uClibc-0.9.33.2/packages/openssl.list" "/home/gaurav/OpenWrt/openwrt/staging_dir/target-x86_64_uClibc-0.9.33.2"; fi
if [ -d /home/gaurav/OpenWrt/openwrt/tmp/stage-openssl ]; then (cd /home/gaurav/OpenWrt/openwrt/tmp/stage-openssl; find ./ > /home/gaurav/OpenWrt/openwrt/tmp/stage-openssl.files);     SHELL= /home/gaurav/OpenWrt/openwrt/staging_dir/host/bin/flock /home/gaurav/OpenWrt/openwrt/tmp/.staging-dir.flock -c ' mv /home/gaurav/OpenWrt/openwrt/tmp/stage-openssl.files /home/gaurav/OpenWrt/openwrt/staging_dir/target-x86_64_uClibc-0.9.33.2/packages/openssl.list && cp -fpR /home/gaurav/OpenWrt/openwrt/tmp/stage-openssl/* /home/gaurav/OpenWrt/openwrt/staging_dir/target-x86_64_uClibc-0.9.33.2/; '; fi
rm -rf /home/gaurav/OpenWrt/openwrt/tmp/stage-openssl
touch /home/gaurav/OpenWrt/openwrt/staging_dir/target-x86_64_uClibc-0.9.33.2/stamp/.openssl_installed
make[3]: Leaving directory `/home/gaurav/OpenWrt/openwrt/package/libs/openssl'
make[2]: Leaving directory `/home/gaurav/OpenWrt/openwrt'
make[1]: *** [/home/gaurav/OpenWrt/openwrt/staging_dir/target-x86_64_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/gaurav/OpenWrt/openwrt'
make: *** [world] Error 2
gaurav@buddha:~/OpenWrt/openwrt$ ls

You missed the real error output

The 2 lines:

make[1]: *** [/home/gaurav/OpenWrt/openwrt/staging_dir/target-x86_64_uClibc-0.9.33.2/stamp/.package_compile] Error 2

make: *** [world] Error 2

are just aggregated error messages from something that went wrong earlier - if you compiled with multiple jobs (-j X) the last lines may not indicate error location at all

You can enable logging in Advanced configuration options, search in the logs/ directory for the file containing the "Error: " string and the post either the whole file to pastebin or the error messages there ( often its error is used with a ":" )

Not sure if its the same issue I had but when I added openssl-client to my build I got a build error.

I added the libxml parser to my server and its now building fine.

sudo apt-get install libxml-parser-perl

Thanks zloop.

I used make V=s 2>&1 | tee build.log | grep -i error for compilation and able to get the real issue.
Some of the urls were not reachable, so i had to manually download the packages and moved them into dl directory and it worked for me.

Just do a make BUILD_LOG=1 and the see what's in the log file.

The discussion might have continued from here.