且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Clang链接器问题(从源到gcc-snapshot)

更新时间:2023-11-10 16:47:34

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

相关阅读

推荐文章