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

mingw-gcc-release64 build fails (MinGW x86_64 8.1.0 posix seh) #25

Open
Neonit opened this issue Jul 31, 2019 · 1 comment
Open

mingw-gcc-release64 build fails (MinGW x86_64 8.1.0 posix seh) #25

Neonit opened this issue Jul 31, 2019 · 1 comment

Comments

@Neonit
Copy link

Neonit commented Jul 31, 2019

I was trying to build bgfx with the mingw-gcc-release64 target, but it failed with the following error:

In file included from C:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/cmath:45,
                 from C:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/math.h:36,
                 from ../../../../bimg/3rdparty/astc/astc_averages_and_directions.cpp:19:
C:/mingw64/x86_64-w64-mingw32/include/math.h: In function 'int __isnanl(long double)':
C:/mingw64/x86_64-w64-mingw32/include/math.h:573:65: error: lvalue required as left operand of assignment
     xx = (int) (ld.ldt->lh.low | (ld.ldt->lh.high & 0x7fffffffu)); /* explicit */
                                                                 ^
make[2]: *** [bimg_encode.make:713: ../../win64_mingw-gcc/obj/x64/Release/bimg_encode/bimg/3rdparty/astc/astc_averages_and_directions.o] Error 1
make[1]: *** [Makefile:33: bimg_encode] Error 2
make[1]: Leaving directory 'E:/repositories/bgfx/bgfx/.build/projects/gmake-mingw-gcc'
make: *** [makefile:125: mingw-gcc-release64] Error 2

Don't know, if this is a MinGW issue or not, but in a past issue a similar (?) error has been fixed in this repo.

Before trying to build the release target, it built mingw-gcc-debug64 without errors by the way.

@Neonit Neonit changed the title Build fails with MinGW x86_64 8.1.0 posix seh mingw-gcc-release64 build fails (MinGW x86_64 8.1.0 posix seh) Jul 31, 2019
@Neonit
Copy link
Author

Neonit commented Aug 15, 2019

The above was tried with the default build files generated by running make without a target. make -n shows me that, by default, genie is run like ../bx/tools/bin/windows/genie --with-tools --with-combined-examples --with-shared-lib --gcc=mingw-gcc gmake.

I manually ran it like ../bx/tools/bin/windows/genie.exe --with-shared-lib --gcc=mingw-gcc gmake after deleting the .build directory and was able to make mingw-gcc-debug64 and mingw-gcc-release64 without errors. I think the problem described is within the tools or examples.

I feel this is not a good default or the documentation should mention it. Because with the default, a ~750 MB libspirv-optDebug.a and a ~500 MB shadercDebug.exe are also built. They are both not necessary for using the bgfx library and take a long time to build. By default, building with Visual Studio does not generate them, resulting in a much shorter build time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant