Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Dec 2022 00:12:40 +0100
From:      Alain Zscheile <zseri.devel+fbsd@ytrizja.de>
To:        freebsd-current@FreeBSD.org
Subject:   all_subdir_lib/libclang_rt build failure (libc++ ld error)
Message-ID:  <91c3d49d-5d69-8c04-0269-908f31689748@ytrizja.de>

next in thread | raw e-mail | index | archive | help
Hello,

I encountered a build failure while trying to build fbsd'
src.git commit ae521fda895ff0b5076904f08ec92e3c60d53701
with `make -j4 buildworld` on an FreeBSD 13.1 system.

<snip>
--- all_subdir_lib/libclang_rt ---
ld: error: /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libc++.so:2:
   cannot find /usr/lib/libc++.so.1 inside
   /usr/obj/usr/src/amd64.amd64/tmp
>>> GROUP ( /usr/lib/libc++.so.1 /usr/lib/libcxxrt.so )
>>>         ^
c++: error: linker command failed with exit code 1
   (use -v to see invocation)

make[2]: stopped in /usr/src
</snip>

The stated file is indeed not present, and resides in .../tmp/lib
instead of .../tmp/usr/lib. It appears that the .so linker script
should either be patched (to point to /lib instead of /usr/lib) or
a symlink for the .so.1 file should be created.
(at least the corresponding c++ command line doesn't indicate
  anything to the contrary of that afaik)

I don't know when this problem was introduced and it might be the
case that this bootstrapping problem only occurs when the "outside
system" (in this case FreeBSD 13.1) has an older version of clang.
(as I'm not really sure when the bootstrapping process actually
  kicks in, as it appears to have omitted building a linker when it
  detected that the current one is recent enough/matches)
It might also be that case that this is just the result of a
missing dependency, which messes with parallel building, idk...

Regards,
Alain Zscheile



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?91c3d49d-5d69-8c04-0269-908f31689748>