roblillack / spot

React-like desktop GUI toolkit for Go
MIT License
1.11k stars 17 forks source link

Failing to build a project on Windows 11 (undefined reference to "_setjmp") #29

Closed odwngit closed 1 month ago

odwngit commented 1 month ago

I tried to build a project with some base code, and this error occurs:


C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/ellio/go/pkg/mod/github.com/pwiecz/go-fltk@v0.0.0-20240511142305-990b442ae1ed/lib/windows/amd64/libfltk_images.a(Fl_JPEG_Image.cxx.obj):Fl_JPEG_Image.cxx:(.text+0x1bb): undefined reference to `_setjmp'
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/ellio/go/pkg/mod/github.com/pwiecz/go-fltk@v0.0.0-20240511142305-990b442ae1ed/lib/windows/amd64/libfltk_images.a(Fl_PNG_Image.cxx.obj):Fl_PNG_Image.cxx:(.text+0x137): undefined reference to `_setjmp'
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/ellio/go/pkg/mod/github.com/pwiecz/go-fltk@v0.0.0-20240511142305-990b442ae1ed/lib/windows/amd64/libfltk_png.a(png.c.obj):png.c:(.text+0x12e6): undefined reference to `_setjmp'
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/ellio/go/pkg/mod/github.com/pwiecz/go-fltk@v0.0.0-20240511142305-990b442ae1ed/lib/windows/amd64/libfltk_png.a(pngerror.c.obj):pngerror.c:(.text+0xb65): undefined reference to `_setjmp'
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/ellio/go/pkg/mod/github.com/pwiecz/go-fltk@v0.0.0-20240511142305-990b442ae1ed/lib/windows/amd64/libfltk_png.a(pngerror.c.obj):pngerror.c:(.text+0x15aa): undefined reference to `_setjmp'
collect2.exe: error: ld returned 1 exit status```
roblillack commented 1 month ago

Hi @odwngit, hmm, that's weird. Are you able to checkout https://github.com/pwiecz/go-fltk and successfully run go generate in there? If yes, you can try resolving the go-fltk dependency to your own checkout in your projects go.mod.

odwngit commented 1 month ago

Thank you! It was fixed through reinstalling some dependencies.