mstorsjo / llvm-mingw

An LLVM/Clang/LLD based mingw-w64 toolchain
Other
1.96k stars 187 forks source link

possible llvm-rc wrapper bug or llvm-rc itself #184

Closed ZachBacon closed 3 years ago

ZachBacon commented 3 years ago

So I managed to come across a small issue where llvm-rc is choking on an rc file, I'm not sure if this is a bug in the wrapper or within llvm-rc itself

FAILED: src/wx/CMakeFiles/visualboyadvance-m.dir/wxvbam.rc.obj C:\msys64\clang64\bin\windres.exe -O coff -DBKPT_SUPPORT -DC_CORE -DENABLE_NLS -DFINAL_VERSION -DGBA_LOGGING -DHAVE_ARPA_INET_H -DHAVE_NETINET_IN_H -DHAVE_ZLIB_H -DLOCALEDIR=\"C:/msys64/opt/vba-m/share/locale\" -DNDEBUG -DNO_ASM -DNO_D3D -DNO_FAUDIO -DNO_FFMPEG -DNO_LINK -DNO_OGL -DPACKAGE="" -DPKGDATADIR=\"C:/msys64/opt/vba-m/share/vbam\" -DSDL -DSFML_STATIC -DSYSCONF_INSTALL_DIR=\"C:/msys64/opt/vba-m/etc\" -DUSE_OPENGL -DWITH_LIRC=0 -D_FILE_OFFSET_BITS=64 -D__AMD64__ -D__STDC_FORMAT_MACROS -D__WXMSW__ -I C:/Users/zacht/Documents/mingw/visualboyadvance-m/dependencies/mingw-include -I C:/Users/zacht/Documents/mingw/visualboyadvance-m/dependencies/mingw-xaudio/include -I C:/Users/zacht/Documents/mingw/visualboyadvance-m/build -I C:/msys64/clang64/x86_64-w64-mingw32/include -I C:/Users/zacht/Documents/mingw/visualboyadvance-m/fex -I C:/msys64/clang64/x86_64-w64-mingw32/include/SDL2 -I C:/Users/zacht/Documents/mingw/visualboyadvance-m/third_party/include/stb -I C:/msys64/clang64/x86_64-w64-mingw32/include/AL -I C:/Users/zacht/Documents/mingw/visualboyadvance-m/src/wx/widgets -I C:/Users/zacht/Documents/mingw/visualboyadvance-m/build/src/wx -I C:/Users/zacht/Documents/mingw/visualboyadvance-m/src/wx -I C:/Users/zacht/Documents/mingw/visualboyadvance-m/dependencies/WinSparkle-0.6.0/include -I C:/msys64/clang64/x86_64-w64-mingw32/lib/wx/include/msw-unicode-static-3.1 -I C:/msys64/clang64/x86_64-w64-mingw32/include/wx-3.1 C:/Users/zacht/Documents/mingw/visualboyadvance-m/src/wx/wxvbam.rc src/wx/CMakeFiles/visualboyadvance-m.dir/wxvbam.rc.obj llvm-rc: Error in 24 statement (ID 1): Is a directory windres: error: llvm-rc failed

I've also included the resource file to see what you think of it.

wxvbam.txt

mstorsjo commented 3 years ago

This file depends on includes that you didn't provide. Can you provide a minimal reproducible example of the error?

mstorsjo commented 3 years ago

It's rather hard to speculate on what the error might be, when half of the file also consists of macros that are defined elsewhere, so there's no way to guess what e.g. WINSPARKLE_DLL_PATH expands to, and whether that's an issue or not.

ZachBacon commented 3 years ago

I'll see about removing the block, I know gnu LD and Microsoft's linker generally are ok with it, but at this point I'll try anything to see if it'll work.

As for includes they are stored on our git repo https://github.com/visualboyadvance-m/dependencies and https://github.com/visualboyadvance-m/visualboyadvance. I'm only testing mingw clang out of curiousity and managed to get this far after compiling the dependencies on my own.

mstorsjo commented 3 years ago

I'll go ahead and close this one as there's nothing reproducible I can act on here. There's a chance it's covered by other llvm-rc bug reports, possibly https://bugs.llvm.org/show_bug.cgi?id=51944, but if you manage to boil it down to something I can reproduce, that'd of course be even better.

ZachBacon commented 3 years ago

Yeah Jeremy suspects that as my issue when I talked with him on the msys2 discord, it was reproducable on their clang toolchain too. I might be able to do something similar, but to be honest it should just work. For now I'll just keep an eye on that bug report Jeremy made.