Error building gcc-4.8.5 from source

My apologies if this issue has been previously reported … I couldn’t find it.

The “build_glibc_stage1” errors out. I’m getting the following error message:

checking for suffix of object files… configure: error: in /Jetpack/src_aarch64_gcc-4.8.5/build-glibc1': configure: error: cannot compute suffix of object files: cannot compile See config.log’ for more details
make install-bootstrap-headers=yes install-headers
make: *** No rule to make target `install-headers’. Stop.
make install-bootstrap-headers=yes install-headers failed

Does anyone have a fix for this issue?

build_glibc_stage1.log (655 Bytes)
config.log (7.24 KB)

Hi nickgarnett,

Are you building gcc from source on non JTX2 DevKit?

No, I have an Ubuntu 64bit i86_64 machine. I’m trying to build the cross-compiler for the TX2. All of the steps previous to the “build_glibc_stage1” step completed successfully.

Are you referring to “Building the AARCH 64 Toolchain and glibc” section in https://developer.nvidia.com/embedded/dlc/l4t-documentation-27-1 ?

Unfortunately, though I downloaded and extracted “l4t-documentation-24-1.tar” I got distracted and did not look at the documentation. Now that I have, I see that I’m supposed to download the file “jetson-tx1-toolchain-build.tbz2”. I can’t find that file.

I downloaded the pre-built toolchain (“gcc-4.8.5-aarch64.tgz”), but wanted to build it, so I tried the source package (“src_aarch64_gcc-4.8.5.tar.gz”). I’ve been trying to build using that and encountered the issue I explain at the top of this ticket.

I found “jetson-tx1-toolchain-build.tbz2” … it was in a really obscure location.

I tried building the toolchain for “aarch64”. The following is the output from running the script:

~/jetson-tx1-toolchain-build/toolchain-build-aarch64$ ./make-aarch64-toolchain.sh
Downloading sources
Done
Applying patches
Done
Set environment
set_env
Done
Build binutils

There was an error in the “binutils” build. The specific error is that it couldn’t find “an acceptable gcc”. The default gcc is in the default location “/usr/bin”.

What is the “acceptable gcc”?

Hi nickgarnett,

For toolchain, you can download “gcc-4.8.5-aarch64.tgz” directly.
Download link: http://developer.nvidia.com/embedded/dlc/l4t-gcc-toolchain-64-bit-27-1

List my steps for you reference:
[Building toolchain]

  1. Download gcc-4.8.5-aarch64.tgz
  2. tar gcc-4.8.5-aarch64.tgz

[Building the Tegra Kernel]
export CROSS_COMPILE=<your gcc-4.8.5 link>/TX2_R27.1_build-kernel/Linux_for_Tegra/install/bin/aarch64-unknown-linux-gnu- export TEGRA_KERNEL_OUT=/TX2_R27.1_build-kernel/Linux_for_Tegra/kernel/out
$ export ARCH=arm64

mkdir source cp kernel_src.tbz2 /source
tar kernel_src.tbz2 cd kernel/kernel-4.4
make mrproper make O=TEGRA_KERNEL_OUT tegra18_defconfig make O=TEGRA_KERNEL_OUT zImage make O=TEGRA_KERNEL_OUT dtbs make O=TEGRA_KERNEL_OUT modules make O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=<your_destination>

You can refer “Building the NVIDIA Kernel” document guide:
Tegra Linux Driver Package Development Guide.html -> Advanced Setup and Customization -> Building the NVIDIA Kernel

Thank you. I will follow the HOWTO here and report back.