mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Qt 4.8.0-rc1


From: Tony Theodore
Subject: Re: [Mingw-cross-env-list] Qt 4.8.0-rc1
Date: Fri, 21 Oct 2011 21:45:31 +1100

On 20 October 2011 22:07, Mark Brand <address@hidden> wrote:
> On Thu, Oct 20, 2011 at 11:44 AM, Tony Theodore <address@hidden> wrote:
>> On 20 October 2011 01:59, Mark Brand <address@hidden> wrote:
>>> I haven't been able to spot the problem in your log file yet, but I wonder
>>> if you could try adding the option "-Winvalid-pch" to get more information
>>> about the problem.
>>
>> It outputs an extra warning line:
>>
>> cc1plus: warning: ./.obj/release-static/qt_pch.h.gch/c++: had text
>> segment at different address [enabled by default]
>> cc1plus: error: one or more PCH files were found, but they were invalid
>> cc1plus: fatal error: .obj/release-static/qt_pch.h: No such file or directory
>> compilation terminated.
>>
>> does that mean anything to you?
>>
>
> I'm afraid I don't know much about this either. Found similar problem
> with purported solution here:
>
> http://old.nabble.com/-Bug-c%2B%2B-39206---New%3A--gcc-fails-to-create-precompiled-header-file-td22042160.html

Hi Mark,

Thanks for the link, it turns out that address space randomization
doesn't play well with precompiled headers. After too many hours, I
couldn't find a way to disable this in OSX, or build a compiler that
isn't affected.

It looks as though not using the pch files is the only real solution
here, the changes below seem to work. The "-no-pch" doesn't need to be
conditional, since the qmake variable overrides it. I'm guessing we
want to use the pch files all other systems.

What do you think?

Thanks,

Tony

[1]diff -r e2dab26118f8 src/qt.mk
--- a/src/qt.mk Fri Oct 21 04:12:12 2011 +1100
+++ b/src/qt.mk Fri Oct 21 21:00:37 2011 +1100
@@ -27,6 +27,8 @@
     # There is no -system-gif option.
     #
     # For shared Qt with qt-zlib, add -lQtCore4 to end of
OPENSSL_LIBS to satisfy zlib dependency.
+    uname -sr | grep 'Darwin 11'>/dev/null && \
+        $(SED) -i 's,precompile_header,,'
'$(1)/mkspecs/unsupported/win32-g++-cross/qmake.conf'
     cd '$(1)' && \
         OPENSSL_LIBS="`'$(TARGET)-pkg-config' --libs-only-l openssl`" \
         PSQL_LIBS="-lpq -lsecur32 `'$(TARGET)-pkg-config'
--libs-only-l openssl` -lws2_32" \
@@ -69,6 +71,7 @@
         -system-sqlite \
         -openssl-linked \
         -dbus-linked \
+        -no-pch \
         -v

     $(MAKE) -C '$(1)' -j '$(JOBS)'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]