Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Have you seen, been ablet to get rid of these warnings? #41

Open
Icantjuddle opened this issue Apr 23, 2024 · 1 comment
Open

Comments

@Icantjuddle
Copy link

I've been trying to use your flags to be able to build LLVM statically locally (in my case to get a static build of include-what-you-use). Incidentally while building I saw the following warning:

/usr/bin/ld: /tmp/clang-tblgen.mtd4W8.ltrans10.ltrans.o: in function `llvm::sys::fs::real_path(llvm::Twine const&, llvm::SmallVectorImpl<char>&, bool) [clone .part.0]':
<artificial>:(.text._ZN4llvm3sys2fs9real_pathERKNS_5TwineERNS_15SmallVectorImplIcEEb.part.0+0x4c5): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: <artificial>:(.text._ZN4llvm3sys2fs9real_pathERKNS_5TwineERNS_15SmallVectorImplIcEEb.part.0+0x848): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
[1043/2608] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/EarlyCSE.cpp.o

I'm wondering if you've seen this and if it is a concern or if perhaps I've misconfigured my code.

My configure command looks like:

cmake -S llvm -B iwyu_build -DCMAKE_BUILD_TYPE=Release -G 'Ninja' -DLLVM_ENABLE_PROJECTS=clang -DLLVM_EXTERNAL_PROJECTS=iwyu -DLLVM_EXTERNAL_IWYU_SOURCE_DIR=/<redacted>/iwyu_git/ -DPython3_EXECUTABLE="/<redacted>/bin/python" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_STATIC=ON -DCMAKE_CXX_FLAGS="-s -flto" -DBUILD_SHARED_LIBS=OFF
@muttleyxd
Copy link
Owner

To be honest, I haven't investigated it, I assume in this case #42 is relevant - you'd want to use a library which not a glibc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants