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

Unable to build Windows release template (ld.lld: error: duplicate symbol: PKEY_Device_FriendlyName) #97882

Closed
TibAverus opened this issue Oct 6, 2024 · 6 comments · Fixed by #99036

Comments

@TibAverus
Copy link

Tested versions

4.3-stable 77dcf97 pulled from GitHub

System information

Windows 11 (23H2), llvm-mingw version 19.1.1

Issue description

Trying to build a release template from source will fail near the end with the following exception:

[100%] ERROR: ld.lld: error: duplicate symbol: PKEY_Device_FriendlyName
>>> defined at libdrivers.windows.template_release.x86_64.llvm.a(audio_driver_wasapi.windows.template_release.x86_64.llvm.o)
>>> defined at /home/runner/work/llvm-mingw/llvm-mingw/install/llvm-mingw/x86_64-w64-mingw32/include/functiondiscoverykeys_devpkey.h:21
>>>            libuuid.a(lib64_libuuid_a-uuid.o)
clang-19: error: linker command failed with exit code 1 (use -v to see invocation)

scons: *** [bin\godot.windows.template_release.x86_64.llvm.mono.exe] Error 1
scons: building terminated because of errors.

Command used to build:

scons platform=windows use_llvm=true use_mingw=yes mingw64_prefix=x86_64-w64-mingw32- arch=x86_64 target=template_release module_mono_enabled=yes

Steps to reproduce

  • Clone the godot source files
  • Switch to the 4.3-stable tag
  • Build using the following command: scons platform=windows use_llvm=true use_mingw=yes mingw64_prefix=x86_64-w64-mingw32- arch=x86_64 target=template_release module_mono_enabled=yes

Minimal reproduction project (MRP)

Not applicable

@not6
Copy link

not6 commented Oct 21, 2024

Same issue here

  • Windows 10 x64 22H2
  • llvm-mingw release 20241015 with LLVM 19.1.2
  • Godot 4.3-stable (77dcf97) and latest 4.3 as of writing (6699ae7), haven't tried any other

scons platform=windows target=template_release arch=x86_64 use_mingw=yes use_llvm=yes production=yes

@not6
Copy link

not6 commented Oct 22, 2024

Builds fine with regular MinGW-w64

@TibAverus
Copy link
Author

Builds fine with regular MinGW-w64

Can you tell me what you mean by this? I would really like to get it working as my release is held back by this, as I'm not able to encrypt my assets without a custom release template.

@not6
Copy link

not6 commented Oct 23, 2024

Builds fine with regular MinGW-w64

Can you tell me what you mean by this? I would really like to get it working as my release is held back by this, as I'm not able to encrypt my assets without a custom release template.

I mean regular MinGW with GCC rather than LLVM/Clang. Builds just fine for me, it just takes a while to link but no errors or any other issues
Don't forget to remove use_llvm=yes as well when you do

@AeioMuch
Copy link
Contributor

I have the same bug and that's with regular MinGW GCC no LLVM/Clang. It was working before but I guess it probably broke after I updated it ?

It is not hard to workaround tho. Just open audio_driver_wasapi.cpp and remove the PKEY_Device_FriendlyName define part.

@roalyr
Copy link

roalyr commented Nov 10, 2024

Getting the same error cross-compiling for windows both ways: #98822

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
6 participants