Opened 15 years ago

Last modified 15 years ago

#133 closed defect

API_FPU_CW_Wrappers.h errors — at Version 5

Reported by: dmacias Owned by:
Priority: major Milestone: Qt Enhanced
Component: General Version: 4.5.1 GA
Severity: low Keywords:
Cc:

Description (last modified by Dmitry A. Kuminov)

I am testing Harbour (www.harbour-project.org) hbqt contrib with Qt451GA for OS/2, using os2gcc442 in eCS pre-2.0

I installed Qt451GA using .wpi files from Netlabs

Using "Qt4 Command Prompt", setting os2gcc442 environment and Harbour environment as usual

In first try to build Harbour-hbqt it fail with this error:


E:\ecs\system\qt4\include/QtCore/qt_os2.h:59:33: error:
API_FPU_CW_Wrappers.h: No such file or directory


Searching for API_FPU_CW_Wrappers.h it does not exist anywhere in e:\ecs\system\qt4\include\ directories

Looking for API_FPU_CW_Wrappers.h it exist in:

E:\ecs\system\qt4\mkspecs\os2-g++
E:\ecs\system\qt4\mkspecs\default

with same date and content:

17/12/09 3:22a 145,271 0 a--- API_FPU_CW_Wrappers.h

Copying API_FPU_CW_Wrappers.h to e:\ecs\system\qt4\include\ and trying again build of Harbour-hbqt many errors are raised from
API_FPU_CW_Wrappers.h and then GPF with "Killed by SIGSEGV"

So something are wrong in API_FPU_CW_Wrappers.h reference, content and use under OS/2

Below are included build output log for
First try, API_FPU_CW_Wrappers.h missing:

Most errors may be due API_FPU_CW_Wrappers.h missing

Second try, with API_FPU_CW_Wrappers.h:

This Harbour-hbqt contrib are working in Windows, Linux, Mac, ...

David Macias

First try, missing API_FPU_CW_Wrappers.h:
=========================================

gcc   -I. -I../../../../../include -Zomf -Wall -W -O3 
-DHB_LEGACY_TYPES_OFF  -IE:\ecs\system\qt4\include 
-IE:\ecs\system\qt4\include/QtCore -IE:\ecs\system\qt4\include/QtGui 
-IE:\ecs\system\qt4\include/QtNetwork -DTCPV40HDRS 
-DHB_FM_STATISTICS_OFF -ohbqt_hbqmainwindow.o -c 
../../../hbqt_hbqmainwindow.cpp
En el fichero incluÝdo de E:\ecs\system\qt4\include/QtGui/qmime.h:118,
                  de E:\ecs\system\qt4\include/QtGui/qevent.h:52,
                  de E:\ecs\system\qt4\include/QtGui/QMouseEvent:1,
                  de ../../../hbqt_hbqmainwindow.h:62,
                  de ../../../hbqt_hbqmainwindow.cpp:63:
E:\ecs\system\qt4\include/QtCore/qt_os2.h:59:33: error: 
API_FPU_CW_Wrappers.h: No such file or directory
In file included from E:\ecs\system\qt4\include/QtGui/qmime.h:118,
                  from E:\ecs\system\qt4\include/QtGui/qevent.h:52,
                  from E:\ecs\system\qt4\include/QtGui/QMouseEvent:1,
                  from ../../../hbqt_hbqmainwindow.h:62,
                  from ../../../hbqt_hbqmainwindow.cpp:63:
E:\ecs\system\qt4\include/QtCore/qt_os2.h: In function 'LONG 
__FPU_CW_WinQueryClipRegion(HWND, HRGN)':
E:\ecs\system\qt4\include/QtCore/qt_os2.h:72: error: '__FPU_CW_Restore' 
was not declared in this scope
E:\ecs\system\qt4\include/QtCore/qt_os2.h: In function 'LONG 
__FPU_CW_WinSetClipRegion(HWND, HRGN)':
E:\ecs\system\qt4\include/QtCore/qt_os2.h:82: error: '__FPU_CW_Restore' 
was not declared in this scope
In file included from E:\ecs\system\qt4\include/QtGui/qevent.h:52,
                  from E:\ecs\system\qt4\include/QtGui/QMouseEvent:1,
                  from ../../../hbqt_hbqmainwindow.h:62,
                  from ../../../hbqt_hbqmainwindow.cpp:63:
E:\ecs\system\qt4\include/QtGui/qmime.h: At global scope:
E:\ecs\system\qt4\include/QtGui/qmime.h:150: error: ISO C++ forbids 
declaration of 'DRAGINFO' with no type
E:\ecs\system\qt4\include/QtGui/qmime.h:150: error: 'DRAGINFO' declared 
as a 'virtual' field
E:\ecs\system\qt4\include/QtGui/qmime.h:150: error: expected ';' before 
'*' token
E:\ecs\system\qt4\include/QtGui/qmime.h:153: error: expected ';' before 
'virtual'
E:\ecs\system\qt4\include/QtGui/qmime.h:154: error: 'DRAGITEM' has not 
been declared
E:\ecs\system\qt4\include/QtGui/qmime.h:177: error: 'DRAGITEM' has not 
been declared
E:\ecs\system\qt4\include/QtGui/qmime.h:210: error: ISO C++ forbids 
declaration of 'DRAGINFO' with no type
E:\ecs\system\qt4\include/QtGui/qmime.h:210: error: expected ';' before 
'*' token
E:\ecs\system\qt4\include/QtGui/qmime.h:212: error: expected ';' before 
'virtual'
E:\ecs\system\qt4\include/QtGui/qmime.h:222: error: ISO C++ forbids 
declaration of 'DRAGINFO' with no type
E:\ecs\system\qt4\include/QtGui/qmime.h:222: error: expected ';' before 
'*' token
E:\ecs\system\qt4\include/QtGui/qmime.h:256: error: 'DRAGITEM' has not 
been declared
E:\ecs\system\qt4\include/QtGui/qmime.h:257: error: 'DRAGITEM' has not 
been declared
E:\ecs\system\qt4\include/QtGui/qmime.h:291: error: 'dropWorkerFor' 
declared as a 'virtual' field
E:\ecs\system\qt4\include/QtGui/qmime.h:291: error: expected ';' before 
'(' token
E:\ecs\system\qt4\include/QtGui/qmime.h:294: error: expected ';' before 
'protected'
E:\ecs\system\qt4\include/QtGui/qmime.h:307: error: 'HSTR' has not been 
declared
E:\ecs\system\qt4\include/QtGui/qmime.h:308: error: 'DRAGITEM' has not 
been declared
E:\ecs\system\qt4\include/QtGui/qmime.h:309: error: 'DRAGITEM' has not 
been declared
E:\ecs\system\qt4\include/QtGui/qmime.h:310: error: 'HSTR' has not been 
declared
E:\ecs\system\qt4\include/QtGui/qmime.h:311: error: 'HSTR' has not been 
declared
E:\ecs\system\qt4\include/QtGui/qmime.h:154: warning: unused parameter 'drm'
E:\ecs\system\qt4\include/QtGui/qmime.h:154: warning: unused parameter 'drf'
E:\ecs\system\qt4\include/QtGui/qmime.h:154: warning: unused parameter 
'item'
E:\ecs\system\qt4\include/QtGui/qmime.h:154: warning: unused parameter 
'itemIndex'
E:\ecs\system\qt4\include/QtGui/qmime.h:156: warning: unused parameter 
'type'
E:\ecs\system\qt4\include/QtGui/qmime.h:156: warning: unused parameter 'ext'
E:\ecs\system\qt4\include/QtGui/qmime.h:190: warning: unused parameter 'drf'
E:\ecs\system\qt4\include/QtGui/qmime.h:190: warning: unused parameter 
'type'
E:\ecs\system\qt4\include/QtGui/qmime.h:190: warning: unused parameter 'ext'
E:\ecs\system\qt4\include/QtGui/qmime.h: In constructor 
'QPMMime::DropWorker::DropWorker()':
E:\ecs\system\qt4\include/QtGui/qmime.h:207: error: class 
'QPMMime::DropWorker' does not have any field named 'nfo'
E:\ecs\system\qt4\include/QtGui/qmime.h: At global scope:
E:\ecs\system\qt4\include/QtGui/qmime.h:213: warning: unused parameter 
'isAccepted'
E:\ecs\system\qt4\include/QtGui/qmime.h:289: warning: unused parameter 
'mimeType'
E:\ecs\system\qt4\include/QtGui/qmime.h:289: warning: unused parameter 
'mimeData'
make[1]: *** [hbqt_hbqmainwindow.o] Error 1

Second try, with API_FPU_CW_Wrappers.h:
=========================================

gcc   -I. -I../../../../../include -Zomf -Wall -W -O3 -DHB_LEGACY_TYPES_OFF  -IE:\ecs\system\qt4\include -IE:\ecs\system\qt4\include/QtCore -IE:\ecs\system\qt4\include/QtGui -IE:\ecs\system\qt4\include/QtNetwork -DTCPV40HDRS -DHB_FM_STATISTICS_OFF -ohbqt_hbqmainwindow.o -c ../../../hbqt_hbqmainwindow.cpp
In file included from E:\ecs\system\qt4\include/QtCore/qt_os2.h:59,
                 from E:\ecs\system\qt4\include/QtGui/qmime.h:118,
                 from E:\ecs\system\qt4\include/QtGui/qevent.h:52,
                 from E:\ecs\system\qt4\include/QtGui/QMouseEvent:1,
                 from ../../../hbqt_hbqmainwindow.h:62,
                 from ../../../hbqt_hbqmainwindow.cpp:63:
E:\ecs\system\qt4\include/API_FPU_CW_Wrappers.h: In function 'BOOL __FPU_CW_WinCalcFrameRect(HWND, RECTL*, BOOL)':
E:\ecs\system\qt4\include/API_FPU_CW_Wrappers.h:437: error: 'WinCalcFrameRect' was not declared in this scope
E:\ecs\system\qt4\include/API_FPU_CW_Wrappers.h: In function 'BOOL __FPU_CW_WinCreateFrameControls(HWND, FRAMECDATA*, const unsigned char*)':
E:\ecs\system\qt4\include/API_FPU_CW_Wrappers.h:445: error: 'WinCreateFrameControls' was not declared in this scope
E:\ecs\system\qt4\include/API_FPU_CW_Wrappers.h: In function 'BOOL __FPU_CW_WinFlashWindow(HWND, BOOL)':
E:\ecs\system\qt4\include/API_FPU_CW_Wrappers.h:453: error: 'WinFlashWindow' was not declared in this scope
E:\ecs\system\qt4\include/API_FPU_CW_Wrappers.h: In function 'BOOL __FPU_CW_WinGetMaxPosition(HWND, SWP*)':
E:\ecs\system\qt4\include/API_FPU_CW_Wrappers.h:461: error: 'WinGetMaxPosition' was not declared in this scope
E:\ecs\system\qt4\include/API_FPU_CW_Wrappers.h: In function 'BOOL __FPU_CW_WinGetMinPosition(HWND, SWP*, const POINTL*)':
E:\ecs\system\qt4\include/API_FPU_CW_Wrappers.h:469: error: 'WinGetMinPosition' was not declared in this scope
E:\ecs\system\qt4\include/API_FPU_CW_Wrappers.h: At global scope:
E:\ecs\system\qt4\include/API_FPU_CW_Wrappers.h:475: error: '__FPU_CW_WinSaveWindowPos' declared as an 'inline' variable

Killed by SIGSEGV
pid=0x0090 ppid=0x008f tid=0x0001 slot=0x00c5 pri=0x0200 mc=0x0001
E:\USR\LOCAL442\LIBEXEC\GCC\I386-PC-OS2-EMX\4.4.2\CC1PLUS.EXE
CC1PLUS 0:00304713
cs:eip=005b:00314713      ss:esp=0053:00a8f7c8      ebp=00a8f7c8
 ds=0053      es=0053      fs=150b      gs=0000     efl=00010206
eax=026c4500 ebx=00a8f868 ecx=00000008 edx=029cc480 edi=00000000 esi=00916ac0
Process dumping was disabled, use DUMPPROC / PROCDUMP to enable it.
gcc: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[1]: *** [hbqt_hbqmainwindow.o] Error 1
make[1]: Leaving directory `E:/harbour102/harbour/contrib/hbqt/obj/os2/gccomf'
make: *** [descend] Error 2
make: Leaving directory `E:/harbour102/harbour/contrib/hbqt'

Change History (5)

comment:1 by Dmitry A. Kuminov, 15 years ago

As far as I can see, the project doesn't use qmake. For this reason, the include path E:\ecs\system\qt4\mkspecs\default (or E:\ecs\system\qt4\mkspecs\os2-g++ which is the same in this case) is not passed to the compiler. Adding it to the list of include directories for the compier should fix the problem for you. Please try and report back.

For the second case, it's the wrong include order -- a typical problem for the OS/2 environment caused by the way the os2.h file (which is a central access point to the OS/2 APIs) is organized. In your case, it seems that os2.h is manually included from either hbqt_hbqmainwindow.cpp or hbqt_hbqmainwindow.h (or from another file they include) before Qt4 headers are included. Such an order is not supported and should not take place -- Qt includes must go first. Also, it's not clear why os2.h is included manually in a Qt source file in the first place: in theory, this should be never needed. If you give me more details on this, I will be able to suggest you the best solution.

P.S. SIGSEGV is probably due to too many errors (e.g. maybe a bug of the GCC4 port) and is not related to Qt4.

in reply to:  1 comment:2 by dmacias, 15 years ago

Replying to dmik:

As far as I can see, the project doesn't use qmake. For this reason, the include path E:\ecs\system\qt4\mkspecs\default (or E:\ecs\system\qt4\mkspecs\os2-g++ which is the same in this case) is not passed to the compiler. Adding it to the list of include directories for the compier should fix the problem for you. Please try and report back.

Thanks for your help
We use GNU make
Using:

set C_INCLUDE_PATH=E:\ecs\system\qt4\mkspecs\default;%C_INCLUDE_PATH%
set CPLUS_INCLUDE_PATH=E:\ecs\system\qt4\mkspecs\default;%CPLUS_INCLUDE_PATH%

then API_FPU_CW_Wrappers.h missing has gone, and we have a lot of errors due API_FPU_CW_Wrappers.h
Are more than 600 lines in build output
Most of them are of type:

'somevalue' was not declared in this scope

After long section of API_FPU_CW_Wrappers.h errors, begin a new section with qmime.h errors

These are three section of build output:


gcc -I. -I../../../../../include -Zomf -Wall -W -O3 -DHB_LEGACY_TYPES_OFF -IE:\ecs\system\qt4\include -IE:\ecs\system\qt4\include/QtCore -IE:\ecs\system\qt4\include/QtGui -IE:\ecs\system\qt4\include/QtNetwork -DTCPV40HDRS -DHB_FM_STATISTICS_OFF -ohbqt_hbqmainwindow.o -c ../../../hbqt_hbqmainwindow.cpp
In file included from E:\ecs\system\qt4\include/QtCore/qt_os2.h:59,

from E:\ecs\system\qt4\include/QtGui/qmime.h:118,
from E:\ecs\system\qt4\include/QtGui/qevent.h:52,
from E:\ecs\system\qt4\include/QtGui/QMouseEvent:1,
from ../../../hbqt_hbqmainwindow.h:62,
from ../../../hbqt_hbqmainwindow.cpp:63:

E:\ecs\system\qt4\mkspecs\default/API_FPU_CW_Wrappers.h: In function 'BOOL FPU_CW_WinCalcFrameRect(HWND, RECTL*, BOOL)':
E:\ecs\system\qt4\mkspecs\default/API_FPU_CW_Wrappers.h:437: error: 'WinCalcFrameRect' was not declared in this scope
E:\ecs\system\qt4\mkspecs\default/API_FPU_CW_Wrappers.h: In function 'BOOL
FPU_CW_WinCreateFrameControls(HWND, FRAMECDATA*, const unsigned char*)':
E:\ecs\system\qt4\mkspecs\default/API_FPU_CW_Wrappers.h:445: error: 'WinCreateFrameControls' was not declared in this scope

[...]

E:\ecs\system\qt4\mkspecs\default/API_FPU_CW_Wrappers.h: In function 'void* FPU_CW_WinDefAVioWindowProc(HWND, USHORT, ULONG, ULONG)':
E:\ecs\system\qt4\mkspecs\default/API_FPU_CW_Wrappers.h:4605: error: 'WinDefAVioWindowProc' was not declared in this scope
In file included from E:\ecs\system\qt4\include/QtGui/qevent.h:52,

from E:\ecs\system\qt4\include/QtGui/QMouseEvent:1,
from ../../../hbqt_hbqmainwindow.h:62,
from ../../../hbqt_hbqmainwindow.cpp:63:

E:\ecs\system\qt4\include/QtGui/qmime.h: At global scope:
E:\ecs\system\qt4\include/QtGui/qmime.h:150: error: ISO C++ forbids declaration of 'DRAGINFO' with no type
E:\ecs\system\qt4\include/QtGui/qmime.h:150: error: 'DRAGINFO' declared as a 'virtual' field
E:\ecs\system\qt4\include/QtGui/qmime.h:150: error: expected ';' before '*' token
E:\ecs\system\qt4\include/QtGui/qmime.h:153: error: expected ';' before 'virtual'

[...]

E:\ecs\system\qt4\include/QtGui/qmime.h: In constructor 'QPMMime::DropWorker::DropWorker()':
E:\ecs\system\qt4\include/QtGui/qmime.h:207: error: class 'QPMMime::DropWorker' does not have any field named 'nfo'
E:\ecs\system\qt4\include/QtGui/qmime.h: At global scope:
E:\ecs\system\qt4\include/QtGui/qmime.h:213: warning: unused parameter 'isAccepted'
E:\ecs\system\qt4\include/QtGui/qmime.h:289: warning: unused parameter 'mimeType'
E:\ecs\system\qt4\include/QtGui/qmime.h:289: warning: unused parameter 'mimeData'
make[1]: * [hbqt_hbqmainwindow.o] Error 1
make[1]: Leaving directory `E:/harbour102/harbour/contrib/hbqt/obj/os2/gccomf'
make:
* [descend] Error 2
make: Leaving directory `E:/harbour102/harbour/contrib/hbqt'


See below

For the second case, it's the wrong include order -- a typical problem for the OS/2 environment caused by the way the os2.h file (which is a central access point to the OS/2 APIs) is organized. In your case, it seems that os2.h is manually included from either hbqt_hbqmainwindow.cpp or hbqt_hbqmainwindow.h (or from another file they include) before Qt4 headers are included. Such an order is not supported and should not take place -- Qt includes must go first. Also, it's not clear why os2.h is included manually in a Qt source file in the first place: in theory, this should be never needed. If you give me more details on this, I will be able to suggest you the best solution.

os2.h is included in qt_os2.h before API_FPU_CW_Wrappers.h
hbqt_hbqmainwindow.cpp just call QMouseEvent of Qt4, which lead to rest of sequence of Qt4 files, including qt_os2.h, os2.h, API_FPU_CW_Wrappers.h:


In file included from E:\ecs\system\qt4\include/QtCore/qt_os2.h:59,

from E:\ecs\system\qt4\include/QtGui/qmime.h:118,
from E:\ecs\system\qt4\include/QtGui/qevent.h:52,
from E:\ecs\system\qt4\include/QtGui/QMouseEvent:1,
from ../../../hbqt_hbqmainwindow.h:62,
from ../../../hbqt_hbqmainwindow.cpp:63:

E:\ecs\system\qt4\mkspecs\default/API_FPU_CW_Wrappers.h: In function 'BOOL


I have not clear this case,
can you explain or suggest any other checks/tests ?

P.S. SIGSEGV is probably due to too many errors (e.g. maybe a bug of the GCC4 port) and is not related to Qt4.

Does not happen anymore. Checked with three or four re-builds

David Macias

comment:3 by Dmitry A. Kuminov, 15 years ago

Of course, I know that os2.h is included in qt_os2.h :) I was asking you to check if os2.h is directly or indirectly included somewhere *before* any Qt header (i.e. in case of hbqt_hbqmainwindow.*, before QMouseEvent is included) -- frankly saying, this is the only reason that could cause these 'something was not declared in this scope' errors that comes to my mind so far.

To make it simpler to check, do the following command

gcc -I. -I../../../../../include -Zomf -Wall -W -O3 -DHB_LEGACY_TYPES_OFF -IE:\ecs\system\qt4\include -IE:\ecs\system\qt4\include/QtCore -IE:\ecs\system\qt4\include/QtGui -IE:\ecs\system\qt4\include/QtNetwork -DTCPV40HDRS -DHB_FM_STATISTICS_OFF -ohbqt_hbqmainwindow.o -E ../../../hbqt_hbqmainwindow.cpp >hbqt_hbqmainwindow.preprocessed.cpp

It will expand (due to the -E option instead of -c) all the includes, defines and so on and place the output to hbqt_hbqmainwindow.preprocessed.cpp. Then please attach hbqt_hbqmainwindow.preprocessed.cpp to this ticket.

comment:4 by Dmitry A. Kuminov, 15 years ago

And BTW, is there any specific reason for -DTCPV40HDRS? This will cause gcc to use the outdated TCP stack (which is 16-bit AFAIR) instead of the more modern 32-bit stack used by Qt. I heard that these stacks are not compatible and won't work together (though I don't know all the details).

comment:5 by Dmitry A. Kuminov, 15 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.