Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, February 2007
Compiling Qt4 with gcc-2.95


Message 1 in thread

Hi!

There is need to using Qt4 library with compiler gcc-2.95. 
Does anybody makes it? gcc-2.95 is not supported by Trolltech.

-- 
 [ signature omitted ] 

Message 2 in thread

El Lunes 19 Febrero 2007 12:32, Anatoly Kanashin escribió:
> Hi!
>
> There is need to using Qt4 library with compiler gcc-2.95.
> Does anybody makes it? gcc-2.95 is not supported by Trolltech.

I don't really think it would work :-(

-- 
 [ signature omitted ] 

Message 3 in thread

Lisandro Damián Nicanor Pérez Meyer wrote:

> El Lunes 19 Febrero 2007 12:32, Anatoly Kanashin escribió:
>> Hi!
>>
>> There is need to using Qt4 library with compiler gcc-2.95.
>> Does anybody makes it? gcc-2.95 is not supported by Trolltech.
> 
> I don't really think it would work :-(
I had this problem once, too.
Iirc, it mostly compiled even with that old compiler. Qt4's foreach
construct caused problems, though. I had to replace it by 'normal'
iterators a couple of times.

Maybe there were one or two minor other points, but in the end I had it
running (and it seemed to work fine).

Still, if you can somehow make sure to get gcc3 or 4, that would be a better
option. Otherwise you might have to keep patching coming Qt4 releases.

HTH
Christoph 

--
 [ signature omitted ] 

Message 4 in thread

On Tuesday 20 February 2007 01:17, Christoph Duelli wrote:
>
> I had this problem once, too.
> Iirc, it mostly compiled even with that old compiler. Qt4's foreach
> construct caused problems, though. I had to replace it by 'normal'
> iterators a couple of times.
>
> Maybe there were one or two minor other points, but in the end I had it
> running (and it seemed to work fine).
>
> Still, if you can somehow make sure to get gcc3 or 4, that would be a
> better option. Otherwise you might have to keep patching coming Qt4
> releases.
>
> HTH
> Christoph
>
I've got some strange troubles with Qt4.2.2 build by gcc-2.95......

1) Strange colors in styles.
In my KDE3.5 (under debian etch) i set plastique style. Assistant from Qt4 
(build by gcc-2.95) looks right except some elements: i found dark-red color 
(RGB: #d0a3a3) instead of normal blue (RGB: #7a909c). I've check some pixels 
and don't found any circumstances.....

2) in my application:
    QPainter p;
    p.drawImage (QPoint(0,0), img.scaled(X, Y));
don't work. but:

    QPainter p;
    p.setMatrix(QMatrix(.....));
    p.drawImage(QPoint(0,0), img);
WORKS!
:)
I found this construction in Qt sources and gave it for debugging. And It's 
works..... hm.....

And in target system:
3) designer don't start with GUI-mode "Docked Windows" (segmentation fail 
occured). Only started with mode "Multiple Top-level windows". If GUI-mode 
change from menu - style updates normally. But at next start - segmentation 
failed. In memset (libc) called from QFoneEngineFT::Font::loadGlyph

4) DockWidgets demo don't started. segmentation failed, hm.......

Strange situation..... %/

-- 
 [ signature omitted ] 

Message 5 in thread

On 22.02.07 20:29:48, Anatoly Kanashin wrote:
> On Tuesday 20 February 2007 01:17, Christoph Duelli wrote:
> >
> > I had this problem once, too.
> > Iirc, it mostly compiled even with that old compiler. Qt4's foreach
> > construct caused problems, though. I had to replace it by 'normal'
> > iterators a couple of times.
> >
> > Maybe there were one or two minor other points, but in the end I had it
> > running (and it seemed to work fine).
> >
> > Still, if you can somehow make sure to get gcc3 or 4, that would be a
> > better option. Otherwise you might have to keep patching coming Qt4
> > releases.
> >
> > HTH
> > Christoph
> >
> I've got some strange troubles with Qt4.2.2 build by gcc-2.95......
> 
> 1) Strange colors in styles.
> In my KDE3.5

Qt4 doesn't use KDE3 style settings. Qt4 only uses its own styles,
configurable via qtconfig.

> 2) in my application:
>     QPainter p;
>     p.drawImage (QPoint(0,0), img.scaled(X, Y));
> don't work. but:
> 
>     QPainter p;
>     p.setMatrix(QMatrix(.....));
>     p.drawImage(QPoint(0,0), img);
> WORKS!
> :)

What is the result of the first version? Does it help if you use a local
variable to store the scaled image?

> 3) designer don't start with GUI-mode "Docked Windows" (segmentation fail 
> occured). Only started with mode "Multiple Top-level windows". If GUI-mode 
> change from menu - style updates normally. But at next start - segmentation 
> failed. In memset (libc) called from QFoneEngineFT::Font::loadGlyph

We'd need a full backtrace.

> 4) DockWidgets demo don't started. segmentation failed, hm.......
> 
> Strange situation..... %/

Well, you're using an usupported compiler, all kinds of strange things
might happen due to that. For example the above problems might be caused
by wrong code that is generated from the compiler because of compiler
bugs. 

Andreas

-- 
 [ signature omitted ] 

Message 6 in thread

On Thursday 22 February 2007 20:52, Andreas Pakulat wrote:

> > I've got some strange troubles with Qt4.2.2 build by gcc-2.95......
> >
> > 1) Strange colors in styles.
> > In my KDE3.5
>
> Qt4 doesn't use KDE3 style settings. Qt4 only uses its own styles,
> configurable via qtconfig.
I don't found program "qtconfig". Where is it?

>
> > 2) in my application:
> >     QPainter p;
> >     p.drawImage (QPoint(0,0), img.scaled(X, Y));
> > don't work. but:
> >
> >     QPainter p;
> >     p.setMatrix(QMatrix(.....));
> >     p.drawImage(QPoint(0,0), img);
> > WORKS!
> >
> > :)
>
> What is the result of the first version? Does it help if you use a local
> variable to store the scaled image?
first version gives black picture with correct size and color-depth.
all my variants with local variables gives same result - black picture.

I've try this:
   QPainter p;
   QImage newimg = img.scaled(X, Y);
    p.drawImage (QPoint(0,0), newimg);

>
> > 3) designer don't start with GUI-mode "Docked Windows" (segmentation fail
> > occured). Only started with mode "Multiple Top-level windows". If
> > GUI-mode change from menu - style updates normally. But at next start -
> > segmentation failed. In memset (libc) called from
> > QFoneEngineFT::Font::loadGlyph
>
> We'd need a full backtrace.
Ok, text below is full trace.
---
[kanashin@mrmcbc kanashin]$ designer
Segmentation fault
[kanashin@mrmcbc kanashin]$ gdb designer
GNU gdb Red Hat Linux (6.1post-1.20040607.62MCBCrh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-RPM-linux"...(no debugging symbols 
found)...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) r
Starting program: /usr/local/qt-4.2.2/bin/designer
(no debugging symbols found)...(no debugging symbols found)...(no debugging 
symbols found)...(no debugging symbols found)...(no debugging symbols 
found)...(no debugging symbols found)...(no debugging symbols found)...(no 
debugging symbols found)...(no debugging symbols found)...(no debugging 
symbols found)...(no debugging symbols found)...(no debugging symbols 
found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x40305c59 in memset () from /lib/libc.so.6
(gdb) bt
#0  0x40305c59 in memset () from /lib/libc.so.6
#1  0x0835bc6c in QFontEngineFT::Font::loadGlyph ()
#2  0x0835cce5 in QFontEngineFT::loadTransformedGlyphSet ()
#3  0x082e4d01 in QX11PaintEngine::drawFreetype ()
#4  0x082e40a5 in QX11PaintEngine::drawTextItem ()
#5  0x082a502a in QPainter::drawTextItem ()
#6  0x0830dd85 in drawMenuText ()
#7  0x0830f3b5 in QTextLine::draw ()
#8  0x082a7226 in qt_format_text ()
#9  0x082a40ed in QPainter::drawText ()
#10 0x083932ef in QPlastiqueStyle::drawControl ()
#11 0x08402e2b in QDockWidget::paintEvent ()
#12 0x0822a765 in QWidget::event ()
#13 0x08403202 in QDockWidget::event ()
#14 0x081fd2ba in QApplicationPrivate::notify_helper ()
#15 0x081fd06e in QApplication::notify ()
#16 0x0823b8fe in qt_sendSpontaneousEvent ()
#17 0x082ec6b5 in QWidgetPrivate::drawWidget ()
#18 0x082ec0b4 in QWidgetBackingStore::paintSiblingsRecursive ()
#19 0x082eca33 in QWidgetPrivate::drawWidget ()
#20 0x082ebb59 in QWidgetBackingStore::cleanRegion ()
#21 0x082ea0c7 in qt_syncBackingStore ()
#22 0x0822ac0c in QWidget::event ()
#23 0x0846b442 in QWorkspace::event ()
#24 0x081fd2ba in QApplicationPrivate::notify_helper ()
#25 0x081fd06e in QApplication::notify ()
#26 0x086606ae in QCoreApplication::sendPostedEvents ()
#27 0x0867caeb in postEventSourceDispatch ()
#28 0x401c9d50 in g_main_dispatch () from /usr/lib/libglib-2.0.so.0
#29 0x401cabd9 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#30 0x401cafc2 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#31 0x401cb174 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#32 0x0867cfb8 in QEventDispatcherGlib::processEvents ()
#33 0x08253c70 in QGuiEventDispatcherGlib::processEvents ()
#34 0x0865eac5 in QEventLoop::processEvents ()
#35 0x0865eb62 in QEventLoop::exec ()
#36 0x08660137 in QCoreApplication::exec ()
#37 0x081fbba9 in QApplication::exec ()
#38 0x08085f06 in main ()

(gdb) q
The program is running.  Exit anyway? (y or n) y
---
I found that there is different backtraces for designer build with different 
options of "configure".

>
> > 4) DockWidgets demo don't started. segmentation failed, hm.......
> >
> > Strange situation..... %/
>
> Well, you're using an usupported compiler, all kinds of strange things
> might happen due to that. For example the above problems might be caused
> by wrong code that is generated from the compiler because of compiler
> bugs.
>
> Andreas
Thanks. 

-- 
 [ signature omitted ] 

Message 7 in thread

On 26.02.07 13:48:20, Anatoly Kanashin wrote:
> On Thursday 22 February 2007 20:52, Andreas Pakulat wrote:
> 
> > > I've got some strange troubles with Qt4.2.2 build by gcc-2.95......
> > >
> > > 1) Strange colors in styles.
> > > In my KDE3.5
> >
> > Qt4 doesn't use KDE3 style settings. Qt4 only uses its own styles,
> > configurable via qtconfig.
> I don't found program "qtconfig". Where is it?
 
Its part of the binaries that ship with Qt4. Its in the tools/ subdir in
the Qt4 source.

> > > 2) in my application:
> > >     QPainter p;
> > >     p.drawImage (QPoint(0,0), img.scaled(X, Y));
> > > don't work. but:
> > >
> > >     QPainter p;
> > >     p.setMatrix(QMatrix(.....));
> > >     p.drawImage(QPoint(0,0), img);
> > > WORKS!
> > >
> > > :)
> >
> > What is the result of the first version? Does it help if you use a local
> > variable to store the scaled image?
> first version gives black picture with correct size and color-depth.
> all my variants with local variables gives same result - black picture.
> 
> I've try this:
>    QPainter p;
>    QImage newimg = img.scaled(X, Y);
>     p.drawImage (QPoint(0,0), newimg);

Did you try to use another transformation mode (like
Qt::SmoothTransformation)? Its really weird that scaled() gives
different resuts than the matrix-way, because QImage internally also
uses a QMatrix to do the scaling.

Andreas

-- 
 [ signature omitted ] 

Message 8 in thread

After I wrote previous mail designer was build once more.... :)
And made check again. For all GUI styles...

I found that is can start with GUI mode "Dock windows" while using 
style "cleanlooks". ONLY this style!!!

%/

-- 
 [ signature omitted ] 

Message 9 in thread

On 19.02.07 18:32:15, Anatoly Kanashin wrote:
> There is need to using Qt4 library with compiler gcc-2.95. 
> Does anybody makes it? gcc-2.95 is not supported by Trolltech.

Well, gcc-2.95 is ancient like egyptian pharao's. Qt4 won't compile
out-of-the-box and I'm not sure if it can compile at all with 2.95. If
you really need that: Ask TT if they're willing to do this for whatever
amount of money you can offer them.

Andreas

-- 
 [ signature omitted ]