[Qt-interest] [Mingw-w64-public] "Memory exhausted" ld error when building Qt 4.8.0-rc1 with mingw-w64 4.7.0
K. Frank
kfrank29.c at gmail.com
Wed Oct 19 16:32:15 CEST 2011
Hello Lists!
I get the following error:
./tmp\obj\debug_shared\moc_qgraphicsanchorlayout.o: file not
recognized: Memory exhausted
in the build step that links QtGuid4.dll when trying to build Qt 4.8.0-rc1
with mingw-w64 4.7.0
Would anyone have some suggestions about how I might fix this?
(Task manager reported over 2 GB of available memory after the failed
build process exited. I don't know how much memory was in use during
the build.)
Would it be possible to configure the Qt build process slightly differently?
Would there be some way to run the offending link command manually,
maybe tweaking it a little, and then continuing with the build process?
I am trying to build Qt 4.8.0-rc1:
qt-everywhere-opensource-src-4.8.0-rc1.zip
with the mighty Ruben's std::thread-enabled 4.7.0 mingw-w64 build:
x86_64-w64-mingw32-gcc-4.7.0-stdthread_rubenvb.7z
I am running on 64-bit windows 7.
I ran the configure step for Qt thus:
configure -opensource -platform win32-g++ -debug-and-release
Note, I did have to patch the typo in pthread.h ("tm" --> "___tmp_tm") to
get past an earlier build error, as described in an earlier thread on this list:
http://sourceforge.net/mailarchive/message.php?msg_id=28124842
Here's the background on what I'm trying to accomplish:
I want to upgrade various parts of my development environment. I am
hoping to use a "late-model" g++ (hence the 4.7.0) to get as much
support for the new c++11 as I can. I specifically want support for
std::thread (hence Ruben's std::thread-enabled build).
I decided to give Qt 4.8.0 a try (rather than upgrading, for example, to
Qt 4.7.4) for no compelling reason, but I figured why not.
I can dial back on either the compiler or the Qt version, or downgrade to
32 bits from 64 bits, for that matter, to fix the problem, but my general
goal in the upgrade is to push forward as much as possible,
A little more detail:
The specific link command (from running mingw32-make) that fails is:
g++ -mthreads -shared
-Wl,--out-implib,c:\qt\4.8.0-rc1\lib\libQtGuid4.a -o
..\..\lib\QtGuid4.dll object_script.QtGuid.Debug
-L"c:\qt\4.8.0-rc1\lib" -L"c:\qt\4.8.0-rc1\lib" -lgdi32 -lcomdlg32
-loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -l uuid
-luser32 -ladvapi32 tmp\obj\debug_shared\QtGuid_resource_res.o
-lmsimg32 -lshell32 -lQtCored4
The resulting error message is:
./tmp\obj\debug_shared\moc_qgraphicsanchorlayout.o: file not
recognized: Memory exhausted
collect2.exe: error: ld returned 1 exit status
mingw32-make[2]: *** [..\..\lib\QtGuid4.dll] Error 1
For what it's worth (I doubt it matters), this failed link command occurs
immediately after the windres command for compiling QtGuid_resource_res.o:
windres -i QtGuid_resource.rc -o
tmp\obj\debug_shared\QtGuid_resource_res.o --include-dir=. -DQT_SHARED
-DQT_THREAD_SUPPORT -DUNICODE -DQT_LARGEFILE_SUPPORT
-DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_MAKEDLL
-DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT
-DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -D_USE_MATH_DEFINES
-DQT_NO_DIRECTDRAW -DQT_USE_BUNDLED_LIBPNG -DPNG_NO_ASSEMBLER_CODE
-DQT_NO_CUPS -DQT_NO_LPR -DQT_NO_OPENTYPE -DQT_NO_STYLE_MAC
-DQT_NO_STYLE_GTK -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE
-DQT_NO_STYLE_S60 -DQT_NO_EGL -DQ_INTERNAL_QAPP_SRC
-DQT_NO_DIRECTWRITE -DQT_DLL -DQT_CORE_LIB -DQT_HAVE_MMX
-DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2
Thanks for everyone's thoughts and advice.
K. Frank
More information about the Qt-interest-old
mailing list