| Issue |
78955
|
| Summary |
Compile ldc with llvm-17.0.6 fail
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
Pro-pra
|
I see this error:
```
/usr/bin/g++ -std=c++17 -DDMDV2 -O2 -fomit-frame-pointer -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -fno-strict-aliasing -Wl,-O2 -Wl,--no-undefined "CMakeFiles/ldc-profgen.dir/llvm-profgen.cpp.o" "CMakeFiles/ldc-profgen.dir/PerfReader.cpp.o" "CMakeFiles/ldc-profgen.dir/CSPreInliner.cpp.o" "CMakeFiles/ldc-profgen.dir/ProfiledBinary.cpp.o" "CMakeFiles/ldc-profgen.dir/ProfileGenerator.cpp.o" "CMakeFiles/ldc-profgen.dir/MissingFrameInferrer.cpp.o" -o ../../../bin/ldc-profgen -lLLVM-17 -ldl -L/usr/lib64
/usr/bin/aarch64-rosa-linux-gnu-ld: CMakeFiles/ldc-profgen.dir/CSPreInliner.cpp.o: in function `llvm::sampleprof::CSPreInliner::processFunction(llvm::StringRef)':
CSPreInliner.cpp:(.text+0xa84): undefined reference to `llvm::SampleContextTracker::getContextString[abi:cxx11](llvm::sampleprof::FunctionSamples const&) const'
/usr/bin/aarch64-rosa-linux-gnu-ld: CSPreInliner.cpp:(.text+0xd44): undefined reference to `llvm::SampleContextTracker::getContextString[abi:cxx11](llvm::sampleprof::FunctionSamples const&) const'
/usr/bin/aarch64-rosa-linux-gnu-ld: CMakeFiles/ldc-profgen.dir/CSPreInliner.cpp.o: in function `llvm::sampleprof::CSPreInliner::run()::{lambda(llvm::SampleContextTracker&, bool)#1}::operator()(llvm::SampleContextTracker&, bool) const':
CSPreInliner.cpp:(.text+0xed8): undefined reference to `llvm::SampleContextTracker::getContextString[abi:cxx11](llvm::ContextTrieNode*) const'
collect2: error: ld returned 1 exit status
```
I not see `llvm::SampleContextTracker::getContextString symbols in my libllvm-17.so
I build llvm with options:
```
/usr/bin/cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_LIBDIR:PATH=lib64 -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DCMAKE_SKIP_RPATH:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF '-DCMAKE_MODULE_LINKER_FLAGS=-O2 -fomit-frame-pointer -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -fstack-protector-strong --param=ssp-buffer-size=4 -fno-strict-aliasing -Wl,-O2 -Wl,--no-undefined -Wl,--unresolved-symbols=ignore-all' -DINCLUDE_INSTALL_DIR:PATH=/usr/include/d -DCMAKE_CXX_FLAGS=-std=c++17
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs