c4ev3 / C4EV3.Toolchain

Recent GCC cross-compilers for the stock EV3
https://github.com/c4ev3/toolchain/releases
4 stars 1 forks source link

Make error when building binutils #4

Open l-yc opened 5 years ago

l-yc commented 5 years ago

Hi there, I've been trying to build the toolchain on Linux (Fedora 29) unsuccessfully so far. When I run the script 04-build-binutils.sh, the process eventually results in an error (pasted below)

make[4]: Leaving directory '/home/lyc/EV3/toolchain/build-binutils/gprof'
make[3]: Leaving directory '/home/lyc/EV3/toolchain/build-binutils/gprof'
make[2]: Leaving directory '/home/lyc/EV3/toolchain/build-binutils/gprof'
make[1]: Leaving directory '/home/lyc/EV3/toolchain/build-binutils'
make: *** [Makefile:850: all] Error 2
FAILED COMMAND: make -j4
a3f commented 5 years ago

Hi there. The original error message is missing, could you attach the whole log?

l-yc commented 5 years ago

Sorry for the late reply. After relooking at the error messages, I figured that I had to install flex and bison. Afterwards, after deleting the binutils and build-binutils directory and re-extracting the original tar archive to reset the environment, I managed to build the binutils successfully.

However, on attempting to execute 05-build-kernel-headers.sh, another error has occurred. Below is the full output:

  CHK     include/linux/version.h
make[1]: 'scripts/unifdef' is up to date.
make[3]: *** No rule to make target '/home/lyc/EV3/toolchain/linux-2.6.33-rc4/include/linux/netfilter/xt_CONNMARK.h', needed by '/opt/cross/arm-linux/include/linux/netfilter/.install'.  Stop.
make[2]: *** [/home/lyc/EV3/toolchain/linux-2.6.33-rc4/scripts/Makefile.headersinst:92: netfilter] Error 2
make[1]: *** [/home/lyc/EV3/toolchain/linux-2.6.33-rc4/scripts/Makefile.headersinst:92: linux] Error 2
make: *** [Makefile:1062: headers_install] Error 2

Am I missing anything? Thanks!

a3f commented 5 years ago

Could it be that you downloaded the files to a Windows/macOS system first? This StackOverflow answer suggests it might be due to case-insensitive file system related mangling.

Also, just to make sure you noticed: There are prebuilt toolchains in the releases tab, which you can use.