Boost C++ Libraries: Ticket #3908: using boost::gil fails when upgrading to libpng-1.4.0 https://svn.boost.org/trac10/ticket/3908 <p> libpng version 1.4.0 (up from 1.2.40) removes several macros such as the following: </p> <p> #define png_infopp_NULL NULL </p> <p> Which GIL was using. </p> <p> Fix: Replacing the symbols png_infopp_NULL and int_p_NULL with NULL in the files boost/gil/extension/io/png_io_private.hpp and boost/gil/extension/io/png_dynamic_io.hpp seems to fix the problem. </p> <p> Note: I have only compiled, I have not actually used the functions which use these symbols. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3908 Trac 1.4.3 anonymous Wed, 04 Aug 2010 21:32:25 GMT <link>https://svn.boost.org/trac10/ticket/3908#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3908#comment:1</guid> <description> <p> Done. Ticket is closed. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>chhenning</dc:creator> <pubDate>Thu, 05 Aug 2010 14:55:07 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3908#comment:2 https://svn.boost.org/trac10/ticket/3908#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket Bryce Adelstein Lelbach Thu, 17 Mar 2011 00:04:26 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/3908#comment:3 https://svn.boost.org/trac10/ticket/3908#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> Reports in IRC indicate this is still a problem. </p> Ticket Bryce Adelstein Lelbach Thu, 17 Mar 2011 00:17:46 GMT <link>https://svn.boost.org/trac10/ticket/3908#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3908#comment:4</guid> <description> <pre class="wiki">In file included from /usr/include/boost/gil/extension/io/png_io.hpp:41:0, from ../src/write.cxx:4: /usr/include/boost/gil/extension/io/png_io_private.hpp: In member function ‘void boost::gil::detail::png_reader_color_convert&lt;CC&gt;::apply(const View&amp;)’: /usr/include/boost/gil/extension/io/png_io_private.hpp:228:22: error: ‘int_p_NULL’ was not declared in this scope </pre><p> Reported by ville on IRC (ville3.14159@…). </p> <p> Build environment: </p> <ul><li>GCC 4.5.2 </li><li>Linux 2.6.37 (Arch-Linux distro) </li><li>Boost 1.46.0 (Arch-Linux packaged) </li><li>libpng 1.4.5-1 (Arch-Linux packaged) </li></ul> </description> <category>Ticket</category> </item> <item> <dc:creator>Bryce Adelstein Lelbach</dc:creator> <pubDate>Thu, 17 Mar 2011 00:19:06 GMT</pubDate> <title>version, milestone changed; cc set https://svn.boost.org/trac10/ticket/3908#comment:5 https://svn.boost.org/trac10/ticket/3908#comment:5 <ul> <li><strong>cc</strong> <span class="trac-author">blelbach@…</span> added </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.42.0</span> → <span class="trac-field-new">Boost 1.46.0</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.43.0</span> → <span class="trac-field-new">Boost 1.47.0</span> </li> </ul> Ticket anonymous Wed, 07 Mar 2012 09:01:42 GMT <link>https://svn.boost.org/trac10/ticket/3908#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3908#comment:6</guid> <description> <p> Hi, </p> <p> When using boost-1.49.0 with libpng-1.5.9 I also get this: </p> <pre class="wiki">/xxxxx/w/slc5_amd64_gcc461/external/boost/1.49.0/include/boost/gil/extension/io/png_io_private.hpp: I n member function 'void boost::gil::detail::png_reader_color_convert&lt;CC&gt;::apply(const View&amp;)': /xxxxx/w/slc5_amd64_gcc461/external/boost/1.49.0/include/boost/gil/extension/io/png_io_private.hpp:22 8:22: error: 'int_p_NULL' was not declared in this scope </pre><p> Grepping the boost tree also finds other occurrences: </p> <pre class="wiki">$ egrep -r 'png_infopp_NULL|int_p_NULL' w/BUILD/slc5_amd64_gcc461/external/boost/1.49.0 w/BUILD/slc5_amd64_gcc461/external/boost/1.49.0/boost_1_49_0/libs/gil/doc/html/g_i_l_0250.html:&lt;a name="l00091"&gt;&lt;/a&gt;00091 int_p_NULL, int_p_NULL); w/BUILD/slc5_amd64_gcc461/external/boost/1.49.0/boost_1_49_0/libs/gil/doc/html/g_i_l_0253.html:&lt;a name="l00155"&gt;&lt;/a&gt;00155 png_destroy_read_struct(&amp;amp;_png_ptr,png_infopp_NULL,png_infopp_NULL); w/BUILD/slc5_amd64_gcc461/external/boost/1.49.0/boost_1_49_0/libs/gil/doc/html/g_i_l_0253.html:&lt;a name="l00160"&gt;&lt;/a&gt;00160 png_destroy_read_struct(&amp;amp;_png_ptr, &amp;amp;_info_ptr, png_infopp_NULL); w/BUILD/slc5_amd64_gcc461/external/boost/1.49.0/boost_1_49_0/libs/gil/doc/html/g_i_l_0253.html:&lt;a name="l00174"&gt;&lt;/a&gt;00174 png_destroy_read_struct(&amp;amp;_png_ptr,&amp;amp;_info_ptr,png_infopp_NULL); w/BUILD/slc5_amd64_gcc461/external/boost/1.49.0/boost_1_49_0/libs/gil/doc/html/g_i_l_0253.html:&lt;a name="l00186"&gt;&lt;/a&gt;00186 int_p_NULL, int_p_NULL); w/BUILD/slc5_amd64_gcc461/external/boost/1.49.0/boost_1_49_0/libs/gil/doc/html/g_i_l_0253.html:&lt;a name="l00228"&gt;&lt;/a&gt;00228 int_p_NULL, int_p_NULL); w/BUILD/slc5_amd64_gcc461/external/boost/1.49.0/boost_1_49_0/libs/gil/doc/html/g_i_l_0253.html:&lt;a name="l00317"&gt;&lt;/a&gt;00317 png_destroy_write_struct(&amp;amp;_png_ptr,png_infopp_NULL); w/BUILD/slc5_amd64_gcc461/external/boost/1.49.0/boost_1_49_0/boost/gil/extension/io/png_io_private.hpp: int_p_NULL, int_p_NULL); </pre><p> Could you please confirm that the change <code>png_infopp_NULL|int_p_NULL</code> to <code>NULL</code> would fix the problem? </p> <p> Cheers, Diego Gomes. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 14 Feb 2013 10:00:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3908#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3908#comment:7</guid> <description> <p> I can confirm this problem using Fedora 18 Linux.<br /> boost-devel-1.50.0-4.fc18.x86_64<br /> gcc-4.7.2-8.fc18.x86_64<br /> </p> </description> <category>Ticket</category> </item> <item> <author>yves.pausch@…</author> <pubDate>Fri, 15 Feb 2013 13:58:23 GMT</pubDate> <title>cc, version, milestone changed; keywords set https://svn.boost.org/trac10/ticket/3908#comment:8 https://svn.boost.org/trac10/ticket/3908#comment:8 <ul> <li><strong>cc</strong> <span class="trac-author">yves.pausch@…</span> added </li> <li><strong>keywords</strong> gil png libpng incompatible added </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.46.0</span> → <span class="trac-field-new">Boost 1.53.0</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.47.0</span> → <span class="trac-field-new">Boost 1.54.0</span> </li> </ul> <p> Same here with libpng 1.5.13 </p> Ticket Mateusz Loskot Thu, 16 Feb 2017 10:48:47 GMT cc changed https://svn.boost.org/trac10/ticket/3908#comment:9 https://svn.boost.org/trac10/ticket/3908#comment:9 <ul> <li><strong>cc</strong> <span class="trac-author">mateusz@…</span> added </li> </ul> Ticket Stefan Seefeld Sat, 01 Jul 2017 21:12:28 GMT owner, status changed https://svn.boost.org/trac10/ticket/3908#comment:10 https://svn.boost.org/trac10/ticket/3908#comment:10 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Hailin Jin</span> to <span class="trac-author">Stefan Seefeld</span> </li> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">new</span> </li> </ul> Ticket Mateusz Loskot Thu, 23 Aug 2018 09:43:00 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/3908#comment:11 https://svn.boost.org/trac10/ticket/3908#comment:11 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.54.0</span> → <span class="trac-field-new">Boost 1.68.0</span> </li> </ul> <p> GIL in Boost 1.68 delivers completely re-implemented I/O extensions. The new version does not use the troublesome macros, so the issue should be gone now. </p> <p> Closing as fixed. </p> <p> <a class="missing wiki">GitHub</a> ref: <a class="ext-link" href="https://github.com/boostorg/gil/projects/4#card-12368324"><span class="icon">​</span>https://github.com/boostorg/gil/projects/4#card-12368324</a> </p> Ticket