Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#133 closed defect (wontfix)

API_FPU_CW_Wrappers.h errors

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'

Attachments (3)

hbqt_hbqmainwindow.preprocessed.zip (216.6 KB ) - added by dmacias 15 years ago.
contain hbqt_hbqmainwindow.preprocessed.cpp
hbqtgui_errors.zip (3.6 KB ) - added by dmacias 15 years ago.
Contain hbqtgui_errors.txt
qt4_logs.zip (61.6 KB ) - added by dmacias 15 years ago.
Events in different builds/tests

Download all attachments as: .zip

Change History (32)

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)

in reply to:  3 comment:6 by dmacias, 15 years ago

Replying to dmik:

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.

Sorry, all of this is a mistery for me :-)
I do not know C, C++, ...

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.

It was necessary to delete -ohbqt_hbqmainwindow.o, it result in 1.4 Mb file
hbqt_hbqmainwindow.preprocessed.zip file is attached

As hbqt build work fine with some files, fail with hbqt_hbqmainwindow.cpp and remain files to build, I skipped hbqt_hbqmainwindow.cpp and tried with remaining files (some of them)

Files which failed show some type of error (see below), so fixing problem with hbqt_hbqmainwindow.cpp may lead to fix of rest

Examples:


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_hbqplaintextedit.o -c ../../../hbqt_hbqplaintextedit.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/qtextlayout.h:50,
from E:\ecs\system\qt4\include/QtGui/qabstracttextdocumentlayout.h:46,
from E:\ecs\system\qt4\include/QtGui/qplaintextedit.h:52,
from E:\ecs\system\qt4\include/QtGui/QPlainTextEdit:1,
from ../../../hbqt_hbqplaintextedit.h:60,
from ../../../hbqt_hbqplaintextedit.cpp:78:

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

[...]

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 -omoc_hbqt_hbqmainwindow.o -c moc_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 moc_hbqt_hbqmainwindow.cpp:10:

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

[...]

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 -DTCPV40HDRS -DHB_FM_STATISTICS_OFF -oHBQMainWindow.o -c ../../../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 ../../../HBQMainWindow.cpp:72:

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

[...]


David Macias

by dmacias, 15 years ago

contain hbqt_hbqmainwindow.preprocessed.cpp

in reply to:  4 ; comment:7 by dmacias, 15 years ago

Replying to dmik:

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).

In Harbour project Maurilio Longo is our OS/2 expert and he explained us years ago that we must build Harbour with -DTCPV40HDRS in order to be used in old OS/2 and new eCS
If this case may have problem with Qt I can inform it in Harbour project. Just tell me :-)

As I am Harbour for OS/2 releases builder, I am just following guidelines of experts

Harbour for OS/2 2.0.0 is public near two months ago and we have around 566 downloads of this release, our maximum historically
hbqt contrib was the "big absent" in OS/2 platform, so I am trying to include it soon

Thanks for your interest

David Macias

comment:8 by Silvan Scherrer, 15 years ago

if you look at your provided build log you see that os2.h gets included very fast at the beginning. and qt_os2.h comes a lot later. so this can't work of course.
i suggest that you include qt_os2.h at the beginning of the source.

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

Just to clarify Silvan, os2.h is indeed included very early: from hbdefs.h which is included before <QtGui/QMouseEvent> through other hb* headers (hbapi.h -> hbvmpub.h).

So, my assumption was correct. Please make sure Qt headers are included before hb* ones in all sources -- there is no other way to make it work on OS/2 (*). Also note that it's not necessary to include qt_os2.h directly as suggested by Silvan unless you need to directly access OS/2 API from the Qt-based part of the code (which is non-portable and therefore should be avoided by all means).

(*) The thing with os2.h is that you have to specify what parts of the API you want before including it (using the #define INCL_xxx directives). If you do it once, all subsequent attempts to include os2.h again (probably with a different set of INCL_xxx defines) will be ignored by the compiler because os2.h contains a protection code that allows to include its contents only once per every compilation unit (.cpp file). Therefore, if your set of INCL_xxx doesn't drag in APIs needed by some other parties involved in the compilation process there is nothing these parties can do.

BTW, if you don't want to toss the Qt includes around in all sources, there is one alternative solution. Just add the following to hbdefs.h right before the line where os2.h is included:

#define OS2EMX_PLAIN_CHAR
#define INCL_BASE
#define INCL_PM

This will make sure that os2.h will drag in all the APIs it has so every party will be eventually happy.

in reply to:  7 ; comment:10 by Dmitry A. Kuminov, 15 years ago

Replying to dmacias:

In Harbour project Maurilio Longo is our OS/2 expert and he explained us years ago that we must build Harbour with -DTCPV40HDRS in order to be used in old OS/2 and new eCS
If this case may have problem with Qt I can inform it in Harbour project. Just tell me :-)

Okay, I had a small discussion on this topic with other OS/2 people and this is what I found. The only benefit of the 16-bit stack (that is used by Innotek GCC/kLIBC when you use -DTCPV40HDRS) comparing to the 32-bit stack (used otherwise) that the former is available on Warp3 while the latter is not (32 bit is also not available on Warp4 by default but it is easily solvable by installing a free Fixpak on it). So unless you really want to support Warp3 you can completely drop this define.

Next, both stacks can be probably used in parallel within the same process (never checked that) but they will for sure not be able to exchange sockets.

And another important thing that Qt is bound to the 32-bit stack, so even if your application using two different stacks will eventually work, it will not load on a system with no 32-bit stack installed anyway (due to the Qt dependency). So keep that in mind.

in reply to:  8 comment:11 by dmacias, 15 years ago

Replying to diver:

if you look at your provided build log you see that os2.h gets included very fast at the beginning. and qt_os2.h comes a lot later. so this can't work of course.
i suggest that you include qt_os2.h at the beginning of the source.

Thanks diver
See next response

in reply to:  9 comment:12 by dmacias, 15 years ago

Replying to dmik:

Just to clarify Silvan, os2.h is indeed included very early: from hbdefs.h which is included before <QtGui/QMouseEvent> through other hb* headers (hbapi.h -> hbvmpub.h).

Checking hbdefs.h it set many values for different platforms/compilers supported by Harbour

So, my assumption was correct. Please make sure Qt headers are included before hb* ones in all sources -- there is no other way to make it work on OS/2 (*). Also note that it's not necessary to include qt_os2.h directly as suggested by Silvan unless you need to directly access OS/2 API from the Qt-based part of the code (which is non-portable and therefore should be avoided by all means).

(*) The thing with os2.h is that you have to specify what parts of the API you want before including it (using the #define INCL_xxx directives). If you do it once, all subsequent attempts to include os2.h again (probably with a different set of INCL_xxx defines) will be ignored by the compiler because os2.h contains a protection code that allows to include its contents only once per every compilation unit (.cpp file). Therefore, if your set of INCL_xxx doesn't drag in APIs needed by some other parties involved in the compilation process there is nothing these parties can do.

BTW, if you don't want to toss the Qt includes around in all sources, there is one alternative solution. Just add the following to hbdefs.h right before the line where os2.h is included:

#define OS2EMX_PLAIN_CHAR
#define INCL_BASE
#define INCL_PM

This will make sure that os2.h will drag in all the APIs it has so every party will be eventually happy.

Now the section for OS/2 in hbdefs.h is:


#elif defined( HB_OS_OS2 )

   /* With the exception of WORD, the IBM Visual Age C++ compiler has
      its own definitions of the Harbour types most of which conflict with the
      Harbour #undefs, due to typedef being the prevalent method of
      defining the types in IBMCPP, whereas Harbour assumes that the
      definitions that it is replacing have been defined using
      #define. Therefore, it is necessary to skip the Harbour
      definition section when using the IBMCPP compiiler, include
      the IBMCPP type definitions, and then add the definition for WORD

      NOTE: This only applies to the common types that most C compilers
            define. Any new types, particulary those that start with
            HB_, must be placed AFTER the #endif __IBMCPP__ line!
   */
   /* 28/03/2000 - maurilio.longo@libero.it
      The same holds true when using GCC under OS/2
   */
   #define INCL_TYPES
   #define INCL_DOSEXCEPTIONS    /* DOS exception values */
   #define INCL_ERRORS           /* DOS error values     */
   #define INCL_LONGLONG         /* include native compiler LONGLONG definition */

   /* DAVID:
   */
   #define OS2EMX_PLAIN_CHAR
   #define INCL_BASE
   #define INCL_PM

   #include <os2.h>
   #undef INT
   #undef UINT
   #define HB_DONT_DEFINE_BASIC_TYPES

and most of hbqt build error has gone :-)
You got the key

It build fine three of four libs:

17/02/10 2:30p 300,032 124 a--- hbqt.lib
17/02/10 3:44p 809,984 124 a--- hbqtcore.lib
17/02/10 3:51p 71,168 124 a--- hbqtnetwork.lib

and fail with hbqtgui

Note: this is a response of our hbqt developer:


I know nothing about OS2 and hence not in a position to comment.

One point which comes in mind is that Harbour is supporting Qt 4.5.3
and your experiments are centered around 4.5.1. There is likelyhood
that some of the methods may not be available in 4.5.1. But to be
doubly sure, can you some short log of errors ?

Mostly these errors are the results of wrong headers.


In order to go ahead to solve hbqtgui I was trying build discarding each file with error. hbqtgui have hundreds of .cpp and .prg files (more than 400) and fail with these eleven:

# QAbstractPrintDialog.cpp \
# QInputContext.cpp \
# QPageSetupDialog.cpp \
# QPlainTextEdit.cpp \
# QPrintDialog.cpp \
# QPrintEngine.cpp \
# QPrinter.cpp \
# QPrintPreviewDialog.cpp \
# QTextDocument.cpp \
# QTextEdit.cpp \
# QWidget.cpp \

Notes:
Note 1) Many files even without error show this group of warnings:
E:\ecs\system\qt4\include/QtGui/qmime.h:150: warning: unused parameter 'targetName'
E:\ecs\system\qt4\include/QtGui/qmime.h:150: warning: unused parameter 'supportedOps'
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: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'
E:\ecs\system\qt4\include/QtGui/qmime.h:291: warning: unused parameter 'info'

Note 2) Most errors seem to be related to printer/printing

Perhaps some component are missing, and solution are related

Note 3) Discarding files with errors, we have a big lib:

18/02/10 12:44a 2,792,960 124 a--- hbqtgui.lib

I am attaching hbqtgui_errors.zip containing error section for each one of discarded files

Just tell what next to test

David Macias

by dmacias, 15 years ago

Attachment: hbqtgui_errors.zip added

Contain hbqtgui_errors.txt

in reply to:  10 ; comment:13 by dmacias, 15 years ago

Replying to dmik:

Replying to dmacias:
Okay, I had a small discussion on this topic with other OS/2 people and this is what I found. The only benefit of the 16-bit stack (that is used by Innotek GCC/kLIBC when you use -DTCPV40HDRS) comparing to the 32-bit stack (used otherwise) that the former is available on Warp3 while the latter is not (32 bit is also not available on Warp4 by default but it is easily solvable by installing a free Fixpak on it). So unless you really want to support Warp3 you can completely drop this define.

Next, both stacks can be probably used in parallel within the same process (never checked that) but they will for sure not be able to exchange sockets.

And another important thing that Qt is bound to the 32-bit stack, so even if your application using two different stacks will eventually work, it will not load on a system with no 32-bit stack installed anyway (due to the Qt dependency). So keep that in mind.

Thanks, I will report this to Harbour group and perhaps -DTCPV40HDRS will be removed

It mean that Warp 3 support is excluded in your Qt4 development ?

David Macias

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

Okay, good. I would just change this part in hbdefs.h to the following:

   /* 28/03/2000 - maurilio.longo@libero.it
      The same holds true when using GCC under OS/2
   */
   /* xx/02/2010 - whoever@there.is
      Include all OS/2 API definitions to make sure other involved parties
      (such as Qt for OS/2) will get everything they want
   */
   #define OS2EMX_PLAIN_CHAR
   #define INCL_BASE
   #define INCL_PM
   #include <os2.h>
   #undef INT
   #undef UINT
   #define HB_DONT_DEFINE_BASIC_TYPES

A new bunch of the errors from the .zip is indeed due to the missing printing support and missing accessibility support in Qt 4.5.1 for OS/2. For printing, there are three things you can do:

  1. Add #ifndef QT_NO_PRINTER / #endif around the parts in the source code that use printing classes (QAbstractPrintDialog, QPageSetupDialog etc.) This btw will let it build on all platforms that don't provide printing support for some reason, not only OS/2.
  1. Wait until the next release of Qt for OS/2 (4.6.1) is available. It will include printer support.
  1. Check out the Qt4 source trunk from this site (which is already 4.6.1) and build Qt yourself.

As of accessibility, we may also provide a dummy implementation in 4.6.1, but it's not there yet, so you will have to do #ifndef QT_NO_ACCESSIBILITY / #endif around the places that complain about missing accessibility methods.

The warnings in qmime.h are known you may ignore them for now.

in reply to:  13 comment:15 by Dmitry A. Kuminov, 15 years ago

Replying to dmacias:

It mean that Warp 3 support is excluded in your Qt4 development ?

Yes. Neither Qt3 nor Qt4 officially supports Warp3. And there are no current plans to provide such support.

in reply to:  14 comment:16 by dmacias, 15 years ago

Replying to dmik:

A new bunch of the errors from the .zip is indeed due to the missing printing support and missing accessibility support in Qt 4.5.1 for OS/2.

So we achieved a great advance and rest is work in progress. Fine

As of accessibility, we may also provide a dummy implementation in 4.6.1, but it's not there yet

Do you have plan to do it ? If so then I can wait for changes before to try a checkout/build of Qt

The warnings in qmime.h are known you may ignore them for now.

Ok, thanks

David Macias

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

Yes, we decided to provide the dummy QAccessible implementation in 4.6.1. Which is to be released within about a week.

in reply to:  17 comment:18 by dmacias, 15 years ago

Replying to dmik:

Yes, we decided to provide the dummy QAccessible implementation in 4.6.1. Which is to be released within about a week.

OK, thanks

As I can see this ticket can be closed as main problem is solved

In order to mantain communication I tried:

  • qt-user()netlabs.org [read online]

and content is empty

  • qt-dev()netlabs.org [read online]

"All ticket changes are automatically posted to this list"

and no one info of tickets appear here

So how can I mantain contact for further questions, in place of using tickets ?

In order to advance and check Harbour hbqt, hbxbp, hbide, ... before official 4.6.1 release, I tried to build Qt4 using current code:

  • Checkout of svn.netlabs.org/repos/qt4/trunk
  • Environment based in readme.os2, including CUPS, thread,...
  • Set os2gcc442
  • Set Qt4 set LIBRARY_PATH=e:\OS2\DLL;e:\MPTN\DLL;%LIBRARY_PATH% set PATH=E:\Qt4\bin;%PATH% set BEGINLIBPATH=E:\Qt4\bin;%BEGINLIBPATH%
  • configure.cmd fail:
    [...]
    cd e:\qt4\src\svg && e:\qt4\bin\qmake.exe svg.pro -os2 -o Makefile
    cd e:\qt4\src\script && e:\qt4\bin\qmake.exe script.pro -os2 -o Makefile
    cd e:\qt4\src\scripttools && e:\qt4\bin\qmake.exe scripttools.pro -os2 -o Makefile
    cd e:\qt4\src\declarative && e:\qt4\bin\qmake.exe declarative.pro -os2 -o Makefile
    Cannot find file: declarative.pro.
    make.exe: *** [sub-declarative-qmake_all] Error 2
    
  • Changing in configure.cmd:
    /*DAVID:    if (G.CFG_DECLARATIVE == "auto")    then G.CFG_DECLARATIVE = "yes"  */
        if (G.CFG_DECLARATIVE == "auto")    then G.CFG_DECLARATIVE = "no"
    

then it complete configure.cmd

  • Using "make release" fail:
    g++ -c @tmp\obj\release-shared\CXXFLAGS.uic.Release.rsp @tmp\obj\release-shared\
    DEFINES.uic.Release.rsp @tmp\obj\release-shared\INCPATH.uic.Release.rsp -o tmp\o
    bj\release-shared\cppwriteiconinitialization.obj cpp\cppwriteiconinitialization.
    cpp
    cpp\cppwriteiconinitialization.cpp: In member function 'virtual void CPP::WriteI
    conInitialization::acceptImage(DomImage*)':
    cpp\cppwriteiconinitialization.cpp:109: error: 'fixString' was not declared in t
    his scope
    make[2]: *** [tmp\obj\release-shared\cppwriteiconinitialization.obj] Error 1
    make[2]: Leaving directory `E:/qt4/src/tools/uic'
    make[1]: *** [release] Error 2
    make[1]: Leaving directory `E:/qt4/src/tools/uic'
    make: *** [release-E__qt4_src_tools_uic] Error 2
    

So I am unable to build current Qt4 :-(

David Macias

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

Re qt-dev()netlabs.org, something is broken somewhere so trac doesn't actually send commit reports to this mailing list. If you are interested in commits, you may subscribe to it via RSS here http://svn.netlabs.org/qt4/timeline (bottom of the page).

Regarding the failing build, r590 should fix the exact problem you faced (thanks for reporting!) however the trunk doesn't yet fully build yet (see #136).

The third build problem occurs to everyone else trying to build it :) It's due to the invalid environment. The details (and the fix) are here http://svn.netlabs.org/qt4/ticket/110#comment:11. Use gccenv.cmd attached to the ticket and the problem should go away.

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

Closing this ticket; please report further problems by creating new ones.

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

Resolution: wontfix
Status: newclosed

in reply to:  19 comment:22 by dmacias, 15 years ago

Replying to dmik:

Re qt-dev()netlabs.org, something is broken somewhere so trac doesn't actually send commit reports to this mailing list. If you are interested in commits, you may subscribe to it via RSS here http://svn.netlabs.org/qt4/timeline (bottom of the page).

But,
So how can I mantain contact for further questions, in place of using tickets ?

Regarding the failing build, r590 should fix the exact problem you faced (thanks for reporting!) however the trunk doesn't yet fully build yet (see #136).

The third build problem occurs to everyone else trying to build it :) It's due to the invalid environment. The details (and the fix) are here http://svn.netlabs.org/qt4/ticket/110#comment:11. Use gccenv.cmd attached to the ticket and the problem should go away.

With your changes in r590, #136 and #110 (gccenv.cmd), current Qt4 SVN code:

  • configure.cmd work completely
  • "make release" fail with:
    g++ -c @tmp\obj\release-shared\CXXFLAGS.QtGui.Release.rsp @tmp\obj\release-share
    d\DEFINES.QtGui.Release.rsp @tmp\obj\release-shared\INCPATH.QtGui.Release.rsp -o
     tmp\obj\release-shared\qprintpreviewwidget.obj widgets\qprintpreviewwidget.cpp
    E:\qt4\bin\moc.exe @tmp\obj\release-shared\DEFINES.QtGui.Release.rsp @tmp\obj\re
    lease-shared\INCPATH.QtGui.Release.rsp -D__OS2__ -D__EMX__ -D__INNOTEK_LIBC__ -D
    __GNUC__ dialogs\qprintdialog.h -o tmp\moc\release-shared\moc_qprintdialog.cpp
    e:\qt4\bin\rcc.exe -name qprintdialog dialogs\qprintdialog.qrc -o tmp\rcc\releas
    e-shared\qrc_qprintdialog.cpp
    E:\qt4\bin\moc.exe @tmp\obj\release-shared\DEFINES.QtGui.Release.rsp @tmp\obj\re
    lease-shared\INCPATH.QtGui.Release.rsp -D__OS2__ -D__EMX__ -D__INNOTEK_LIBC__ -D
    __GNUC__ dialogs\qprintdialog_unix.cpp -o tmp\moc\release-shared\qprintdialog_un
    ix.moc
    g++ -c @tmp\obj\release-shared\CXXFLAGS.QtGui.Release.rsp @tmp\obj\release-share
    d\DEFINES.QtGui.Release.rsp @tmp\obj\release-shared\INCPATH.QtGui.Release.rsp -o
     tmp\obj\release-shared\qprintdialog_unix.obj dialogs\qprintdialog_unix.cpp
    dialogs\qprintdialog_unix.cpp:1294:32: error: qrc_qprintdialog.cpp: No such file
     or directory
    make[2]: *** [tmp\obj\release-shared\qprintdialog_unix.obj] Error 1
    make[2]: Leaving directory `E:/qt4/src/gui'
    make[1]: *** [release] Error 2
    make[1]: Leaving directory `E:/qt4/src/gui'
    make: *** [release-E__qt4_src_gui] Error 2
    

and advance is:

23/02/10  1:10a       591,838      0 a---  QtCore4.def
23/02/10  1:10a     1,158,144    124 a---  QtCore4.lib
23/02/10  1:11a     1,608,141      0 a---  QtCore4.dll
23/02/10  1:11a       434,557      0 a---  QtCore4.map
23/02/10  1:11a       100,308      0 a---  QtXml4.def
23/02/10  1:11a       206,848    124 a---  QtXml4.lib
23/02/10  1:11a       197,129      0 a---  QtXml4.dll
23/02/10  1:11a        86,343      0 a---  QtXml4.map
23/02/10  1:21a       244,170      0 a---  QtNet4.def
23/02/10  1:21a       508,416    124 a---  QtNet4.lib
23/02/10  1:21a       639,513      0 a---  QtNet4.dll
23/02/10  1:21a       243,495      0 a---  QtNet4.map

David Macias

comment:23 by Silvan Scherrer, 15 years ago

to get in contact we have also a newsgroup. gmane.org.netlabs.qt.devel

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

qt-dev()netlabs.org is a good place to discuss such sort of things. This is just the e-mail entry to the same newsgroup Silvan mentioned above.

The new build problem should have already been fixed by r593. Please try it. Remember to re-run configure.cmd after the update and let it create all the makefiles again.

in reply to:  24 comment:25 by dmacias, 15 years ago

Replying to dmik:

The new build problem should have already been fixed by r593. Please try it. Remember to re-run configure.cmd after the update and let it create all the makefiles again.

I have r593
I made:

  • make confclean
  • configure.cmd
  • make release

and error is exactly the same

David Macias

comment:26 by Silvan Scherrer, 15 years ago

please get r594, as r593 didn't fix it completely

in reply to:  26 comment:27 by dmacias, 15 years ago

Replying to diver:

please get r594, as r593 didn't fix it completely

Thanks,
I used r598 in fresh checkout and after 7 hours building Qt461 it complete entirely without problems ( make release )

Building Harbour-hbqt contrib with Qt461 show problems in only two files in place of eleven, which belong to hbgui.lib

# QInputContext.cpp \
# QWidget.cpp \

Skipping these two files, Harbour-(hbqt.lib, hbqtcore.lib, hbgui.lib, hbnetwork.lib) build entirely
Trying to build applications using hbqt* libs, as demoqt.prg, hbide project, both fails due missing mainly by QWidget symbols but other symbols too

I am attaching qt4_logs.zip file which contain:

  • make_qt.log Entire output of Qt461 build As my build is in environment different than yours, log file can serve to check, confirm, maybe to know new/different errors/warnings Searching for "warning" string in file help to review content quickly
  • hbqt.log Output of Harbour-hbqt contrib build. Content are errors processing: # QInputContext.cpp \ # QWidget.cpp \ In few words, this is what is missing in Qt461 in order to achieve hbqt build in Harbour for OS/2
  • demoqt.log, hbide.log Both are applications which need hbqt* libs and due missings in Qt461 no one application can be completed

Question: QInputContext, QWidget missings are related to planned QAccessible, or are additional missings ?
("Yes, we decided to provide the dummy QAccessible implementation in 4.6.1")

Thanks again for your help and I hope these tests help to mature Qt4 for OS/2, and obviously to put to work hbqt contrib in Harbour for OS/2

David Macias

by dmacias, 15 years ago

Attachment: qt4_logs.zip added

Events in different builds/tests

comment:28 by dmacias, 15 years ago

We have advances
With some changes in hbqtgui source code, we have our firsts Harbour+os2gcc442+hbqt+qt461 applications running, but with errors still
Many crashes with "Killed by SIGSEGV"

All tests with r598

Next is my report to Harbour development mailing list:

Pritpal, thanks

>>I need a basic code sample to test hbqt, without use of QInputContext,
>>QWidget, just to know if hbqt-qt461 for OS/2 will run

>>Something as minidemoqt.prg  :-)

>This is not possible without QWidget class.
>QWidget is the parent of all GUI classes.
>This is the object tree :

>QObject, QPaintDevice
>   QWidget
>      All Other GUI Widgets - menus, buttons, etc

>So I need to resolve it in base class first,
>then probably everything will built properly.


>Please do the following:

>0. QApplication.cpp -> HB_FUNC( QT_QWIDGET_INPUTCONTEXT )
>       Comment it out.
Done

>1. QWidget.cpp -> HB_FUNC( QT_QWIDGET_INPUTCONTEXT )
>       Comment it out.
Done

>2. Also commentout corresponding methods in 
>    TQApplication and TQWidget.
Done

>3. Drop QInputContext.cpp and TQInputContext.prg from filelist.mk
Done

>Compile hbQT. Do it compiles then ? If yes, we have the solution 
>already,

Compiling hbqtgui fail with QWidget.cpp, as expected, with:
----------------------
gcc   -I. -I../../../../../../include -Zomf -Wall -W -O3 -DHB_LEGACY_TYPES_OFF  -IE:\qt4\include -IE:\qt4\include/QtCore -IE:\qt4\include/QtGui -DHB_FM_STATISTICS_OFF -oQWidget.o -c ../../../QWidget.cpp
../../../QWidget.cpp: In function 'void HB_FUN_QT_QWIDGET_ACCESSIBLEDESCRIPTION()':
../../../QWidget.cpp:196: error: 'class QWidget' has no member named 'accessibleDescription'
../../../QWidget.cpp: In function 'void HB_FUN_QT_QWIDGET_ACCESSIBLENAME()':
../../../QWidget.cpp:204: error: 'class QWidget' has no member named 'accessibleName'
../../../QWidget.cpp: In function 'void HB_FUN_QT_QWIDGET_SETACCESSIBLEDESCRIPTION()':
../../../QWidget.cpp:968: error: 'class QWidget' has no member named 'setAccessibleDescription'
../../../QWidget.cpp: In function 'void HB_FUN_QT_QWIDGET_SETACCESSIBLENAME()':
../../../QWidget.cpp:976: error: 'class QWidget' has no member named 'setAccessibleName'
make[1]: *** [QWidget.o] Error 1
----------------------

So I used:

QWidget.cpp
===========
/*DAVID:
HB_FUNC( QT_QWIDGET_ACCESSIBLEDESCRIPTION )
{
   hb_retc( hbqt_par_QWidget( 1 )->accessibleDescription().toAscii().data() );
}
*/
/*DAVID:
HB_FUNC( QT_QWIDGET_ACCESSIBLENAME )
{
   hb_retc( hbqt_par_QWidget( 1 )->accessibleName().toAscii().data() );
}
*/
/*DAVID:
HB_FUNC( QT_QWIDGET_SETACCESSIBLEDESCRIPTION )
{
   hbqt_par_QWidget( 1 )->setAccessibleDescription( QWidget::tr( hb_parc( 2 ) ) );
}
*/
/*DAVID:
HB_FUNC( QT_QWIDGET_SETACCESSIBLENAME )
{
   hbqt_par_QWidget( 1 )->setAccessibleName( QWidget::tr( hb_parc( 2 ) ) );
}
*/


TQWidget.prg
===========
//DAVID:   METHOD  accessibleDescription()
//DAVID:   METHOD  accessibleName()
//DAVID:   METHOD  setAccessibleDescription( cDescription )
//DAVID:   METHOD  setAccessibleName( cName )
/*DAVID:
METHOD QWidget:accessibleDescription()
   RETURN Qt_QWidget_accessibleDescription( ::pPtr )
*/

/*DAVID:
METHOD QWidget:accessibleName()
   RETURN Qt_QWidget_accessibleName( ::pPtr )
*/
/*DAVID:
METHOD QWidget:setAccessibleDescription( cDescription )
   RETURN Qt_QWidget_setAccessibleDescription( ::pPtr, cDescription )
*/

/*DAVID:
METHOD QWidget:setAccessibleName( cName )
   RETURN Qt_QWidget_setAccessibleName( ::pPtr, cName )
*/


and hbqtgui.lib build entirely


>link demos. Those must then link properly.

>If all goes fine, I will drop QInputContext alltogether.

>Without above exercise, it is difficult to isolate other matters.
>Logs of demos are useless as QWidget is not linked and all other 
>Qt world resolves around it.

So you can:
- drop QInputContext alltogether.
- Guard *Accessible* methods for OS/2 and 
   #ifndef QT_NO_ACCESSIBILITY / #endif 
 while "dummy QAccessible implementation in 4.6.1" can be completed


Trying to use hbqt* libs with samples/projects:
( All tests with Harbour 13976 )

demoqt.prg
==========
- It build fine
- Running it, create a small window with a three colors icon on it and crash with (output is mixed 1,2):
----------------------
demoqt.prg:127:MAIN(): HB_TR_ALWAYS   
demoqt.prg:128:MAIN(): HB_TR_ALWAYS -----------------b-----------------

Exception c0000005 at address 0x1e8af6f8 


    Exception Code:C0000005
    Exception Address:1E8AF6F8
    EAX:0000002B  EBX:0050F2A0  ECX:0000002A  EDX:00000358
    ESI:029B0D64  EDI:02B5BFC0  EBP:002FED10
    CS:EIP:005B:1E8AF6F8  SS:ESP:0053:002FE7D8
    DS:0053  ES:0053  FS:150B  GS:0000
    Flags:00010202
Called from QT_QWIDGET_RESIZE(0)
Called from QMAINWINDOW:RESIZE(0) in ../../../TQWidget.prg
Called from MAIN(141) in demoqt.prg

Killed by SIGSEGV
pid=0x142b ppid=0x005e tid=0x0001 slot=0x00a2 pri=0x0200 mc=0x0001
E:\HARBOUR102\HARBOUR\CONTRIB\HBQT\TESTS\DEMOQT.EXE
PMMERGE 3:0007f6f8
cs:eip=005b:1e8af6f8      ss:esp=0053:002fe7d8      ebp=002fed10
 ds=0053      es=0053      fs=150b      gs=0000     efl=00010202
eax=0000002b ebx=0050f2a0 ecx=0000002a edx=00000358 edi=02b5bfc0 esi=029b0d64
Process dumping was disabled, use DUMPPROC / PROCDUMP to enable it.
----------------------


demoxbp.prg
==========
- It build fine
- Running it, create a big window with a three colors icon on it and crash with (output is mixed 1,2):
----------------------
Exception c0000005 at address 0x1ddd69ca 


    Exception Code:C0000005
    Exception Address:1DDD69CA
    EAX:00000001  EBX:02A9CE84  ECX:02A9CE8C  EDX:00000001
    ESI:00000000  EDI:02A9CE74  EBP:0039F728
    CS:EIP:005B:1DDD69CA  SS:ESP:0053:0039F710
    DS:0053  ES:0053  FS:150B  GS:0000
    Flags:00010246
Called from QPIXMAP:SCALED(0) in ../../../TQPixmap.prg
Called from XBPSTATUSBAR:SETPOINTER(0) in ../../../xbpwindow.prg
Called from BUILD_STATUSBAR(531) in demoxbp.prg
Called from BUILDADIALOG(168) in demoxbp.prg
Called from _BUILDADIALOG(107) in demoxbp.prg
Called from MAIN(98) in demoxbp.prg

Killed by SIGSEGV
pid=0x1459 ppid=0x142e tid=0x0001 slot=0x00a8 pri=0x0200 mc=0x0001
E:\HARBOUR102\HARBOUR\CONTRIB\HBXBP\TESTS\DEMOXBP.EXE
LIBC063 0:000669ca
cs:eip=005b:1ddd69ca      ss:esp=0053:0039f710      ebp=0039f728
 ds=0053      es=0053      fs=150b      gs=0000     efl=00010246
eax=00000001 ebx=02a9ce84 ecx=02a9ce8c edx=00000001 edi=02a9ce74 esi=00000000
Process dumping was disabled, use DUMPPROC / PROCDUMP to enable it.
----------------------


demoqt.prg
==========
- Build fine
- Open a window with content
- Maximize beyond of desktop size
- Fx keys seem to work
- Output from 1,2 are:
----------------------
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::begin: Paint device returned engine == 0, type: 1
QFont::setPointSize: Point size <= 0 (0), must be greater than 0
QPainter::begin: Paint device returned engine == 0, type: 1
QFont::setPointSize: Point size <= 0 (0), must be greater than 0
QPainter::begin: Paint device returned engine == 0, type: 1
QFont::setPointSize: Point size <= 0 (0), must be greater than 0
QPainter::begin: Paint device returned engine == 0, type: 1
QFont::setPointSize: Point size <= 0 (0), must be greater than 0
----------------------


hbide project ( the BIG one ! )
===============================
- Build fine
- Open a window with content, with a lot of icons, menus, ...
- Windows resize, max, min, move, ... work fine
- Many checkboxs, actions work fine
- Many actions fails, for example "Open"
 Log file is around 800 lines, here are the bottom (1,2 mixed):
----------------------
THbQtUI.prg:0:HBQ_DBG(): HB_TR_ALWAYS DialogFind           {|o,v| o[v]:setWindowTitle(q__tr("DialogFind", "Find and Replace", 0, "UTF8"))}
THbQtUI.prg:0:HBQ_DBG(): HB_TR_ALWAYS groupBox_2           {|o,v| o[v]:setTitle("")}
THbQtUI.prg:0:HBQ_DBG(): HB_TR_ALWAYS groupBox_3           {|o,v| o[v]:setTitle("")}
idemisc.prg:897:HBIDE_DBG(): HB_TR_ALWAYS C:\dev_sources\vouch\abc.prg
idemisc.prg:897:HBIDE_DBG(): HB_TR_ALWAYS C:\harbour\contrib\hbide\projects\vouch\abc.prg

Exception c0000005 at address 0x1ddd69ca 


    Exception Code:C0000005
    Exception Address:1DDD69CA
    EAX:00000001  EBX:02BF9B64  ECX:02BF9B6C  EDX:00000001
    ESI:00000000  EDI:02BF9B6C  EBP:0058DB6C
    CS:EIP:005B:1DDD69CA  SS:ESP:0053:0058DB54
    DS:0053  ES:0053  FS:150B  GS:0000
    Flags:00010246
Called from QT_QDIALOG_EXEC(0)
Called from QFILEDIALOG:EXEC(0) in ../../../TQDialog.prg
Called from XBPFILEDIALOG:OPEN(0) in ../../../xbpfiledialog.prg
Called from IDESOURCESMANAGER:SELECTSOURCE(442) in idesources.prg
Called from IDESOURCESMANAGER:OPENSOURCE(411) in idesources.prg
Called from HBIDE:EXECSOURCEACTION(720) in hbide.prg
Called from HBIDE:EXECACTION(499) in hbide.prg
Called from (b)IDEACTIONS_BUILDMAINMENU(411) in ideactions.prg
Called from XBPMENU:EXEBLOCK(0) in ../../../xbpmenubar.prg
Called from (b)XBPMENUBAR_PLACEITEM(0) in ../../../xbpmenubar.prg
Called from QT_QEVENTLOOP_PROCESSEVENTS(0)
Called from QEVENTLOOP:PROCESSEVENTS(0) in ../../../TQEventLoop.prg
Called from APPEVENT(0) in ../../../xbpgeneric.prg
Called from HBIDE:CREATE(417) in hbide.prg
Called from MAIN(110) in hbide.prg

Killed by SIGSEGV
pid=0x1439 ppid=0x142e tid=0x0001 slot=0x00a8 pri=0x0200 mc=0x0001
E:\HARBOUR102\HARBOUR\CONTRIB\HBIDE\HBIDE.EXE
LIBC063 0:000669ca
cs:eip=005b:1ddd69ca      ss:esp=0053:0058db54      ebp=0058db6c
 ds=0053      es=0053      fs=150b      gs=0000     efl=00010246
eax=00000001 ebx=02bf9b64 ecx=02bf9b6c edx=00000001 edi=02bf9b6c esi=00000000
Process dumping was disabled, use DUMPPROC / PROCDUMP to enable it.
----------------------

So we have our firsts Harbour+os2gcc442+hbqt+qt461 applications running, but with failures still

We are advancing :-)

David Macias

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

Okay, good to hear that there is some progress.

What about crashes you get, I would recommend you to build the debug vesion of Qt and run your application from under a debugger to get the call stack at a time when it crashes. If you then post the call stack, I will be able to look at the problem.

And, please, use the the qt-dev mailing list for further discussion on this topic. This ticket is not the right place for it.

Note: See TracTickets for help on using tickets.