| Issue |
172024
|
| Summary |
"cannot find -lc++" error after following libc++ bootstrapping build install and compile command instructions
|
| Labels |
libc++
|
| Assignees |
|
| Reporter |
DavidSpickett
|
I did a build according to https://libcxx.llvm.org/VendorDocumentation.html#the-bootstrapping-build, including the install step.
Then I used https://libcxx.llvm.org/VendorDocumentation.html#the-default-build to compile a test program. Now I notice that it is before the boostrapping build, so maybe it is not intended for it, but it's what was closest.
```
$ /home/david.spickett/build-llvm-aarch64/bin/clang++ -nostdinc++ -isystem /home/david.spickett/llvm.install/include/c++/v1 -nostdlib++ -L /home/david.spickett/llvm.install/lib -lc++ -Wl,-rpath,/home/david.spickett/llvm.install/lib /tmp/test.cpp -o /tmp/test.o
/usr/bin/ld: cannot find -lc++: No such file or directory
```
The clang is from a separate build of llvm, not the one built during the bootstrap.
To fix this error I had to add my triple to the library path:
```
$ /home/david.spickett/build-llvm-aarch64/bin/clang++ -nostdinc++ -isystem /home/david.spickett/llvm.install/include/c++/v1 -nostdlib++ -L /home/david.spickett/llvm.install/lib/aarch64-unknown-linux-gnu/ -lc++ -Wl,-rpath,/home/david.spickett/llvm.install/lib /tmp/test.cpp -o /tmp/test.o
```
Not working: `-L /home/david.spickett/llvm.install/lib`
Working: `-L /home/david.spickett/llvm.install/lib/aarch64-unknown-linux-gnu/`
I did expect the libraries to be in `lib/<triple>` as AArch64 Linux uses the per target runtime directory layout.
So I wonder:
1. Is it ok to use https://libcxx.llvm.org/VendorDocumentation.html#using-the-just-built-libc with a boostrapping build (at least to smoke test it)?
2. Should there be a note saying that you may need the triple as part of the library path?
I can update the docs myself, just want to know I'm not causing my own problems first.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs