Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9107213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:31:08+00:00 2026-06-17T02:31:08+00:00

I cannot seem to get this to work. I configured with the –with-gcc-toolchain= where

  • 0

I cannot seem to get this to work. I configured with the --with-gcc-toolchain= where after the equals I put the directory where gcc was (/usr/lib/gcc-snapshot/bin).

I also looked into the answers to ” clang linker problem” but I do not see how I can get the accepted answer to find the correct location, and the symlink answer would have worked, except that all of the directories that it is searching exist (copying the lib folder from gcc-snapshot to one of the include locations does not seem to help).

As suggested in the other question, the output of clang++ test.cpp -v:

bob@bob:~/programming$ clang++ test.cpp -v
clang version 3.3 (trunk 171350)
Target: x86_64-unknown-linux-gnu
Thread model: posix
“/home/bob/programming/build/Release+Asserts/bin/clang” -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name test.cpp -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.22 -momit-leaf-frame-pointer -v -resource-dir /home/bob/programming/build/Release+Asserts/bin/../lib/clang/3.3 -fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem /usr/local/include -internal-isystem /home/bob/programming/build/Release+Asserts/bin/../lib/clang/3.3/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/bob/programming -ferror-limit 19 -fmessage-length 80 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -o /tmp/test-PWiB4M.o -x c++ test.cpp
clang -cc1 version 3.3 based upon LLVM 3.3svn default target x86_64-unknown-linux-gnu
ignoring nonexistent directory “/include”
#include “…” search starts here:
#include <…> search starts here:
/usr/local/include
/home/bob/programming/build/Release+Asserts/bin/../lib/clang/3.3/include
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
test.cpp:1:10: fatal error: ‘iostream’ file not found
#include
^
1 error generated.

clang version 3.3 (trunk revision 171350)

EDIT: There are no .o files in the Release+Asserts folder for the build. Is this normal? If not, why is this the case, and how can I fix it (if I can point it as clang’s stdlib, then that works as well).

Edit 2: It also fails to compile int main(){return 0;} as it can’t find crtbegin.o. Full output is as follows:

/usr/bin/ld: cannot find crtbegin.o: No such file or directory
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lgcc_s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The results after -v are the same as the above, but with the ending error being different.

Config.log:
The full file can be found here, but the first (non-comment) line is: $ ../llvm/configure --with-gcc-toolchain=/usr/lib/gcc-snapshot/gcc

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T02:31:10+00:00Added an answer on June 17, 2026 at 2:31 am

    The issue that we’ve identified is that gcc was installed with –prefix=/usr/lib/gcc-snapshot configure argument. and llvm was configured with –with-gcc-toolchain=/usr/lib/gcc-snapshot/gcc argument. It should be the same as the gcc installation prefix, i.e. –with-gcc-toolchain=/usr/lib/gcc-snapshot.

    The question’s current first line says ” I configured with the –with-gcc-toolchain= where after the equals I put the directory where gcc was (/usr/lib/gcc-snapshot/bin).”, and the current last line says “first (non-comment) line is: $ ../llvm/configure –with-gcc-toolchain=/usr/lib/gcc-snapshot/gcc”

    That’s puzzling, you might have thought that you had put the flag –with-gcc-toolchain=/usr/lib/gcc-snapshot/bin but you had actually put –with-gcc-toolchain=/usr/lib/gcc-snapshot/gcc

    Regardless, I think you should try the following.

    1. remove or rename the build directory (the directory where you ran the configure command, i.e. the directory where you found the config.log file) I assume it’s the /home/bob/programming/build directory.
    2. now create /home/bob/programming/build directory again. it should be empty now.
    3. cd /home/bob/programming/build
    4. run the following configure command
      ../llvm/configure –with-gcc-toolchain=/usr/lib/gcc-snapshot
    5. follow through with the rest of your build process.

    The issue seems to be that you didn’t specify the gcc-toolchain prefix correctly. It should be the same as the –prefix parameter you used while configuring the gcc.

    Report back the results here.

    Also see Clang 3.2 build broken after building gcc 4.7

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get this code to work but cannot seem to get
I cannot seem to get this to work. Any thoughts? <html xmlns=http://www.w3.org/1999/xhtml> <head> <meta
I cannot seem to get this to work. I am using jquery to create
I cannot seem to get this to work. I have a small JS file
I cannot seem to get this to work, I have heard rumours that you
I cannot seem to get this script to work. Can anyone please help? The
I cannot seem to get this to work without the compiler yelling at me
I cannot seem to get this date picker working at all. I know it
I recently started with PHP Object Oriented and I cannot seem to get this
I cannot seem to get the quotes around this statement right. No matter what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.