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

Compiler race condition with liblua52 #268

Open
Zerkenn opened this issue Mar 17, 2025 · 0 comments · May be fixed by #270
Open

Compiler race condition with liblua52 #268

Zerkenn opened this issue Mar 17, 2025 · 0 comments · May be fixed by #270

Comments

@Zerkenn
Copy link

Zerkenn commented Mar 17, 2025

When compiling azerothcore with mod-eluna I get a random intermittent compilation failure that I believe is a race condition.
I clean build each time.
When compiling with make -j1 the issue never occurs HOWEVER when compiling with multiple threads make -j10 I randomly get this failure with linking liblua52.a

I have had this randomly occur on a ubuntu 24.04 docker container and a debian 12 vm.

I have limited knowledge with c++ so I figured I would report this. Providing the cmake list for mod eluna to chat gpt believes there is a race condition. Which I think is correct.

In src/lualib/lua/CMakeLists.txt line 71 to 78
Image

Image

Failure 1:

[  6%] Linking C static library liblua52.a
[  6%] Linking C static library liblua52.a
bfd plugin: LLVM gold plugin has failed to create LTO module: section table goes past the end of file
bfd plugin: LLVM gold plugin has failed to create LTO module: The end of the file was unexpectedly encountered
bfd plugin: LLVM gold plugin has failed to create LTO module: The end of the file was unexpectedly encountered
bfd plugin: LLVM gold plugin has failed to create LTO module: The end of the file was unexpectedly encountered
bfd plugin: LLVM gold plugin has failed to create LTO module: The end of the file was unexpectedly encountered
bfd plugin: LLVM gold plugin has failed to create LTO module: The end of the file was unexpectedly encountered
bfd plugin: LLVM gold plugin has failed to create LTO module: The end of the file was unexpectedly encountered
/usr/bin/ranlib: liblua52.a: error reading lvm.c.o: file truncated
make[2]: *** [modules/mod-eluna/src/lualib/lua/CMakeFiles/lualib.dir/build.make:594: modules/mod-eluna/src/lualib/lua/liblua52.a] Error 1
make[2]: *** Deleting file 'modules/mod-eluna/src/lualib/lua/liblua52.a'
[  6%] Built target lualib_static
make[1]: *** [CMakeFiles/Makefile2:658: modules/mod-eluna/src/lualib/lua/CMakeFiles/lualib.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Failure 2:

[  7%] Building C object modules/mod-eluna/src/lualib/lua/CMakeFiles/lualib_static.dir/__/__/__/__/__/_deps/lua52-src/src/lzio.c.o
[  7%] Building C object modules/mod-eluna/src/lualib/lua/CMakeFiles/lualib.dir/__/__/__/__/__/_deps/lua52-src/src/lzio.c.o
[  7%] Linking C static library liblua52.a
[  7%] Linking C static library liblua52.a
/usr/bin/ar: unable to copy file 'liblua52.a'; reason: No such file or directory
make[2]: *** [modules/mod-eluna/src/lualib/lua/CMakeFiles/lualib_static.dir/build.make:594: modules/mod-eluna/src/lualib/lua/liblua52.a] Error 1
make[1]: *** [CMakeFiles/Makefile2:684: modules/mod-eluna/src/lualib/lua/CMakeFiles/lualib_static.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
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

Successfully merging a pull request may close this issue.

1 participant