taisei-project / taisei

A free and open-source Touhou Project fangame
https://taisei-project.org/
Other
938 stars 88 forks source link

issue static-linking on msys2? #343

Open MagicalDrizzle opened 2 years ago

MagicalDrizzle commented 2 years ago

It seems I'm having trouble making a static build, the compile step is all good but the linking step fails...(the classic undefined reference) building from latest git

D:/msys2/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld.exe: D:/msys2/mingw32/lib/libshaderc_combined.a(compiler.cc.obj):(.text+0x5f93): undefined reference to `glslang::TProgram::~TProgram()'
D:/msys2/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld.exe: D:/msys2/mingw32/lib/libshaderc_combined.a(compiler.cc.obj):(.text+0x5f9e): undefined reference to `glslang::TShader::~TShader()'
D:/msys2/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld.exe: D:/msys2/mingw32/lib/libshaderc_combined.a(compiler.cc.obj):(.text.unlikely+0x555): undefined reference to `glslang::TShader::~TShader()'
D:/msys2/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld.exe: D:/msys2/mingw32/lib/libshaderc_combined.a(compiler.cc.obj):(.text.unlikely+0x591): undefined reference to `glslang::TProgram::~TProgram()'
D:/msys2/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld.exe: D:/msys2/mingw32/lib/libshaderc_combined.a(compiler.cc.obj):(.text.unlikely+0x59c): undefined reference to `glslang::TShader::~TShader()'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

(a bazillion similar lines before that but that'd be way too long for this post)

MagicalDrizzle commented 2 years ago

and compiling a non-static builds work just fine too so it's probably not an issue with the code itself...?

StarWitch commented 2 years ago

Unfortunately we don't directly support building on Windows, as most of our development crew are Linux and Mac-based.

One of the ways I've been working towards is to build Windows binaries and installers with a Docker container running a slightly modified version of the mstorsjo/llvm-mingw project's Docker image.

You can see process we use here, and the Dockerfile here.

You can also try building using Windows Subsystems for Linux by using an Ubuntu install and using the llvm-mingw toolchain linked above. You can reference the build options linked in the process I linked as well.

If you figure out what this issue is, we'll gladly review any Pull Requests you put up for it, though.

taehjoon commented 2 years ago

GLSL(OpenGL Shading Language) error can be occured by 'path', So check your OpenGL library is on your system path.