Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[Solved] ld.lld: error: undefinde symbol: main

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
Nima0908
Tux's lil' helper
Tux's lil' helper
Posts: 100
Joined: Mon Feb 24, 2025 7:47 pm

[Solved] ld.lld: error: undefinde symbol: main

  • Quote

Post by Nima0908 » Sun Mar 01, 2026 1:33 pm

Hello,
iam on a musl/llvm profile and recently had to install gcc to bootstrap rust (i need it for the kernel to use nova because of nvidia reasons). After depcleaning it, gcc still left the /etc/clang/gentoo-gcc-install.cfg residue file back like it typically does wuth the stale —gcc-install-dir variable which led to issues. with clang not working correctly. I then removed the file (which probaply wasnt smart) and added a empty one back because clang was complaining, which stopped clang complaining. But now, when running clang++ -v i get the error

Code: Select all

ld.lld: error: undefined symbol: main
>>> referenced by /lib/Scrt1.o: (_start_c)
ld.lld still seems to work fine, as iam able to still install software with it without any issue (i recompiled the whole llvm toolchain and installed rust and bindgen). But errors are never good so i was wondering if there is a way to fix this error. Thanks for your answers :)
Last edited by Nima0908 on Mon Mar 02, 2026 8:14 pm, edited 1 time in total.
Top
Nima0908
Tux's lil' helper
Tux's lil' helper
Posts: 100
Joined: Mon Feb 24, 2025 7:47 pm

  • Quote

Post by Nima0908 » Mon Mar 02, 2026 8:14 pm

Turn out the only thing that needs fixing is my severe lack of knowledge. clang++ -v does exactly what it should, what i should have been doing was clang++ —version.
Top
Post Reply

2 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic