Mark Brand | 1 Jun 01:00 2010
Picon

Re: Qt 4.7 (help wanted)


>>>>
>>>> QMAKE_CFLAGS = -pipe -isystem /usr/i686-pc-mingw32/include
>>>>
>>>> I would like to avoid having to specify the full path this way. Does
>>>> anyone know of a way to put the intended directory in the include path
>>>> without resorting to this?
>>> Since "/usr/i686-pc-mingw32/include" is already in our GCC's
>>> system include path, I don't see a need for that option at all.
>>>
>>> Without having tested, I'm pretty sure you can simplify the line to:
>>>
>>>      QMAKE_CFLAGS = -pipe
>>
>> That's what I thought too, but then this happens when building Qt:
>>
>> make[2]: Entering directory 
>>
`/home/brand/projects/mingw-cross-env.dev/qt47/tmp-qt/qt-everywhere-opensource-src-4.7.0-beta1/src/corelib' 
>>
>> i686-pc-mingw32-g++ -c -include .pch/release-static/qt_pch.h -pipe 
>> -O2 -Wall -frtti -fexceptions -mthreads -DQT_THREAD_SUPPORT -DUNICODE 
>> -DQT_LARGEFILE_SUPPORT -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE 
>> -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT 
>> -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION 
>> -D_USE_MATH_DEFINES -DHB_EXPORT=Q_CORE_EXPORT -DQT_HAVE_MMX 
>> -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 
>> -DQT_NO_DEBUG -I'../../include' -I'../../include/QtCore' 
>> -I'.rcc/release-static' -I'tmp' -I'global' 
>> -I'../3rdparty/harfbuzz/src' -I'../3rdparty/md5' -I'../3rdparty/md4' 
(Continue reading)

Tony Theodore | 1 Jun 01:08 2010

Re: error when compiling gcc

On 1 June 2010 03:56, hoijui <hoijui.quaero@...> wrote:
> thanks a lot Tony!
>
> did that, and attached the error log.
> to make it short, it fails with the same error, so yeah... i guess you
> are right with gentoo having a problem there. :/

Try the attached gcc.mk file. It basically forces PKGVERSION to drop
the ending space. There's no way to do this using --with-pkg-version,
configure intentionally adds the space, and the gcc/Makefile suggests
that version.c is sensitive to spacing and quoting.

It may work for you, though I'm not sure it's a real solution.

Tony
Attachment (gcc.mk): application/octet-stream, 2796 bytes
Volker Grabsch | 1 Jun 01:16 2010

Re: Qt 4.7 (help wanted)

Mark Brand <mabrand@...> schrieb:
>>>> Here is the line:
>>>>
>>>> QMAKE_CFLAGS = -pipe -isystem /usr/i686-pc-mingw32/include
[...]
>>> Without having tested, I'm pretty sure you can simplify the line to:
>>>
>>>      QMAKE_CFLAGS = -pipe
[...]
>> Is the "#include <float.h>" in tools/qlocale.cpp picking up  a  
>> different float.h?
>
> This float.h seems to be in the way:
>
> usr/lib/gcc/i686-pc-mingw32/4.5.0/include/float.h

The bug report at

    http://bugreports.qt.nokia.com/browse/QTBUG-5670

proposes to copy the float.h from usr/i686-pc-mingw32/include/ to
qt-.../include/, But I guess this is even less "clean" than your
current approach of replacing that absolute include path.

Maybe someone else has an idea on that issue?

Greets,
Volker

--

-- 
(Continue reading)

Mark Brand | 1 Jun 01:57 2010
Picon

Re: Qt 4.7 (help wanted)


> The bug report at
>
>      http://bugreports.qt.nokia.com/browse/QTBUG-5670
>
> proposes to copy the float.h from usr/i686-pc-mingw32/include/ to
> qt-.../include/, But I guess this is even less "clean" than your
> current approach of replacing that absolute include path.
>
> Maybe someone else has an idea on that issue?

This looks like an important clue. I compared the system include paths 
of gcc in mingw-cross-env with  those from the Nokia/Qt's 
MinGW-gcc440_1.zip. Somehow theirs has the directories in the order that 
should work for float.h:

gcc-4.40 from Qt
  wine cpp.exe -v < /dev/null
Using built-in specs.
Target: mingw32
Configured with: ../gcc-4.4.0/configure 
--enable-languages=c,ada,c++,fortran,java,objc,obj-c++ 
--disable-sjlj-exceptions --enable-shared --enable-libgcj 
--enable-libgomp --with-dwarf2 --disable-win32-registry 
--enable-libstdcxx-debug --enable-version-specific-runtime-libs 
--prefix=/mingw --with-gmp=/mingw/src/gmp/root 
--with-mpfr=/mingw/src/mpfr/root --build=mingw32
Thread model: win32
gcc version 4.4.0 (GCC)
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=i386'
(Continue reading)

Mark Brand | 1 Jun 02:02 2010
Picon

Re: Qt 4.7 (help wanted)


>> The bug report at
>>
>>      http://bugreports.qt.nokia.com/browse/QTBUG-5670
>>
>> proposes to copy the float.h from usr/i686-pc-mingw32/include/ to
>> qt-.../include/, But I guess this is even less "clean" than your
>> current approach of replacing that absolute include path.
>>
>> Maybe someone else has an idea on that issue?
>

That bug report is about mingw-w64, so it might not be directly related 
to our situation with mingw. But it's probably not completely unrelated 
either.

-Mark

Tony Theodore | 1 Jun 11:00 2010

Re: error when compiling gcc

On 1 June 2010 09:08, Tony Theodore <tonyt@...> wrote:
> On 1 June 2010 03:56, hoijui <hoijui.quaero@...> wrote:
>> thanks a lot Tony!
>>
>> did that, and attached the error log.
>> to make it short, it fails with the same error, so yeah... i guess you
>> are right with gentoo having a problem there. :/
>
> Try the attached gcc.mk file. It basically forces PKGVERSION to drop
> the ending space. There's no way to do this using --with-pkg-version,
> configure intentionally adds the space, and the gcc/Makefile suggests
> that version.c is sensitive to spacing and quoting.
>
> It may work for you, though I'm not sure it's a real solution.

Actually, it won't work, somehow the dangling space remains.

Tony

Volker Grabsch | 1 Jun 11:55 2010

Re: Qt 4.7 (help wanted)

Mark Brand <mabrand@...> schrieb:
> This looks like an important clue. I compared the system include paths  
> of gcc in mingw-cross-env with  those from the

> Nokia/Qt's MinGW-gcc440_1.zip. [...]
[...]
> #include <...> search starts here:
>  z:\home\brand\projects\junk2\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include
>  z:\home\brand\projects\junk2\mingw\bin\../lib/gcc/mingw32/4.4.0/include
>  z:\home\brand\projects\junk2\mingw\bin\../lib/gcc/mingw32/4.4.0/include-fixed
>  z:\home\brand\projects\junk2\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../mingw32/include
> End of search list.
[...]
> gcc-4.50 mingw-cross-env
> i686-pc-mingw32-cpp -v < /dev/null
> ....
> #include <...> search starts here:
>  /home/brand/projects/mingw-cross-env.dev/qt47/usr/lib/gcc/i686-pc-mingw32/4.5.0/include
>  /home/brand/projects/mingw-cross-env.dev/qt47/usr/lib/gcc/i686-pc-mingw32/4.5.0/include-fixed
>  /home/brand/projects/mingw-cross-env.dev/qt47/usr/lib/gcc/i686-pc-mingw32/4.5.0/../../../../i686-pc-mingw32/include
> End of search list.
> ...

How can we influence that search order? Is it possible to pass
some corresponding ./configure options to GCC in src/gcc.mk?

How did the Qt people do that? Did they patch GCC to get that
behaviour? Does the GCC contain some special handling in the
paths when it is built for mingw? If so, why don't _we_ trigger
that special handling, too?
(Continue reading)

hoijui | 1 Jun 14:11 2010
Picon

Re: error when compiling gcc

hey Tony :-)
yeah true, does not work.

what i did now:
run "make gcc", and keep configure open in the editor (gedit), with
the space removed. then constantly try to save, and when it reports
"This file was changed on disc, do you want to overwrite it?", click
Yes.
this way, it compiles. ;-)
i still have to test if it works though.

now... this definitely is not THE solution, and i surely will have
forgotten about it next time i have to compile gcc. if we were sure
that this always happens on gentoo, i guess you could add a
workaround, right? then again.. it seems to be a problem on all OS, as
you say you had the same in your log, just not as an error. maybe edit
gcc/configure automatically right after extraction from the package,
using sed or awk?
or even send a patch to the GCC source maintainers?

i still can not understand what the problem really is; why this space
hurts so much.

2010/6/1 Tony Theodore <tonyt@...>:
> On 1 June 2010 03:56, hoijui <hoijui.quaero@...> wrote:
>> thanks a lot Tony!
>>
>> did that, and attached the error log.
>> to make it short, it fails with the same error, so yeah... i guess you
>> are right with gentoo having a problem there. :/
(Continue reading)

Volker Grabsch | 1 Jun 14:30 2010

Re: error when compiling gcc

hoijui <hoijui.quaero@...> schrieb:
> it seems to be a problem on all OS, as
> you say you had the same in your log, just not as an error. maybe edit
> gcc/configure automatically right after extraction from the package,
> using sed or awk?
> or even send a patch to the GCC source maintainers?

That's an important question.

Are we able to produce a proper patch for GCC? If not, is there
a simple $(SED) action to fix that?

Greets,
Volker

--

-- 
Volker Grabsch
---<<(())>>---
Administrator
NotJustHosting GbR

Volker Grabsch | 1 Jun 18:07 2010

Re: error when compiling gcc

hoijui <hoijui.quaero@...> schrieb:
> 2010/6/1 Volker Grabsch <vog@...>:
> >
> > Are we able to produce a proper patch for GCC? If not, is there
> > a simple $(SED) action to fix that?
> >
> sed 's/"(GCC) "/"(GCC)"/' \
> 		< tmp-gcc-native-build/gcc-4.5.0/gcc/configure \
> 		> /tmp/configure.replaced \
> 		&& mv /tmp/configure.replaced \
> 			tmp-gcc-native-build/gcc-4.5.0/gcc/configure

You can shorten that to:

    $(SED) -i 's/"(GCC) "/"(GCC)"/' '$(1)/gcc/configure'

in your gcc-native-build.mk

Greets,
Volker

--

-- 
Volker Grabsch
---<<(())>>---
Administrator
NotJustHosting GbR


Gmane