Link time build error with new ThreadPool code #9

Closed
opened 2024-12-06 07:42:26 -05:00 by rich · 1 comment

Todays test build on the ARM machine has highlighted a link time error for multiple definition of CaveGame::Client::ThreadPool::Start()'; probably introduced with yesterdays checkin of the Client ThreadPool class for AsyncChunkRender check in.

[ 91%] Linking CXX shared library libCaveClient.so
/usr/bin/ld: CMakeFiles/CaveClient.dir/src/Client/LocalWorld.cpp.o: in function CaveGame::Client::ThreadPool::Start()': LocalWorld.cpp:(.text+0x3f8): multiple definition of CaveGame::Client::ThreadPool::Start()'; CMakeFiles/CaveClient.dir/src/Client/GameSession.cpp.o:GameSession.cpp:(.text+0x3f8): first defined here
/usr/bin/ld: CMakeFiles/CaveClient.dir/src/Client/LocalWorld.cpp.o: in function CaveGame::Client::ThreadPool::ThreadLoop()': LocalWorld.cpp:(.text+0x560): multiple definition of CaveGame::Client::ThreadPool::ThreadLoop()'; CMakeFiles/CaveClient.dir/src/Client/GameSession.cpp.o:GameSession.cpp:(.text+0x560): first defined here
/usr/bin/ld: CMakeFiles/CaveClient.dir/src/Client/LocalWorld.cpp.o: in function CaveGame::Client::ThreadPool::QueueJob(std::function<void ()> const&)': LocalWorld.cpp:(.text+0x6b4): multiple definition of CaveGame::Client::ThreadPool::QueueJob(std::function<void ()> const&)'; CMakeFiles/CaveClient.dir/src/Client/GameSession.cpp.o:GameSession.cpp:(.text+0x6b4): first defined here
/usr/bin/ld: CMakeFiles/CaveClient.dir/src/Client/LocalWorld.cpp.o: in function CaveGame::Client::ThreadPool::busy()': LocalWorld.cpp:(.text+0x784): multiple definition of CaveGame::Client::ThreadPool::busy()'; CMakeFiles/CaveClient.dir/src/Client/GameSession.cpp.o:GameSession.cpp:(.text+0x784): first defined here
/usr/bin/ld: CMakeFiles/CaveClient.dir/src/Client/LocalWorld.cpp.o: in function CaveGame::Client::ThreadPool::Stop()': LocalWorld.cpp:(.text+0x810): multiple definition of CaveGame::Client::ThreadPool::Stop()'; CMakeFiles/CaveClient.dir/src/Client/GameSession.cpp.o:GameSession.cpp:(.text+0x810): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [Client/CMakeFiles/CaveClient.dir/build.make:285: Client/libCaveClient.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:1002: Client/CMakeFiles/CaveClient.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Todays test build on the ARM machine has highlighted a link time error for multiple definition of CaveGame::Client::ThreadPool::Start()'; probably introduced with yesterdays checkin of the Client ThreadPool class for AsyncChunkRender check in. [ 91%] Linking CXX shared library libCaveClient.so /usr/bin/ld: CMakeFiles/CaveClient.dir/src/Client/LocalWorld.cpp.o: in function `CaveGame::Client::ThreadPool::Start()': LocalWorld.cpp:(.text+0x3f8): multiple definition of `CaveGame::Client::ThreadPool::Start()'; CMakeFiles/CaveClient.dir/src/Client/GameSession.cpp.o:GameSession.cpp:(.text+0x3f8): first defined here /usr/bin/ld: CMakeFiles/CaveClient.dir/src/Client/LocalWorld.cpp.o: in function `CaveGame::Client::ThreadPool::ThreadLoop()': LocalWorld.cpp:(.text+0x560): multiple definition of `CaveGame::Client::ThreadPool::ThreadLoop()'; CMakeFiles/CaveClient.dir/src/Client/GameSession.cpp.o:GameSession.cpp:(.text+0x560): first defined here /usr/bin/ld: CMakeFiles/CaveClient.dir/src/Client/LocalWorld.cpp.o: in function `CaveGame::Client::ThreadPool::QueueJob(std::function<void ()> const&)': LocalWorld.cpp:(.text+0x6b4): multiple definition of `CaveGame::Client::ThreadPool::QueueJob(std::function<void ()> const&)'; CMakeFiles/CaveClient.dir/src/Client/GameSession.cpp.o:GameSession.cpp:(.text+0x6b4): first defined here /usr/bin/ld: CMakeFiles/CaveClient.dir/src/Client/LocalWorld.cpp.o: in function `CaveGame::Client::ThreadPool::busy()': LocalWorld.cpp:(.text+0x784): multiple definition of `CaveGame::Client::ThreadPool::busy()'; CMakeFiles/CaveClient.dir/src/Client/GameSession.cpp.o:GameSession.cpp:(.text+0x784): first defined here /usr/bin/ld: CMakeFiles/CaveClient.dir/src/Client/LocalWorld.cpp.o: in function `CaveGame::Client::ThreadPool::Stop()': LocalWorld.cpp:(.text+0x810): multiple definition of `CaveGame::Client::ThreadPool::Stop()'; CMakeFiles/CaveClient.dir/src/Client/GameSession.cpp.o:GameSession.cpp:(.text+0x810): first defined here collect2: error: ld returned 1 exit status make[2]: *** [Client/CMakeFiles/CaveClient.dir/build.make:285: Client/libCaveClient.so] Error 1 make[1]: *** [CMakeFiles/Makefile2:1002: Client/CMakeFiles/CaveClient.dir/all] Error 2 make: *** [Makefile:136: all] Error 2
Author

Today it builds fine, so, closing this case. Thank you if you fixed something and apologies if this was my mistake. Builds correctly on Ubuntu 24.04 GCC 14 on AMD and ARM.

Today it builds fine, so, closing this case. Thank you if you fixed something and apologies if this was my mistake. Builds correctly on Ubuntu 24.04 GCC 14 on AMD and ARM.
rich closed this issue 2024-12-07 07:13:26 -05:00
Sign in to join this conversation.
No description provided.