WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Broken clang  (Read 206 times)

Offline CardealRusso

  • Full Member
  • ***
  • Posts: 178
Broken clang
« on: October 08, 2024, 08:26:04 AM »
Hi. After updating clang.tcz, I'm now getting the following error:
Code: [Select]
/usr/local/bin/ld: cannot find crtbeginS.o: No such file or directory

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14757
Re: Broken clang
« Reply #1 on: October 08, 2024, 08:34:02 AM »
Ah - if gcc is loaded, I suspect clang-19 needs to be an actual file rather than a symlink and the clang and clang++ symlinks need redoing to point to the actual file.

What does “clang -v” give before and after the above?

Offline CardealRusso

  • Full Member
  • ***
  • Posts: 178
Re: Broken clang
« Reply #2 on: October 08, 2024, 08:36:37 AM »
...
What does “clang -v” give before and after the above?
Code: [Select]
clang version 19.1.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /tmp/tcloop/clang/usr/local/bin
Build config: +assertions
System configuration file directory: /usr/local/etc/clang
 "/tmp/tcloop/clang/usr/local/bin/clang-19" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -dumpdir a- -disable-free -clear-ast-before-backend -main-file-name a.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/home/tc/fenstim/examples
-v -fcoverage-compilation-dir=/home/tc/fenstim/examples -resource-dir /tmp/tcloop/clang/usr/local/lib/clang/19 -internal-isystem /tmp/tcloop/clang/usr/local/lib/clang/19/include -internal-isystem /usr/local/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/a-bd359c.o -x c a.c
clang -cc1 version 19.1.0 based upon LLVM 19.1.0 default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /tmp/tcloop/clang/usr/local/lib/clang/19/include
 /usr/local/include
 /usr/include
End of search list.
 "/usr/local/bin/ld" --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -pie -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o a.out /usr/lib/Scrt1.o /usr/lib/crti.o crtbeginS.o -L/tmp/tcloop/clang/usr/local/lib/clang/19/lib/x86_64-unknown-linux-gnu -L/lib/../lib64 -L/lib -L/usr/lib /tmp/a-bd359c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed crtendS.o /usr/lib/crtn.o
/usr/local/bin/ld: cannot find crtbeginS.o: No such file or directory
/usr/local/bin/ld: cannot find -lgcc: No such file or directory
/usr/local/bin/ld: cannot find -lgcc: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Code: [Select]
programs: =/tmp/tcloop/clang/usr/local/bin
libraries: =/tmp/tcloop/clang/usr/local/lib/clang/19:/tmp/tcloop/clang/usr/local/lib/clang/19/lib/x86_64-unknown-linux-gnu:/lib/../lib64:/lib:/usr/lib
« Last Edit: October 08, 2024, 08:44:00 AM by CardealRusso »

Offline CardealRusso

  • Full Member
  • ***
  • Posts: 178
Re: Broken clang
« Reply #3 on: October 08, 2024, 08:47:53 AM »
Code: [Select]
sudo ln -s /usr/local/lib/gcc/ /usr/lib/It's enough. You can mark this thread as sovled.
« Last Edit: October 08, 2024, 09:00:06 AM by CardealRusso »