Search code examples
c++cmakemingw-w64assimp

Building ASSIMP with MinGW causes file too big error


I am building ASSIMP using cmake and mingw-w64 on windows 10 and it gives me "file too big" errors while creating the object code. I tried using MinGW and MinGW-w64 and both give me the same error. I am using the default settings, I configure the project with cmake, generate the makefile and then run mingw32-make. Is there some kind of flag I can set to fix this?

Compiler:

g++ (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0

Here is the output:

[ 59%] Building CXX object code/CMakeFiles/assimp.dir/Importer/StepFile/StepFileImporter.cpp.obj
[ 60%] Building CXX object code/CMakeFiles/assimp.dir/Importer/StepFile/StepFileGen1.cpp.obj
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/as.exe: 
CMakeFiles\assimp.dir\Importer\StepFile\StepFileGen1.cpp.obj: section .xdata$_ZNSt10_Head_baseILy0EPN6Assimp8StepFile29directed_dimensional_locationELb0EE7_M_headERKS4_: 
string table overflow at offset 10000029
C:\Users\ANDREW~1.NOT\AppData\Local\Temp\ccwwseVM.s: Assembler messages:
C:\Users\ANDREW~1.NOT\AppData\Local\Temp\ccwwseVM.s: Fatal error: can't close CMakeFiles\assimp.dir\Importer\StepFile\StepFileGen1.cpp.obj: File too big
mingw32-make[2]: *** [code\CMakeFiles\assimp.dir\build.make:2485: code/CMakeFiles/assimp.dir/Importer/StepFile/StepFileGen1.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:274: code/CMakeFiles/assimp.dir/all] Error 2
mingw32-make: *** [Makefile:129: all] Error 2

EDIT: I was using the master branch of Assimp from github, which has newer experimental features. I downloaded an older release version and I did not get the same errors.


Solution

  • This error is fixed by assimp itself https://github.com/assimp/assimp/issues/2406 Which version do you use?