Re: Qt3 breakage since 1.5.19

2006-02-27 Thread Yaakov S (Cygwin Ports)

Marc Toussaint wrote:
 I found your discussion on the broken QT port to cygwin.

http://cygwin.com/acronyms/#PPIOSPE
I'm redirecting this to the cygwin-xfree list.  Please make sure that 
your mail client respects the Reply-To: address.


 I have the same problem with uic: it is producing broken code (it
 looks as if half of the file is simply missing)

See my post to the cygwin list:
http://cygwin.com/ml/cygwin/2006-02/msg00472.html

 Is there any solution yet? I'm desparate. Is there any way to undo the
 qt3 update with the cygwin installer?

AFAIK the problem is with cygwin-1.5.19.  You could downgrade cygwin to 
1.5.18, but you will also need to downgrade a number of other packages, 
the current versions of which depend on new features in 1.5.19.


Besides that, you could help track down the problem in cygwin itself, so 
that we have a chance in getting this fixed for 1.5.20.



Yaakov

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Qt3 breakage since 1.5.19

2006-02-02 Thread Yaakov S (Cygwin Ports)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

René Berber wrote:
 Running Scribus with the debug enabled cygqt-mt-3.dll the program
 works fine with no mutex failure message and using the latest Cygwin
 snapshot.  As mentioned in my reply to Brian, under gdb there are many
 SIGSEGV signals received but continuing results in the same behaviour
 as above: no problem.

 So there seems to be no regression, there must be something different
 btw. the original build environment and my PC.  I used the code (build
 script, patches and original code) downloaded using setup.exe.

OK, we need to get back to this.  Now that cygwin-1.5.19-4 is out, I'm
seeing the same breakage with qt3-3.3.4:

$ scribus
Mutex init failure: Device or resource busy
[splashscreen shows, gets as far as loading plugins, then:]
Mutex init failure: Invalid argument
[exits silently]

$ convertall
[this is a PyQt app.  It exits silently also.]

But not everything is affected apparently:

$ xxdiff file1 file2
Mutex init failure: Device or resource busy
[works, just like before]
Mutex lock failure: Invalid argument
Mutex unlock failure: Invalid argument
Mutex destroy failure: Invalid argument

1) Something changed between 1.5.18 and the 20051207 snapshot to break
qt3 threading.
2) It should not be necessary to have a debug library in order for
ordinary programs to work.
3) A threaded Qt is required for many packages, including KDE, so
disabling threading is not a viable option.

Ideas?


Yaakov
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFD4nhCpiWmPGlmQSMRAh9lAKCtvF9//J6zC4KWQsdJN9wiHPd95QCgxerD
UYICx6yxX23jjUdxJAChwyg=
=SImM
-END PGP SIGNATURE-

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Qt3 breakage since 1.5.19

2006-02-02 Thread René Berber
Yaakov S (Cygwin Ports) wrote:

Running Scribus with the debug enabled cygqt-mt-3.dll the program
works fine with no mutex failure message and using the latest Cygwin
snapshot.  As mentioned in my reply to Brian, under gdb there are many
SIGSEGV signals received but continuing results in the same behaviour
as above: no problem.

So there seems to be no regression, there must be something different
btw. the original build environment and my PC.  I used the code (build
script, patches and original code) downloaded using setup.exe.
 
 
 OK, we need to get back to this.  Now that cygwin-1.5.19-4 is out, I'm
 seeing the same breakage with qt3-3.3.4:
 
 $ scribus
 Mutex init failure: Device or resource busy
 [splashscreen shows, gets as far as loading plugins, then:]
 Mutex init failure: Invalid argument
 [exits silently]

Yep, exactly my original problem.

 $ convertall
 [this is a PyQt app.  It exits silently also.]
 
 But not everything is affected apparently:
 
 $ xxdiff file1 file2
 Mutex init failure: Device or resource busy
 [works, just like before]
 Mutex lock failure: Invalid argument
 Mutex unlock failure: Invalid argument
 Mutex destroy failure: Invalid argument
 
 1) Something changed between 1.5.18 and the 20051207 snapshot to break
 qt3 threading.

Or the change exposed a bug in Qt.

 2) It should not be necessary to have a debug library in order for
 ordinary programs to work.

The library is as close as it gets to a regular library, I separated the debug
info, it's just not optimized.

It would be interesting to test a rebuilt regular library, have you done that?

 3) A threaded Qt is required for many packages, including KDE, so
 disabling threading is not a viable option.
 
 Ideas?

All those mutex lock failure point to the threads implementation.  If you want
to go from what changed in Cygwin's dll forward, it has to be something in
threads.

Going the other way, what I tried is using gdb trying to look at what breaks the
program.  The worst part is that under gdb they run fine many times, then break
(with the debug library).

Yet another approach could be to do the porting of the newer 3.x/4.x version.
-- 
René Berber


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Qt3 breakage since 1.5.19

2006-02-02 Thread René Berber
René Berber wrote:

 The library is as close as it gets to a regular library, I separated the debug
 info, it's just not optimized.
 
 It would be interesting to test a rebuilt regular library, have you done that?

Answering my own question: no, it doesn't work.

Just tested it, rebuilt Qt with original script, build failed as always (uic
produced an invalid file, truncated but this time uic did not print the mutex
failed... message so it gets even weirder).  Scribus dies as before.

At the same time I also tested another idea, all the SIGSEGV signals that you
can see under gdb are caused by uninitialized variables passed as parameters, so
I added -Wall to CFLAGS to see if something jumps up.  I'l see what I can find
this way.
-- 
René Berber


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Qt3 breakage since 1.5.19

2006-02-02 Thread Yaakov S (Cygwin Ports)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

René Berber wrote:
 Or the change exposed a bug in Qt.

Either way, it was working in 1.5.18 (didn't I already say I'd be
unhappy if my qt3 was broken with 1.5.19?).

 The library is as close as it gets to a regular library, I separated the debug
 info, it's just not optimized.
 
 It would be interesting to test a rebuilt regular library, have you done that?

Actually, now that you mention it...

I was in the middle of building kdelibs-3.5.1 when gcc choked on
uic-generated code (this happened with both 3.3.4 and 3.3.5).  So I went
back to rebuild 3.3.4, and now it won't finish either.

g++ -c -pipe -I/usr/include/postgresql/server
- -I/usr/include/postgresql/pgsql -I/usr/include/postgresql/pgsql/server
- -fno-exceptions -DPIC -Wall -W -O2 -D_REENTRANT  -DDESIGNER
- -DQT_INTERNAL_XML -DQT_INTERNAL_WORKSPACE -DQT_INTERNAL_ICONVIE
W -DQT_INTERNAL_TABLE -DQT_TABLET_SUPPORT -DQT_NO_DEBUG
- -DQT_THREAD_SUPPORT
- -I/home/Yaakov/src/kde/qt/3/qt-x11-free-3.3.4/.build/mkspecs/cygwin-g++
- -I. -I/usr/include/freetype2 -I../shared -I../uilib -I../../../include
- -I/usr/X11R6/include -I.moc/release-shared-mt/ -o ./listboxeditor.o
listboxeditor.cpp
listboxeditor.cpp:32:7: warning: no newline at end of file
listboxeditor.cpp: In constructor
'ListBoxEditorBase::ListBoxEditorBase(QWidget*, const char*, bool, uint)':
listboxeditor.cpp:32: error: expected identifier at end of input
listboxeditor.cpp:32: error: expected `(' at end of input
listboxeditor.cpp:32: error: expected `{' at end of input
listboxeditor.cpp: At global scope:
listboxeditor.cpp:32: warning: unused parameter 'parent'
listboxeditor.cpp:32: warning: unused parameter 'name'
listboxeditor.cpp:32: warning: unused parameter 'modal'
listboxeditor.cpp:32: warning: unused parameter 'fl'
listboxeditor.cpp:32: warning: unused parameter 'parent'
listboxeditor.cpp:32: warning: unused parameter 'name'
listboxeditor.cpp:32: warning: unused parameter 'modal'
listboxeditor.cpp:32: warning: unused parameter 'fl'
make: *** [listboxeditor.o] Error 1

Looking at the generated listboxeditor.cpp (and at the KDE package), it
seems that uic doesn't compile .ui files correctly, resulting in the
above gcc errors.

Running the uic command to generate this code in gdb, I get a bunch of
SIGSEGV in pthread_mutex* functions in cygwin1.dll, then:

Program received signal SIGSEGV, Segmentation fault.
0x713f33a4 in QRealMutexPrivate::QRealMutexPrivate ()
   from
/home/Yaakov/src/kde/qt/3/qt-x11-free-3.3.4/.build/bin/cygqt-mt-3.dll

The offending code is in src/tools/qmutex_unix.cpp (which has absolutely
no changes from 3.3.4 to 3.3.5).

 All those mutex lock failure point to the threads implementation.  If you 
 want
 to go from what changed in Cygwin's dll forward, it has to be something in
 threads.
 
 Going the other way, what I tried is using gdb trying to look at what breaks 
 the
 program.  The worst part is that under gdb they run fine many times, then 
 break
 (with the debug library).

 Yet another approach could be to do the porting of the newer 3.x/4.x version.

Same story with 3.3.5, but it's still hard-masked unstable on Gentoo, so
I'm holding it back (at least until I see how KDE 3.5 works with it).
Qt4 is totally different and incompatible with qt3 (but will be parallel
installable, once I get working on it).  Let's get this working first,
though.


Yaakov
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFD4sdZpiWmPGlmQSMRApURAKC4SeiVPZJFe9Fbg3U9MjBvl5jDTgCfX9NI
sIjdGmnQKbGmTS5nwhAklVo=
=NNJm
-END PGP SIGNATURE-

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Qt3 breakage since 1.5.19

2006-02-02 Thread René Berber
Yaakov S (Cygwin Ports) wrote:
[snip]
 Actually, now that you mention it...
 
 I was in the middle of building kdelibs-3.5.1 when gcc choked on
 uic-generated code (this happened with both 3.3.4 and 3.3.5).  So I went
 back to rebuild 3.3.4, and now it won't finish either.
 
 g++ -c -pipe -I/usr/include/postgresql/server
 -I/usr/include/postgresql/pgsql -I/usr/include/postgresql/pgsql/server
 -fno-exceptions -DPIC -Wall -W -O2 -D_REENTRANT  -DDESIGNER
 -DQT_INTERNAL_XML -DQT_INTERNAL_WORKSPACE -DQT_INTERNAL_ICONVIE
 W -DQT_INTERNAL_TABLE -DQT_TABLET_SUPPORT -DQT_NO_DEBUG
 -DQT_THREAD_SUPPORT
 -I/home/Yaakov/src/kde/qt/3/qt-x11-free-3.3.4/.build/mkspecs/cygwin-g++
 -I. -I/usr/include/freetype2 -I../shared -I../uilib -I../../../include
 -I/usr/X11R6/include -I.moc/release-shared-mt/ -o ./listboxeditor.o
 listboxeditor.cpp
 listboxeditor.cpp:32:7: warning: no newline at end of file
[snip]

Yes, same problem I've been seeing.

 Looking at the generated listboxeditor.cpp (and at the KDE package), it
 seems that uic doesn't compile .ui files correctly, resulting in the
 above gcc errors.

Actually is more complicated than that, uic sometimes runs perfectly, then fails
like above (except that with a snapshot, previous to latest release, it
deadlocked on a mutex).  In fact if you look at the output above the failure,
uic ran many times generating .h files and I've seen that it does generate a few
.cpp files before it fails.

Even more strange, I've seen it run on the same file that it failed before when
I ran it by hand, but not always... I'm not sure if that means that it corrupts
something in the shared memory set by cygwin1.dll, I really don't know how that
works.

 Running the uic command to generate this code in gdb, I get a bunch of
 SIGSEGV in pthread_mutex* functions in cygwin1.dll, then:
 
 Program received signal SIGSEGV, Segmentation fault.
 0x713f33a4 in QRealMutexPrivate::QRealMutexPrivate ()
from
 /home/Yaakov/src/kde/qt/3/qt-x11-free-3.3.4/.build/bin/cygqt-mt-3.dll
 
 The offending code is in src/tools/qmutex_unix.cpp (which has absolutely
 no changes from 3.3.4 to 3.3.5).

Interesting.

[snip]
 Same story with 3.3.5, but it's still hard-masked unstable on Gentoo, so
 I'm holding it back (at least until I see how KDE 3.5 works with it).
 Qt4 is totally different and incompatible with qt3 (but will be parallel
 installable, once I get working on it).  Let's get this working first,
 though.

Looks like the path of least resistance is looking at cygwin1.dll changes.  I
prefer to use gdb, that's why I installed the cygwin code and made a debug qt
library.

Any idea why the debug library works?  I already tought that the optimization
may be doing something wrong, but your notes above point in another direction.

Regards.
-- 
René Berber


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/