Cross-compile questions

I am trying to cross-compile aircrack-ng for the GL-AR300M

To inovke Make -

sudo make CC=/home/dev/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-gcc CXX=/home/dev/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-c++ LD=/home/dev/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-ld

Returns -

make -C src all
make[1]: Entering directory ‘/home/dev/openwrt/package/trunk/src’
/home/dev/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-gcc -g -W -Wall -O3 -DOLD_SSE_CORE=1 -pthread -D_FILE_OFFSET_BITS=64 -D_REVISION=2913 -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude -c -o aircrack-ng.o aircrack-ng.c
mips-openwrt-linux-uclibc-gcc: warning: environment variable ‘STAGING_DIR’ not defined
/home/dev/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-gcc -g -W -Wall -O3 -DOLD_SSE_CORE=1 -pthread -D_FILE_OFFSET_BITS=64 -D_REVISION=2913 -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude -c -o cpuid.o cpuid.c
mips-openwrt-linux-uclibc-gcc: warning: environment variable ‘STAGING_DIR’ not defined
/home/dev/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-gcc -g -W -Wall -O3 -DOLD_SSE_CORE=1 -pthread -D_FILE_OFFSET_BITS=64 -D_REVISION=2913 -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude -c -o crypto.o crypto.c
mips-openwrt-linux-uclibc-gcc: warning: environment variable ‘STAGING_DIR’ not defined
/home/dev/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-gcc -g -W -Wall -O3 -DOLD_SSE_CORE=1 -pthread -D_FILE_OFFSET_BITS=64 -D_REVISION=2913 -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude -c -o common.o common.c
mips-openwrt-linux-uclibc-gcc: warning: environment variable ‘STAGING_DIR’ not defined
/home/dev/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-gcc -g -W -Wall -O3 -DOLD_SSE_CORE=1 -pthread -D_FILE_OFFSET_BITS=64 -D_REVISION=2913 -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude -c -o uniqueiv.o uniqueiv.c
mips-openwrt-linux-uclibc-gcc: warning: environment variable ‘STAGING_DIR’ not defined
/home/dev/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-gcc -g -W -Wall -O3 -DOLD_SSE_CORE=1 -pthread -D_FILE_OFFSET_BITS=64 -D_REVISION=2913 -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude -c -o sha1-sse2.o sha1-sse2.S
mips-openwrt-linux-uclibc-gcc: warning: environment variable ‘STAGING_DIR’ not defined
/home/dev/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-gcc -g -W -Wall -O3 -DOLD_SSE_CORE=1 -pthread -D_FILE_OFFSET_BITS=64 -D_REVISION=2913 -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude -c -o aircrack-ptw-lib.o aircrack-ptw-lib.c
mips-openwrt-linux-uclibc-gcc: warning: environment variable ‘STAGING_DIR’ not defined
/home/dev/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-c++ -g -W -Wall -O3 -DOLD_SSE_CORE=1 -pthread -D_FILE_OFFSET_BITS=64 -D_REVISION=2913 -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude -fdata-sections -ffunction-sections -c -o linecount.o linecount.cpp
mips-openwrt-linux-uclibc-c++: warning: environment variable ‘STAGING_DIR’ not defined
ar cru liblinecount.a linecount.o
ar: u’ modifier ignored sinceD’ is the default (see `U’)
ranlib liblinecount.a
touch liblinecount.a
/home/dev/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-gcc -g -W -Wall -O3 -DOLD_SSE_CORE=1 -pthread -D_FILE_OFFSET_BITS=64 -D_REVISION=2913 -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude aircrack-ng.o cpuid.o crypto.o common.o uniqueiv.o sha1-sse2.o aircrack-ptw-lib.o liblinecount.a -o aircrack-ng -lpthread -lssl -lcrypto -lstdc++
/home/dev/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.8.3/…/…/…/…/mips-openwrt-linux-uclibc/bin/ld: cannot find -lssl
/home/dev/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.8.3/…/…/…/…/mips-openwrt-linux-uclibc/bin/ld: cannot find -lcrypto
/home/dev/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.8.3/…/…/…/…/mips-openwrt-linux-uclibc/bin/ld: cannot find -lssp_nonshared
/home/dev/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.8.3/…/…/…/…/mips-openwrt-linux-uclibc/bin/ld: cannot find -lssp
collect2: error: ld returned 1 exit status
Makefile:181: recipe for target ‘aircrack-ng’ failed
make[1]: *** [aircrack-ng] Error 1
make[1]: Leaving directory '/home/dev/openwrt/package/trunk/src’
Makefile:25: recipe for target ‘all’ failed
make: *** [all] Error 2

dev@bpT61 ~/openwrt/package/trunk/src $ file *.o
aircrack-ng.o: ELF 32-bit MSB relocatable, MIPS, MIPS-I version 1 (SYSV), not stripped
aircrack-ptw-lib.o: ELF 32-bit MSB relocatable, MIPS, MIPS-I version 1 (SYSV), not stripped
common.o: ELF 32-bit MSB relocatable, MIPS, MIPS-I version 1 (SYSV), not stripped
cpuid.o: ELF 32-bit MSB relocatable, MIPS, MIPS-I version 1 (SYSV), not stripped
crypto.o: ELF 32-bit MSB relocatable, MIPS, MIPS-I version 1 (SYSV), not stripped
linecount.o: ELF 32-bit MSB relocatable, MIPS, MIPS-I version 1 (SYSV), not stripped
sha1-sse2.o: ELF 32-bit MSB relocatable, MIPS, MIPS-I version 1 (SYSV), not stripped
uniqueiv.o: ELF 32-bit MSB relocatable, MIPS, MIPS-I version 1 (SYSV), not stripped

I am new at this so I have a few questions:

1 - Looking at the source code, I was a able to take care of all of the missing include objects that were being kicked out at the compile. Now that those have been resolved, I am seeing the link errors.
2 - Do the missing link objects need to go in the same folders that the originally missing compile objects went?
3 - As I am new to this, any guidance on which packages I need to look at given the errors kicked out?

Thank you.

First, I think aircrack-ng is in the default repo of AR300M firmware. So you can just install using opkg, unless you want to use a newer version.

Second, it is not recommended to cross compile manually. It is recommended to use openwrt’s way to compile a package. You can refer to aircrack-ng’s openwrt package for reference.

I need to use a more current version of aircrack-ng than what is available with my USB150.The information about compiling a single package (https://oldwiki.archive.openwrt.org/doc/howtobuild/single.package) uses nano as an example.
How does the system know what nano is when I type in
make package/nano/compile
make package/nano/install

Do I have to edit a file someplace to add references for aicrack-ng-1.5.2?

Thank you.

You can follow the instructions here how to download the sdk:

You want to copy the following package to gl_sdk/ar71xx/package :slight_smile:

Then just follow the instructions how to compile the package :slight_smile:

Thank you. I installed the SDK and got quite a bit further.
Here is a dump of the errors produced when I tried to Make the package.
I took care of the -Wformat warnings but I still get the other errors.

I am new at this so I don’t know if there is any significance to the cannot execute binary file errors as it sort of makes sense to me as I am compiling on a 386 platform.

Is there a standard fix for whatever is causing the Error2 at the bottom?

Thank you.

/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/xargs: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/xargs: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/find: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/find: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/xargs: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/xargs: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/mkhash: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/mkhash: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
Collecting package info: done
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/find: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/find: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/xargs: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/xargs: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/xargs: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/xargs: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/mkhash: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/mkhash: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
Collecting target info: done
make[2]: Entering directory ‘/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/scripts/config’
conf.c: In function ‘check_stdin’:
conf.c:78:3: warning: format not a string literal and no format arguments [-Wformat-security]
printf(_(“aborted!\n\n”));
^~~~~~
conf.c:79:3: warning: format not a string literal and no format arguments [-Wformat-security]
printf(_(“Console input/output is redirected. “));
^~~~~~
conf.c:80:3: warning: format not a string literal and no format arguments [-Wformat-security]
printf(_(“Run ‘make oldconfig’ to update configuration.\n\n”));
^~~~~~
conf.c: In function ‘conf_askvalue’:
conf.c:90:3: warning: format not a string literal and no format arguments [-Wformat-security]
printf(_(”(NEW) “));
^~~~~~
conf.c: In function ‘conf_choice’:
conf.c:291:5: warning: format not a string literal and no format arguments [-Wformat-security]
printf(_(” (NEW)”));
^~~~~~
conf.c: In function ‘check_conf’:
conf.c:439:6: warning: format not a string literal and no format arguments [-Wformat-security]
printf(_("\n Restart config…\n*\n"));
^~~~~~
conf.c: In function ‘main’:
conf.c:620:6: warning: format not a string literal and no format arguments [-Wformat-security]
_("\n*** The configuration requires explicit update.\n\n"));
^
conf.c:674:4: warning: format not a string literal and no format arguments [-Wformat-security]
fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
^~~~~~~
conf.c:678:4: warning: format not a string literal and no format arguments [-Wformat-security]
fprintf(stderr, _("\n*** Error during update of the configuration.\n\n"));
^~~~~~~
conf.c:689:4: warning: format not a string literal and no format arguments [-Wformat-security]
fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
^~~~~~~
make[2]: Leaving directory ‘/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/scripts/config’

configuration written to .config

make[1]: Entering directory ‘/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx’
make[1]: *** No rule to make target ‘package/aircrack-ng-1.5.2/compile’. Stop.
make[1]: Leaving directory ‘/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx’
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/include/toplevel.mk:209: recipe for target ‘package/aircrack-ng-1.5.2/compile’ failed
make: *** [package/aircrack-ng-1.5.2/compile] Error 2
bpark@bpT61:~/openwrt-cc/toolchain/gl_sdk/ar71xx$

Check the Makefile and Config.in files. Make sure you didn’t download the github HTML code by mistake and not the actual files. If you did wget, remember you need the “raw” file link in github.

./scripts/feeds install libnl-core libnl-genl zlib
mkdir package/aircrack-ng
cd package/aircrack-ng
wget https://raw.githubusercontent.com/openwrt/packages/master/net/aircrack-ng/Config.in
wget https://raw.githubusercontent.com/openwrt/packages/master/net/aircrack-ng/Makefile
cd ../../
make package/aircrack-ng/compile V=s

However the package seems to be broken. You should contact the package maintainer via email and ask him to fix it:

Rick Farina zerochaos@gentoo.org

Get the following errors when I ran the install line:
bpark@bpT61:~/openwrt-cc/toolchain/gl_sdk/ar71xx$ sudo ./scripts/feeds install libnl-core libnl-gen1 zlib
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/xargs: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/xargs: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/find: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/find: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/xargs: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/xargs: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/mkhash: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/mkhash: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/sed: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/find: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/find: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/xargs: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/xargs: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/xargs: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/xargs: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/mkhash: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: cannot execute binary file: Exec format error
/home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/mkhash: line 5: /home/bpark/openwrt-cc/toolchain/gl_sdk/ar71xx/staging_dir/host/bin/…/lib/ld-linux-x86-64.so.2: Success
Ignoring feed ‘base’ - index missing
Ignoring feed ‘gli_pub’ - index missing
Ignoring feed ‘packages’ - index missing
Ignoring feed ‘luci’ - index missing
Ignoring feed ‘routing’ - index missing
Ignoring feed ‘telephony’ - index missing
WARNING: No feed for package ‘libnl-core’ found
WARNING: No feed for package ‘libnl-gen1’ found
WARNING: No feed for package ‘zlib’ found

Thank you.

Don’t run it with sudo :slight_smile:

Are you using Ubuntu 18.04 LTS 64bit?

1 Like

18.04.03 LTS 32bit

Well that is the problem. You MUST use 64bit Ubuntu for any type of compilation. It is written at the top of the guide under system requirements.

1 Like

Excellent! This is a project I’ve had to pick up and put down a few times over a few years.
I’d as soon start over again.

Where (URL) should I go to build a cross compiler from scratch?

Thank you.

I actually don’t know. You would need to make a cross compiler from 32bit to MIPS which is not easy.

It is better if you reinstall your system as 64bit as you should have from the beginning. There is no reason to use a 32bit system in 2019, even since like 2013.

You probably shouldn’t…

You might consider just spinning up a VM on another box, getting an amd64 distro running, and go from there.

You are late to the party there bro, he already made a new thread where he updated to the 64bit system

yeah - this popped up on my recent item list…