Closed LeeWiu closed 9 years ago
I installed ubuntu x64 and get following error: failed to execute mipsel-linux-gccbug
NOTE: looking for files in which to fix hardcoded path to toolchain
Rebasing paths in: /home/thx/asuswrt-merlin/release/src/router/matrixssl/examples/Makefile
CC = /home/thx/asuswrt-merlin/tools/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc
STRIP = /home/thx/asuswrt-merlin/tools/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-strip
Rebasing paths in: /home/thx/asuswrt-merlin/release/src/router/matrixssl/src/Makefile
CC = /home/thx/asuswrt-merlin/tools/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc
STRIP = /home/thx/asuswrt-merlin/tools/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-strip
Rebasing paths in: /home/thx/asuswrt-merlin/release/src/router/wpa_supplicant-0.7.3/wpa_supplicant/defconfig
#CC=/home/thx/asuswrt-merlin/tools/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc
#CC=/home/thx/asuswrt-merlin/tools/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc
Rebasing paths in: /home/thx/asuswrt-merlin/release/src/router/wpa_supplicant/wpa_supplicant/defconfig
#CC=/home/thx/asuswrt-merlin/tools/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc
#CC=/home/thx/asuswrt-merlin/tools/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc
NOTE: skipping fixup of /home/thx/asuswrt-merlin/release/src-rt-6.x.4708/router/matrixssl/examples/Makefile (prior run detected)
NOTE: skipping fixup of /home/thx/asuswrt-merlin/release/src-rt-6.x.4708/router/matrixssl/src/Makefile (prior run detected)
NOTE: skipping fixup of /home/thx/asuswrt-merlin/release/src-rt-6.x.4708/router/wpa_supplicant-0.7.3/wpa_supplicant/defconfig (prior run detected)
NOTE: skipping fixup of /home/thx/asuswrt-merlin/release/src-rt-6.x.4708/router/wpa_supplicant/wpa_supplicant/defconfig (prior run detected)
NOTE: skipping fixup of /home/thx/asuswrt-merlin/release/src-rt-6.x/router/matrixssl/examples/Makefile (prior run detected)
NOTE: skipping fixup of /home/thx/asuswrt-merlin/release/src-rt-6.x/router/matrixssl/src/Makefile (prior run detected)
NOTE: skipping fixup of /home/thx/asuswrt-merlin/release/src-rt-6.x/router/wpa_supplicant-0.7.3/wpa_supplicant/defconfig (prior run detected)
NOTE: skipping fixup of /home/thx/asuswrt-merlin/release/src-rt-6.x/router/wpa_supplicant/wpa_supplicant/defconfig (prior run detected)
NOTE: skipping fixup of /home/thx/asuswrt-merlin/release/src-rt/router/matrixssl/examples/Makefile (prior run detected)
NOTE: skipping fixup of /home/thx/asuswrt-merlin/release/src-rt/router/matrixssl/src/Makefile (prior run detected)
NOTE: skipping fixup of /home/thx/asuswrt-merlin/release/src-rt/router/wpa_supplicant-0.7.3/wpa_supplicant/defconfig (prior run detected)
NOTE: skipping fixup of /home/thx/asuswrt-merlin/release/src-rt/router/wpa_supplicant/wpa_supplicant/defconfig (prior run detected)
ERROR: failed to execute mipsel-linux-gccbug
CLEANUP: extended cleanup of source tree changes
+ mv /home/thx/asuswrt-merlin/release/src/router/matrixssl/src/Makefile.BAK-build-image /home/thx/asuswrt-merlin/release/src/router/matrixssl/src/Makefile
+ mv /home/thx/asuswrt-merlin/release/src/router/matrixssl/examples/Makefile.BAK-build-image /home/thx/asuswrt-merlin/release/src/router/matrixssl/examples/Makefile
+ mv /home/thx/asuswrt-merlin/release/src/router/libxml2/configure.in.BAK-build-image /home/thx/asuswrt-merlin/release/src/router/libxml2/configure.in
+ mv /home/thx/asuswrt-merlin/release/src/router/wpa_supplicant/wpa_supplicant/defconfig.BAK-build-image /home/thx/asuswrt-merlin/release/src/router/wpa_supplicant/wpa_supplicant/defconfig
+ mv /home/thx/asuswrt-merlin/release/src/router/wpa_supplicant-0.7.3/wpa_supplicant/defconfig.BAK-build-image /home/thx/asuswrt-merlin/release/src/router/wpa_supplicant-0.7.3/wpa_supplicant/defconfig
You'll have to give me some more data. What exact version of Ubuntu. Something like uname -a
output would help.
The second one I have to investigate, the first one will be relatively easy to fix.
Okay, the second one is serious. Might mean your working copy isn't up-to-date. It's not fatal though, so I'm taking out the check for that program.
For the rest try this little patch and provide feedback regarding it:
diff --git a/ubuntu-build-image b/ubuntu-build-image
index b94aa71..3c8314b 100755
--- a/ubuntu-build-image
+++ b/ubuntu-build-image
@@ -89,7 +89,10 @@ let UBUREL=0x$(lsb_release -sr|tr -d '.')
((UBUREL >= 0x1204)) || fatal "expecting a ${W}Ubuntu >= 12.04{$Z} (precise)."
((UBUREL == 0x1404)) || echo -e "${Y}NOTE:${Z} this script has only been tested on Ubuntu 14.04. If you run it on a different platform, please report back if it works. But more importantly report back if it doesn't. Thanks."
# All those packages are required according to the asuswrt-merlin docs
-PREREQ_PKGS="autoconf automake bash bison bzip2 diffutils file flex g++ gawk gcc-multilib gettext gperf groff-base libncurses-dev libexpat1-dev libslang2 libssl-dev libtool libxml-parser-perl make patch perl pkg-config python sed shtool tar texinfo unzip zlib1g zlib1g-dev lib32z1-dev lib32stdc++6"
+PREREQ_PKGS="autoconf automake bash bison bzip2 diffutils file flex g++ gawk gcc-multilib gettext gperf groff-base libncurses-dev libexpat1-dev libslang2 libssl-dev libtool libxml-parser-perl make patch perl pkg-config python sed shtool tar texinfo unzip zlib1g zlib1g-dev"
+PREREQ_PKGS64BIT="lib32z1-dev lib32stdc++6"
+# On x86_64 we also need two additional packages
+[[ "x$(uname -m)" == "x86_64" ]] && PREREQ_PKGS="$PREREQ_PKGS $PREREQ_PKGS64BIT"
# On Ubuntu 13.10 and later we check for two additional packages
((UBUREL >= 0x1310)) && PREREQ_PKGS="$PREREQ_PKGS automake1.11 libproxy-dev"
# Did the user ask to install prerequisites instead?
@@ -132,7 +135,7 @@ fi
# Add the toolchain into the PATH
export PATH="$PATH:$TOOLCHAIN/bin"
# Check that the relevant tools execute from there
-for i in mipsel-linux-addr2line mipsel-linux-ar mipsel-linux-as mipsel-linux-c++ mipsel-linux-cc mipsel-linux-c++filt mipsel-linux-cpp mipsel-linux-g++ mipsel-linux-gcc mipsel-linux-gcc-4.2.4 mipsel-linux-gccbug mipsel-linux-gcov mipsel-linux-gprof mipsel-linux-ld mipsel-linux-nm mipsel-linux-objcopy mipsel-linux-objdump mipsel-linux-ranlib mipsel-linux-readelf mipsel-linux-size mipsel-linux-strings mipsel-linux-strip; do
+for i in mipsel-linux-addr2line mipsel-linux-ar mipsel-linux-as mipsel-linux-c++ mipsel-linux-cc mipsel-linux-c++filt mipsel-linux-cpp mipsel-linux-g++ mipsel-linux-gcc mipsel-linux-gcc-4.2.4 mipsel-linux-gcov mipsel-linux-gprof mipsel-linux-ld mipsel-linux-nm mipsel-linux-objcopy mipsel-linux-objdump mipsel-linux-ranlib mipsel-linux-readelf mipsel-linux-size mipsel-linux-strings mipsel-linux-strip; do
$i --version > /dev/null 2>&1 || fatal "failed to execute $i"
done
# Do the make
thx@ubuntu:~$ uname -a
Linux ubuntu 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntu:/home/thx/test/asuswrt-merlin# ./ubuntu-build-image RT-AC56U
NOTE: Attempting fixes for Ubuntu >= 13.10
configure.ac:52: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
m4/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from...
m4/libtool.m4:4160: _LT_LINKER_SHLIBS is expanded from...
m4/libtool.m4:5235: _LT_LANG_C_CONFIG is expanded from...
m4/libtool.m4:138: _LT_SETUP is expanded from...
m4/libtool.m4:67: LT_INIT is expanded from...
m4/libtool.m4:102: AC_PROG_LIBTOOL is expanded from...
configure.ac:52: the top level
configure.ac:52: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
m4/libtool.m4:4160: _LT_LINKER_SHLIBS is expanded from...
m4/libtool.m4:5235: _LT_LANG_C_CONFIG is expanded from...
m4/libtool.m4:138: _LT_SETUP is expanded from...
m4/libtool.m4:67: LT_INIT is expanded from...
m4/libtool.m4:102: AC_PROG_LIBTOOL is expanded from...
configure.ac:52: the top level
configure.ac:54: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
m4/attributes.m4:38: CC_CHECK_CFLAGS_SILENT is expanded from...
m4/attributes.m4:67: CC_CHECK_CFLAG_APPEND is expanded from...
m4/attributes.m4:78: CC_CHECK_CFLAGS_APPEND is expanded from...
configure.ac:54: the top level
configure.ac:80: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from...
m4/attributes.m4:87: CC_CHECK_LDFLAGS is expanded from...
m4/attributes.m4:104: CC_NOUNDEFINED is expanded from...
configure.ac:80: the top level
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
configure.in:69: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
m4/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from...
m4/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from...
m4/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from...
m4/libtool.m4:138: _LT_SETUP is expanded from...
m4/libtool.m4:67: LT_INIT is expanded from...
m4/libtool.m4:103: AM_PROG_LIBTOOL is expanded from...
configure.in:69: the top level
configure.in:69: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
m4/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from...
m4/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from...
m4/libtool.m4:138: _LT_SETUP is expanded from...
m4/libtool.m4:67: LT_INIT is expanded from...
m4/libtool.m4:103: AM_PROG_LIBTOOL is expanded from...
configure.in:69: the top level
NOTE: removing excess files
NOTE: looking for files in which to fix hardcoded path to toolchain
Rebasing paths in: /home/thx/test/asuswrt-merlin/release/src/router/matrixssl/examples/Makefile
CC = /home/thx/test/asuswrt-merlin/tools/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc
STRIP = /home/thx/test/asuswrt-merlin/tools/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-strip
Rebasing paths in: /home/thx/test/asuswrt-merlin/release/src/router/matrixssl/src/Makefile
CC = /home/thx/test/asuswrt-merlin/tools/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc
STRIP = /home/thx/test/asuswrt-merlin/tools/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-strip
Rebasing paths in: /home/thx/test/asuswrt-merlin/release/src/router/wpa_supplicant-0.7.3/wpa_supplicant/defconfig
#CC=/home/thx/test/asuswrt-merlin/tools/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc
#CC=/home/thx/test/asuswrt-merlin/tools/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc
Rebasing paths in: /home/thx/test/asuswrt-merlin/release/src/router/wpa_supplicant/wpa_supplicant/defconfig
#CC=/home/thx/test/asuswrt-merlin/tools/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc
#CC=/home/thx/test/asuswrt-merlin/tools/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc
NOTE: skipping fixup of /home/thx/test/asuswrt-merlin/release/src-rt-6.x.4708/router/matrixssl/examples/Makefile (prior run detected)
NOTE: skipping fixup of /home/thx/test/asuswrt-merlin/release/src-rt-6.x.4708/router/matrixssl/src/Makefile (prior run detected)
NOTE: skipping fixup of /home/thx/test/asuswrt-merlin/release/src-rt-6.x.4708/router/wpa_supplicant-0.7.3/wpa_supplicant/defconfig (prior run detected)
NOTE: skipping fixup of /home/thx/test/asuswrt-merlin/release/src-rt-6.x.4708/router/wpa_supplicant/wpa_supplicant/defconfig (prior run detected)
NOTE: skipping fixup of /home/thx/test/asuswrt-merlin/release/src-rt-6.x/router/matrixssl/examples/Makefile (prior run detected)
NOTE: skipping fixup of /home/thx/test/asuswrt-merlin/release/src-rt-6.x/router/matrixssl/src/Makefile (prior run detected)
NOTE: skipping fixup of /home/thx/test/asuswrt-merlin/release/src-rt-6.x/router/wpa_supplicant-0.7.3/wpa_supplicant/defconfig (prior run detected)
NOTE: skipping fixup of /home/thx/test/asuswrt-merlin/release/src-rt-6.x/router/wpa_supplicant/wpa_supplicant/defconfig (prior run detected)
NOTE: skipping fixup of /home/thx/test/asuswrt-merlin/release/src-rt/router/matrixssl/examples/Makefile (prior run detected)
NOTE: skipping fixup of /home/thx/test/asuswrt-merlin/release/src-rt/router/matrixssl/src/Makefile (prior run detected)
NOTE: skipping fixup of /home/thx/test/asuswrt-merlin/release/src-rt/router/wpa_supplicant-0.7.3/wpa_supplicant/defconfig (prior run detected)
NOTE: skipping fixup of /home/thx/test/asuswrt-merlin/release/src-rt/router/wpa_supplicant/wpa_supplicant/defconfig (prior run detected)
ERROR: failed to execute mipsel-linux-gccbug
CLEANUP: extended cleanup of source tree changes
+ mv /home/thx/test/asuswrt-merlin/release/src/router/matrixssl/src/Makefile.BAK-build-image /home/thx/test/asuswrt-merlin/release/src/router/matrixssl/src/Makefile
+ mv /home/thx/test/asuswrt-merlin/release/src/router/matrixssl/examples/Makefile.BAK-build-image /home/thx/test/asuswrt-merlin/release/src/router/matrixssl/examples/Makefile
+ mv /home/thx/test/asuswrt-merlin/release/src/router/libxml2/configure.in.BAK-build-image /home/thx/test/asuswrt-merlin/release/src/router/libxml2/configure.in
+ mv /home/thx/test/asuswrt-merlin/release/src/router/wpa_supplicant/wpa_supplicant/defconfig.BAK-build-image /home/thx/test/asuswrt-merlin/release/src/router/wpa_supplicant/wpa_supplicant/defconfig
+ mv /home/thx/test/asuswrt-merlin/release/src/router/wpa_supplicant-0.7.3/wpa_supplicant/defconfig.BAK-build-image /home/thx/test/asuswrt-merlin/release/src/router/wpa_supplicant-0.7.3/wpa_supplicant/defconfig
root@ubuntu:/home/thx/test/asuswrt-merlin#
This indicates that you didn't apply the patch or patching wasn't successful. The invocation of that tool has been completely removed, so this error would not occur after successful patching ;)
Give it a try with the latest commit on master.
Fixed with latest commit, I had all packages already installed but I guess the script will install them fine. Thanks
Thanks for the feedback! Much appreciated.
The script will just follow the recipe given on the Wiki. I guess I might adjust it to cater also Mint and Debian.
With fresh git clone:
root@ubuntu:/home/thx/test/asuswrt-merlin# uname -a
Linux ubuntu 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:36:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
make[5]: Entering directory `/home/thx/test/asuswrt-merlin/release/src/router/busybox'
SPLIT include/autoconf.h -> include/config/*
HOSTCC applets/usage
HOSTCC applets/applet_tables
applets/usage.c: In function ‘main’:
applets/usage.c:52:8: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(STDOUT_FILENO, usage_array[i].usage, strlen(usage_array[i].usage) + 1);
^
applets/applet_tables.c: In function ‘main’:
applets/applet_tables.c:144:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
fgets(line_old, sizeof(line_old), fp);
^
GEN include/bbconfigopts.h
GEN include/usage_compressed.h
GEN include/applet_tables.h
HOSTCC applets/usage_pod
CC applets/applets.o
/bin/sh: 1: arm-brcm-linux-uclibcgnueabi-gcc: not found
make[6]: *** [applets/applets.o] Error 127
make[6]: *** Waiting for unfinished jobs....
applets/usage_pod.c: In function ‘main’:
applets/usage_pod.c:74:3: warning: format not a string literal and no format arguments [-Wformat-security]
printf(usage_array[i].aname);
^
make[5]: *** [applets_dir] Error 2
make[5]: Leaving directory `/home/thx/test/asuswrt-merlin/release/src/router/busybox'
make[4]: *** [busybox] Error 2
make[4]: Leaving directory `/home/thx/test/asuswrt-merlin/release/src/router'
make[3]: *** [obj_prelibs] Error 2
make[3]: Leaving directory `/home/thx/test/asuswrt-merlin/release/src/router'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/thx/test/asuswrt-merlin/release/src-rt-6.x.4708'
make[1]: *** [bin] Error 2
make[1]: Leaving directory `/home/thx/test/asuswrt-merlin/release/src-rt-6.x.4708'
make: *** [rt-ac56u] Error 2
make: Leaving directory `/home/thx/test/asuswrt-merlin/release/src-rt-6.x.4708'
Your image can be found here:
release/src-rt-6.x.4708/image/*.trx
CLEANUP: extended cleanup of source tree changes
+ mv /home/thx/test/asuswrt-merlin/release/src/router/matrixssl/src/Makefile.BAK-build-image /home/thx/test/asuswrt-merlin/release/src/router/matrixssl/src/Makefile
+ mv /home/thx/test/asuswrt-merlin/release/src/router/matrixssl/examples/Makefile.BAK-build-image /home/thx/test/asuswrt-merlin/release/src/router/matrixssl/examples/Makefile
+ mv /home/thx/test/asuswrt-merlin/release/src/router/libxml2/configure.in.BAK-build-image /home/thx/test/asuswrt-merlin/release/src/router/libxml2/configure.in
+ mv /home/thx/test/asuswrt-merlin/release/src/router/wpa_supplicant/wpa_supplicant/defconfig.BAK-build-image /home/thx/test/asuswrt-merlin/release/src/router/wpa_supplicant/wpa_supplicant/defconfig
+ mv /home/thx/test/asuswrt-merlin/release/src/router/wpa_supplicant-0.7.3/wpa_supplicant/defconfig.BAK-build-image /home/thx/test/asuswrt-merlin/release/src/router/wpa_supplicant-0.7.3/wpa_supplicant/defconfig
Runtime: 0:44
root@ubuntu:/home/thx/test/asuswrt-merlin#
I'm not sure how this is related to this issue? Please elaborate, or open another issue for this.
It's debian-build-image script, should take care of all required packages and symlinks, no? I trying to compile firmware for rt-ac56u and I get this error: /bin/sh: 1: arm-brcm-linux-uclibcgnueabi-gcc: not found
Yes, but this issue is clearly about packages missing on x64. Closing. Feel free to open a new ticket with your latest report. If you don't do it, I'll do it myself.
I'll look into this a bit later tonight.
Just don't want to mix separate issues in a single ticket.
Note to self:
./release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2011.09/bin/arm-none-eabi-gcc
./release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3/bin/arm-brcm-linux-uclibcgnueabi-gcc
./release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3/bin/arm-linux-gcc
Running script on ubuntu x32 ./ubuntu-build-image RT-AC56U will output the following error:
lib32z1-dev and lib32stdc++6 are not available on x32 so you need to modify script. Thanks