Results 1 to 12 of 12

Thread: gcc 4.1.1 and qt 4.2 installation problem

  1. #1
    Join Date
    Jan 2006
    Posts
    52
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default gcc 4.1.1 and qt 4.2 installation problem

    Hi

    When I try to configure & compile the qt 4.2 OS edition I get the following error:

    g++ -c -oqlocale.o -O -I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -I..\src\corelib\arch\generic -I..\include -I ..\include\QtCore -I..\src\tools -I..\mkspecs\win32-g++ -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQMAKE_OPENSOURCE_EDITION ..\src\corelib\tools\qlocale.cpp
    ..\src\corelib\tools\qlocale.cpp: In function 'char* qdtoa(double, int, int, int*, int*, char**, char**)':
    ..\src\corelib\tools\qlocale.cpp:5630: error: '_clear87' was not declared in this scope
    ..\src\corelib\tools\qlocale.cpp:5631: error: '_control87' was not declared in this scope
    mingw32-make: *** [qlocale.o] Error 1
    If it will help I'm running xp sp2 on athlon amd using gcc 4.11
    this is what the configure script start with:
    $ configure -qt-gif

    This is the Qt/Windows Open Source Edition.

    You are licensed to use this software under the terms of
    the GNU General Public License.

    Type '?' to view the GNU General Public License.
    Type 'y' to accept this license offer.
    Type 'n' to decline this license offer.

    Do you accept the terms of the license?
    y
    Environment:
    INCLUDE=
    Unset
    LIB=
    Unset
    PATH=
    .
    C:\msys\1.0\local\bin
    C:\msys\1.0\mingw\bin
    C:\msys\1.0\bin
    c:\WINDOWS\system32
    c:\WINDOWS
    c:\WINDOWS\System32\Wbem
    c:\Program Files\Common Files\Adobe\AGL
    c:\Program Files\QuickTime\QTSystem\
    C:\msys\1.0\mingw\bin\
    You are licensed to use this software under the terms of the GNU GPL.
    See C:\qt\4.2.0/LICENSE.GPL

    Configuration:
    minimal-config
    small-config
    medium-config
    large-config
    full-config
    build_all
    debug
    Qt Configuration:
    release
    debug
    zlib
    png
    accessibility
    qt3support
    opengl
    ipv6

    QMAKESPEC...................win32-g++ (detected)
    Architecture................windows
    Maketool....................mingw32-make
    Debug symbols...............yes
    Accessibility support.......yes
    STL support.................yes
    Exception support...........yes
    RTTI support................yes
    OpenGL support..............yes
    Qt3 compatibility...........yes

    Third Party Libraries:
    ZLIB support............qt
    GIF support.............plugin
    JPEG support............plugin
    PNG support.............qt
    MNG support.............plugin

    Styles:
    Windows.................yes
    Windows XP..............yes
    Plastique...............yes
    Cleanlooks..............yes
    Motif...................yes
    CDE.....................yes

    Sql Drivers:
    ODBC....................no
    MySQL...................no
    OCI.....................no
    PostgreSQL..............no
    TDS.....................no
    DB2.....................no
    SQLite..................yes
    SQLite2.................no
    InterBase...............no

    Sources are in..............C:\qt\4.2.0
    Build is done in............C:\qt\4.2.0
    Install prefix..............C:\qt\4.2.0
    Headers installed to........C:\qt\4.2.0\include
    Libraries installed to......C:\qt\4.2.0\lib
    Plugins installed to........C:\qt\4.2.0\plugins
    Binaries installed to.......C:\qt\4.2.0\bin
    Docs installed to...........C:\qt\4.2.0\doc
    Data installed to...........C:\qt\4.2.0
    Translations installed to...C:\qt\4.2.0\translations
    Examples installed to.......C:\qt\4.2.0\examples
    Demos installed to..........C:\qt\4.2.0\demos
    gcc 4.11 was configured with
    Configured with: --prefix=/mingw --host=mingw32 --target=mingw32 --program-prefix= --with-as=/mingw/bin/as.exe --with-ld=/mingw/bin/ld.exe --with-gcc --with-gnu-ld --with-gnu-as --enable-
    threads --disable-nls --enable-languages=c,c++ --disable-win32-registry --disable-shared --without-x --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug
    Thread model: win32
    gcc version 4.1.1
    Any idea what causes this error? Any help would be appreciated!

    Thanks
    Last edited by dave; 15th October 2006 at 15:50.

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: gcc 4.1.1 and qt 4.2 installation problem

    You've msys in your path which could make trouble. Also make sure that your compiler only grabs float.h from MinGW\include and not from msys or cygwin or anywhere else.
    Also please try a precompiled gcc from mingw instead your own 4.1.1 as there are mostly some patches needed to get the correct behaviour.

  3. #3
    Join Date
    Jan 2006
    Posts
    52
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: gcc 4.1.1 and qt 4.2 installation problem

    I canceled the msys path (run configure from cmd), still I get the same problem.

    with mingw prebuilt binaries (mingw.org) it does work, bu I want to make it work with gcc 4.1.1 (mingw uses 3.4 I think). Where can I get those patches?

  4. #4
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: gcc 4.1.1 and qt 4.2 installation problem

    Maybe ask at mingw.org mailing list. But I think you must only take care that your MinGWinclude\float.h from prebuild gcc3.x is used.

  5. #5
    Join Date
    Jan 2006
    Posts
    52
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: gcc 4.1.1 and qt 4.2 installation problem

    Well, I haven't found the solution yet. I'm using now two different mingw config. the usual mingw 3.4.2 for qt, and my own mingw build (which includes gcc 4.1.1). As a matter of curiousity I've compared both float.h versions and they're identical!

    I will try the mingw mailing list. will keep you updated if I find an answer.
    Last edited by dave; 17th October 2006 at 20:41.

  6. #6
    Join Date
    Jan 2006
    Posts
    52
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: gcc 4.1.1 and qt 4.2 installation problem

    Turn out the problem wasn't with QT at all. Bu with my gcc 4.1.1 build which included the wrong float.h first. Apparently gcc should first search the local mingw include directory and then his own lib-gcc directory, which also has a float.h.

    I downloaded a gcc 4.1.1 already compiled for mingw of the internet and it has the same problem.

    I haven't found a way to change the include file search order yet.

  7. #7
    Join Date
    Jan 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: gcc 4.1.1 and qt 4.2 installation problem

    Root of that problem with float.h is 2 different version of this file
    • %MINGW%\include\float.h
    • %MINGW%\include\с++\4.1.1\float.h


    The including %MINGW%\include\float.h are means also including
    %MINGW%\include\с++\4.1.1\float.h, look at line "#include_next<float.h>"
    The including %MINGW%\include\с++\4.1.1\float.h are means including
    just one this file and losing _clear87 declaration.
    Include dirs must be in right order (%MINGW%\include is first).

    I use:
    • binutils-2.17.50-20060824.tar.gz
    • mingw-runtime-3.11.tar.gz
    • mingw-make-3.80.0-3.tar.gz
    • w32api-3.8.tar.gz
    • Compiled from source GCC version 4.1.1


    To compile Qt 4.2.2 Open Source Edition with MinGW GCC 4.1.1 do this:

    1. Create new environment variable with correct include dirs order:
      CPLUS_INCLUDE_PATH=%MINGW%\include;%MINGW%\include \с++\4.1.1;%MINGW%\lib\gcc\mingw32\4.1.1\inclu de
      (Or remove "#include_next<float.h>" in %MINGW%\include\float.h
      and add "#include_next<float.h>" in %MINGW%\include\с++\4.1.1\float.h)
      I don't know how compile %MINGW%\libexec\gcc\mingw32\4.1.1\cc1plus.exe with
      correct inlude dir order inside. Please, tell me if you know.

      (Correct several small bugs)
    2. Add to begin of file %QTDIR%\src\corelib\kernel\qeventdispatcher_win.cp p
      this declaration (any place before line 150: "QEventDispatcherWin32Private::~QEventDispatcherWi n32Private()"):
      LRESULT CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp);
    3. Replace line 578 in file %QTDIR%\src\gui\kernel\qkeymapper_win.cpp
      from:
      LCID newLCID = MAKELCID(GetKeyboardLayout(0), SORT_DEFAULT);
      to:
      LCID newLCID = MAKELCID(LOWORD(GetKeyboardLayout(0)), SORT_DEFAULT);
    4. Add to begin of file %QTDIR%\src\gui\qwininputcontext_win.cpp
      this declaration (any place before line 451: "bool QWinInputContext::endComposition()"):
      extern bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event); // in qapplication_xxx.cpp
    5. Compilation qaccessible_win.cpp will generate some errors.
      I just "configure -no-accessibility"

    Now you can complile Qt "mingw32-make".

    P.S. Sorry my little English. My mother tongue is Russian.

  8. #8
    Join Date
    Jan 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: gcc 4.1.1 and qt 4.2 installation problem

    P.S. About 5. %QTDIR%\src\gui\accessible\qaccessible_win.cpp compilation problem.
    I try to comment second interface at line 267:
    class QWindowsAccessible : public IAccessible, /*IOleWindow,*/ QAccessible
    Compilation was successful. After that I found this error in gcc bug database.
    Take a look to description GCC Bugzilla Bug 27067 "Compile errors with multiple
    inheritance where the stdcall attribute is applied to virtual functions"
    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27067

    I try to compile Qt 4.2.2 with snapshots gcc-4.1-20061219 and gcc-4.2-20070102,
    both compilation was unsuccessful. Same errors "'x' aliased to undefined symbol".
    Patch was not included in source tree.

  9. #9
    Join Date
    May 2008
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: gcc 4.1.1 and qt 4.2 installation problem

    Anyone know the status of gcc 4 and Qt 4.4 with mingw? Is it still broken? I'm not sure why trolltech is ignoring this

  10. #10
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: gcc 4.1.1 and qt 4.2 installation problem

    Quote Originally Posted by brenden View Post
    Anyone know the status of gcc 4 and Qt 4.4 with mingw? Is it still broken? I'm not sure why trolltech is ignoring this
    First - gcc 4.x on windows is alpha - it's not meant to something else than playing around. Why should TT care of something that isn't meant to be stable??
    Second - The issues were reported after 4.4.0beta/rc was released and therefore it did not go into 4.4.0 final. Should they release 4.4.1 just because you want to use a compiler which only has alpha quality?

    If you just want to play around (nothing more can be done with this compiler) you should also be able to fix such issues yourself. Otherwise it doesn't make sense that you use alpha software...

  11. #11
    Join Date
    May 2008
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: gcc 4.1.1 and qt 4.2 installation problem

    Quote Originally Posted by ChristianEhrlicher View Post
    First - gcc 4.x on windows is alpha - it's not meant to something else than playing around. Why should TT care of something that isn't meant to be stable??
    Second - The issues were reported after 4.4.0beta/rc was released and therefore it did not go into 4.4.0 final. Should they release 4.4.1 just because you want to use a compiler which only has alpha quality?

    If you just want to play around (nothing more can be done with this compiler) you should also be able to fix such issues yourself. Otherwise it doesn't make sense that you use alpha software...
    I have been patching it myself. I was just curious to know if it was working yet. I need gcc 4 (and I find it perfectly stable on windows) because I use tr1 in my project.

  12. #12
    Join Date
    May 2011
    Posts
    11
    Thanks
    2
    Qt products
    Qt4 Qt Jambi
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Wiki edits
    1

    Default Re: gcc 4.1.1 and qt 4.2 installation problem

    I found a workaround after experiencing the same issues described in this thread with Qt 4.8.0 Beta 1 and MinGW.

    I found refuge in setting up some environmental variables withe the following variables in this order.

    Qt Code:
    1. INCLUDE
    2. C:\MinGW\include;C:\MinGW\lib\gcc\mingw32\4.6.1\include
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. LIB
    2. C:\MinGW\lib\gcc\mingw32\4.6.1;C:\MinGW\lib
    To copy to clipboard, switch view to plain text mode 

    Now this got rid of the immediate displaying of failing to configure properly with undefined references in the file
    Qt Code:
    1. Qt\src\corelib\tools\qlocale_tools.cpp
    To copy to clipboard, switch view to plain text mode 

    However later on down the track i found that the error came up, without reading through a few thousand lines of output i decided that the #include <float.h> at the top of this file may be best hard coded. I know this is not a good thing to do, however it did get me configured correctly. So edit it and input the full path to the file float.h

    replace
    Qt Code:
    1. #include <float.h>
    To copy to clipboard, switch view to plain text mode 

    With
    Qt Code:
    1. #include "C:\\MinGW\\include\\float.h"
    To copy to clipboard, switch view to plain text mode 

    I did some reading on mailing lists and discovered that there is actually a problem with the MinGW specific to Qt and numerous people have raised the same question.

    I know this is quite an old thread, however i stumbled onto it and figure perhaps others will also.

Similar Threads

  1. do Qt4 installation depends on gcc version
    By quickNitin in forum Installation and Deployment
    Replies: 3
    Last Post: 3rd October 2006, 06:14
  2. Replies: 16
    Last Post: 7th March 2006, 15:57
  3. general sqlplugin problem
    By a550ee in forum Installation and Deployment
    Replies: 5
    Last Post: 28th February 2006, 10:03

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.