WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: clang doesn't work out of the box on picore?  (Read 172 times)

Offline vext01

  • Newbie
  • *
  • Posts: 42
clang doesn't work out of the box on picore?
« on: October 23, 2026, 08:37:37 AM »
Hi,

Is it right that clang doesn't work out of the box on the latest picore?

Code: [Select]
$ cat a.c
int main(void) {}
$ clang a.c
/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

I'm sure I could figure out the right flags to pass to make that link, but shouldn't it just work?

Cheers

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15870
Re: clang doesn't work out of the box on picore?
« Reply #1 on: October 23, 2026, 09:57:26 AM »
Either llvm-config needs to be an actual file or clang-22 (the clang/clang++ symlinks will need to be re-made) or both.

Offline vext01

  • Newbie
  • *
  • Posts: 42
Re: clang doesn't work out of the box on picore?
« Reply #2 on: October 23, 2026, 11:00:37 AM »
Here's what I got from the fresh install of the clang extension earlier today:

Code: [Select]
$ ls -al `which llvm-config`
lrwxrwxrwx 1 root root 50 Jan  1  1970 /usr/local/bin/llvm-config -> /tmp/tcloop/llvm19-dev/./usr/local/bin/llvm-config
$ ls -al `which clang`
lrwxrwxrwx 1 root staff 39 Jan  1  1970 /usr/local/bin/clang -> /tmp/tcloop/clang/./usr/local/bin/clang
$ ls -al `which clang++`
lrwxrwxrwx 1 root staff 41 Jan  1  1970 /usr/local/bin/clang++ -> /tmp/tcloop/clang/./usr/local/bin/clang++

Sounds like a packaging issue?
« Last Edit: October 23, 2026, 11:10:52 AM by vext01 »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15870
Re: clang doesn't work out of the box on picore?
« Reply #3 on: October 23, 2026, 11:54:08 AM »
You could say this is a packaging issue, but the error does not appear all of the time.

Did you try my suggestion to see if it fixes the error?

Code: [Select]
cd /usr/local/bin
sudo rm llvm-config
sudo cp /tmp/tcloop/llvm19-dev/usr/local/bin/llvm-config ./
sudo rm clang-19 clang clang++
sudo cp /tmp/tcloop/clang/usr/local/bin/clang ./
sudo ln -s clang-19 clang
sudo ln -s clang-19 clang++