taisei icon indicating copy to clipboard operation
taisei copied to clipboard

issue static-linking on msys2?

Open MagicalDrizzle opened this issue 2 years ago • 3 comments

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 avatar Apr 27 '22 16:04 MagicalDrizzle

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

MagicalDrizzle avatar Apr 27 '22 16:04 MagicalDrizzle

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.

StarWitch avatar May 01 '22 17:05 StarWitch

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

taehjoon avatar May 06 '22 13:05 taehjoon