ARM-software / LLVM-embedded-toolchain-for-Arm

A project dedicated to building LLVM toolchain for Arm and AArch64 embedded targets.
Apache License 2.0
425 stars 98 forks source link

[bug] ninja llvm-toolchain fails on FreeBSD #569

Open n0madcoder opened 2 weeks ago

n0madcoder commented 2 weeks ago

First of all, it seems to be similar to what happens in issue #492 but the line mentioned there to be causing the problem is patched in the main branch I tried on, plus this happens in FreeBSD.

I'm attaching logs at the end of the text. cmake.log contains the output of the cmake instruction and ninja.log contains the output of the ninja command to build the lib.

System information:

Steps to reproduce:

$ git clone https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm.git
$ cd LLVM-embedded-toolchain-for-Arm
$ export CC=clang
$ export CXX=clang++
$ mkdir build && cd build
$ cmake .. -GNinja -DFETCHCONTENT_QUIET=OFF
$ ninja llvm-toolchain

And it seems to fail at this point in the process:

[3291/4496] Performing build step for 'picolibc_aarch64a'
...
[1090/1090] Generating newlib/libc_duplicates with a custom command
FAILED: newlib/libc_duplicates 
/home/n0mad/workspace/git-repos/LLVM-embedded-toolchain-for-Arm/build/_deps/picolibc-src/scripts/duplicate-names /usr/bin/nm newlib/libc.a newlib/libc_duplicates
Duplicate names in newlib/libc.a
0000000000000000 N $d
ninja: build stopped: subcommand failed.

It then attempts to continue for a bit (see ninja.log) but it ends up failing to an exit.

Not sure if being a picolibc build step this should be an issue on their repo too, or just keep it here.

cmake.log ninja.log

n0madcoder commented 6 hours ago

let's cc @keith-packard too since it seems to be more picolibc related. I'll try to deep dive a little on the building process and steps again during the weekend