Ticket #28023 (closed defect: fixed)
qt3 fails to build with libpng 1.4
| Reported by: | dports@… | 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
Change History
comment:1 Changed 2 years ago by michaelld@…
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 2 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 2 years ago by jmr@…
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 2 years ago by jmr@…
Gentoo bug with correct-looking patch: http://bugs.gentoo.org/show_bug.cgi?id=319487

