Opened 14 years ago

Closed 14 years ago

#28023 closed defect (fixed)

qt3 fails to build with libpng 1.4

Reported by: drkp (Dan Ports) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: qt3

Description

qt3 appears to use libpng APIs that aren't compatible with libpng 1.4. It fails with the attached log. Partial exerpt of the errors:

:info:build g++-4.2 -c -pipe -arch x86_64 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_x11_qt3/work/qt-x11-free-3.3.8/include -I/opt/local/include -fno-exceptions -Wall -W -Os -fPIC  -D__DARWIN_X11__ -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED -I/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_x11_qt3/work/qt-x11-free-3.3.8/mkspecs/darwin-g++ -I. -I/opt/local/include/freetype2 -I/opt/local/lib/qt3/include -I../../../../include -I/opt/local/include -I/opt/local/include -I.moc/release-shared-mt/ -o .obj/release-shared-mt/main.o main.cpp
:info:build In file included from main.cpp:11:
:info:build ../../../../src/kernel/qpngio.cpp: In function 'void setup_qt(QImage&, png_struct*, png_info*, float)':
:info:build ../../../../src/kernel/qpngio.cpp:128: warning: 'channels' is deprecated (declared at /opt/local/include/png.h:672)
:info:build ../../../../src/kernel/qpngio.cpp:128: warning: 'channels' is deprecated (declared at /opt/local/include/png.h:672)
:info:build ../../../../src/kernel/qpngio.cpp:162: error: 'struct png_info_struct' has no member named 'trans_values'
:info:build ../../../../src/kernel/qpngio.cpp:171: warning: 'num_palette' is deprecated (declared at /opt/local/include/png.h:655)

Attachments (1)

main.log (27.5 KB) - added by drkp (Dan Ports) 14 years ago.

Download all attachments as: .zip

Change History (7)

Changed 14 years ago by drkp (Dan Ports)

Attachment: main.log added

comment:1 Changed 14 years ago by michaelld (Michael Dickens)

Not a great surprise, given how old qt3 is ... try removing the configure flag "-system-libpng" so that qt3 uses its internal version instead of the system-provided version. "We" might want to create a "libpng12" port that installs into $[prefix}/libexec, just for ports such as this one that, generally, cannot easily be made compatible with newer libpng versions.

comment:2 Changed 14 years ago by gilles.celli@…

FYI: Removing "-system-libpng" from the config flag doesn't work here...trying if QT4 will work with the X11 program I need to install

comment:3 Changed 14 years ago by jmroot (Joshua Root)

Looks like an easy fix. http://www.libpng.org/pub/png/src/libpng-1.2.x-to-1.4.x-summary.txt

   a. We changed the names of the png_struct and info_struct members "trans"
      and "trans_values" to "trans_alpha" and "trans_color", respectively.

comment:4 Changed 14 years ago by jmroot (Joshua Root)

Gentoo bug with correct-looking patch: http://bugs.gentoo.org/show_bug.cgi?id=319487

comment:5 Changed 14 years ago by gilles.celli@…

yep I can confirm the gentoo patch works! qt3 was succesfully compiled

comment:6 Changed 14 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: newclosed

Thanks for the quick info and testing. Committed in r75234.

Note: See TracTickets for help on using tickets.