May 27, 2010

Luca Luca
Ant Farmer
637 posts

QT4 4.6.2 && Slackware 13.1

 

Hi all,
this days it was released Slackware 13.1 .
I used for one year Slackware 12.2 at work for develop with qt4 and I always compiled without problem QT4 4.6.2 with this command:

  1. ./configure -prefix /opt/qt4-4.6.2 -qt-gif -no-exceptions -fast -qt-sql-sqlite -qdbus -pch -nomake examples -nomake demos -opensource -confirm-license -qt-sql-mysql -qt-sql-sqlite -qt-libpng
  2. make
  3. make install

but this failed compilation in Slackware 13.1 with an “undefined references” with PNG (tomorrow I will post the exact message) so I tried with:

  1. ./configure -prefix /opt/qt4-4.6.2 -qt-gif -no-exceptions -fast -qt-sql-sqlite -qdbus -pch -nomake examples -nomake demos -opensource -confirm-license -qt-sql-mysql -qt-sql-sqlite -system-libpng

and now it compile in Slackware 13.1. I only replaced -qt-libpng with -system-libpng .

What do you think about…?

4 replies

June 1, 2010

aavit aavit
Lab Rat
6 posts

Hi,

Most likely, the system PNG lib on your newer Linux system is version 1.4, while it was 1.2 on your previous system. Now because of a bug in Qt, it would pick up the system’s PNG header file (png.h) when building, even when asked to use its own PNG lib (-qt-libpng). Since the included version in Qt 4.6 is PNG 1.2, that will cause a failure.

That bug is fixed in Qt 4.7 (in which the bundled PNG lib is also updated to version 1.4 btw).

June 1, 2010

Luca Luca
Ant Farmer
637 posts

aavit wrote:
Hi,

Most likely, the system PNG lib on your newer Linux system is version 1.4, while it was 1.2 on your previous system. Now because of a bug in Qt, it would pick up the system’s PNG header file (png.h) when building, even when asked to use its own PNG lib (-qt-libpng). Since the included version in Qt 4.6 is PNG 1.2, that will cause a failure.

That bug is fixed in Qt 4.7 (in which the bundled PNG lib is also updated to version 1.4 btw).

Thanks for the answer…
I checked that the libpng version of Slackware 13.1 is 1.4.2 so I think this is the bug you said.

June 9, 2010

Luca Luca
Ant Farmer
637 posts

I’m compiling QT 4.6.3 with the configure:

  1. ./configure -qt-libpng .....ecc....

and the problem seems solved…

When building ends I’ll confirm this.

June 9, 2010

Luca Luca
Ant Farmer
637 posts

No, compilation fails:

  1. /mnt/temporanea/qt-everywhere-opensource-src-4.6.3/lib/libQtGui.a(qpnghandler.o): In function `QPngHandlerPrivate::readPngHeader()':
  2. qpnghandler.cpp:(.text+0x866): undefined reference to `png_set_longjmp_fn'
  3. /mnt/temporanea/qt-everywhere-opensource-src-4.6.3/lib/libQtGui.a(qpnghandler.o): In function `QPngHandlerPrivate::readPngImage(QImage*)':
  4. qpnghandler.cpp:(.text+0xffb): undefined reference to `png_set_longjmp_fn'
  5. /mnt/temporanea/qt-everywhere-opensource-src-4.6.3/lib/libQtGui.a(qpnghandler.o): In function `QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int)':
  6. qpnghandler.cpp:(.text+0x1fc1): undefined reference to `png_set_longjmp_fn'
  7. collect2: ld returned 1 exit status

 
  ‹‹ Setup executable creators      The same old topic: Licensing. ››

You must log in to post a reply. Not a member yet? Register here!