VLC for Windows, Build failure in modules: lld: error: unable to find library -latomic

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
johnddx
New Cone
New Cone
Posts: 1
Joined: 22 Mar 2023 20:51

VLC for Windows, Build failure in modules: lld: error: unable to find library -latomic

Postby johnddx » 22 Mar 2023 21:29

I've been trying to build vlc for the first time and have run into and gotten over a number of obstacles. This is the first issue I've encountered that has my wheels spinning.

Conditions:

  • Windows WSL2, ubuntu distribution (freshly installed)
  • Trying to build with LLVM toolchain, following guidance at https://code.videolan.org/videolan/vlc/ ... D-win32.md
  • Commit from master: [git]6d90eba09802335408154c56dec96e65b19c33e9 [/git](from 3/15, titled: demux: adaptive: fix language parsing)
  • Running build command: <gitroot>/extras/package/win32/build.sh -a x86_64
The build currently fails in the modules directory with:
lld: error: unable to find library -latomic
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)

I was able to enable verbosity to get the failing command-line:

Code: Select all

x86_64-w64-mingw32-gcc -shared .libs/libsoxr_plugin.dll.def ../modules/.libs/module.rc.o audio_filter/resampler/.libs/libsoxr_plugin_la-soxr.o ../compat/.libs/libcompat.a -L/mnt/c/Repos/vlc/build/contrib/x86_64-w64-mingw32/lib ../src/.libs/libvlccore.dll.a -lws2_32 -liphlpapi -lwinmm -luuid /mnt/c/Repos/vlc/build/contrib/x86_64-w64-mingw32/lib/libgpg-error.a -lssp -lsoxr -lavcodec -lgsm /mnt/c/Repos/vlc/build/contrib/x86_64-w64-mingw32/lib/libmp3lame.a -lopenjp2 -lpthread -lmfuuid -lstrmiids -lole32 -lz -lavutil -luser32 -lbcrypt -latomic -mms-bitfields -fstack-protector-strong -static -Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase -Wl,--high-entropy-va -Wl,--image-base -Wl,0x140000000 -o .libs/libsoxr_plugin.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libsoxr_plugin.dll.a

This command does indeed reproduce the error precisely. I was also able to make the command succeed by adding -L/usr/lib/gcc/x86_64-w64-mingw32/10-win32 to the end. At this point, I'm uncertain how to proceed. I don't know how the build is surviving this far without that lib directory in the search path... the command is able to find most libraries, presumably in the contrib build path already being supplied. Is the atomic lib supposed to be among them, or is this -L search location supposed to be added onto the command? Either way, why would it be failing for me and not for other configurations?

Any help appreciated...

Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 39 guests