llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[main] Linker error while building unit tests for Clang: `DirectoryWatcherTest`

Open hamidelmaazouz opened this issue 10 months ago • 5 comments

ld.lld: error: undefined symbol: clang::DirectoryWatcher::create(llvm::StringRef, std::function<void (llvm::ArrayRef<clang::DirectoryWatcher::Event>, bool)>, bool)
>>> referenced by DirectoryWatcherTest.cpp:486 (/home/helmaazouz/repositories/personal/llvm/llvm-project/clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp:486)
>>>               tools/clang/unittests/AllClangUnitTests.lto.o:(DirectoryWatcherTest_InvalidatedWatcherAsync_Test::TestBody())
>>> referenced by DirectoryWatcherTest.cpp:450 (/home/helmaazouz/repositories/personal/llvm/llvm-project/clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp:450)
>>>               tools/clang/unittests/AllClangUnitTests.lto.o:(DirectoryWatcherTest_InvalidatedWatcher_Test::TestBody())
>>> referenced by DirectoryWatcherTest.cpp:428 (/home/helmaazouz/repositories/personal/llvm/llvm-project/clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp:428)
>>>               tools/clang/unittests/AllClangUnitTests.lto.o:(DirectoryWatcherTest_DeleteWatchedDir_Test::TestBody())
>>> referenced 5 more times
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Build settings:

CMakeUserPresets.json

cd $LLVM_REPO/llvm
cp ~/Downloads/CMakeUserPresets.json .
cmake --preset llvm-rwdi
cmake --build build/llvm-rwdi

hamidelmaazouz avatar Jan 27 '26 21:01 hamidelmaazouz

@hamidelmaazouz can i work on this ??

bala-bhargav avatar Jan 28 '26 13:01 bala-bhargav

@hamidelmaazouz can i work on this ??

Yes absolutely, go for it.

hamidelmaazouz avatar Jan 28 '26 14:01 hamidelmaazouz

Hey @hamidelmaazouz , #178455 this is my PR link .

bala-bhargav avatar Jan 28 '26 16:01 bala-bhargav

I'd like to work on this. Is it still available?

cs25mtech12013-commits avatar May 05 '26 10:05 cs25mtech12013-commits

This is already fixed. See 507d1856ccef4193ed48edabc010fe4661c9216c.

boomanaiden154 avatar May 06 '26 01:05 boomanaiden154