<html>
    <head>
      <base href="http://icedtea.classpath.org/bugzilla/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - JPEG support in build is broken on non-system-libjpeg builds"
   href="http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1393">1393</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>JPEG support in build is broken on non-system-libjpeg builds
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>IcedTea
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>2.3.8
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86_64
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P3
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>IcedTea
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>gnu.andrew&#64;redhat.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>omajid&#64;redhat.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>unassigned&#64;icedtea.classpath.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=853" name="attach_853" title="A testcase that tries to write jpeg and png files">attachment 853</a> <a href="attachment.cgi?id=853&amp;action=edit" title="A testcase that tries to write jpeg and png files">[details]</a></span>
A testcase that tries to write jpeg and png files

A build from icedtea7-forest has broken support for reading/writing JPEG files
if it was not built with system libjpeg.

I built a jdk using the follows:

make \
  ALLOW_DOWNLOADS=&quot;true&quot; \
  ALT_BOOTDIR=&quot;$JDK_TO_BUILD_WITH&quot; \
  ANT=&quot;/usr/bin/ant&quot; \
  STATIC_CXX=&quot;false&quot; \
  FT2_CFLAGS=&quot;$(pkg-config --cflags freetype2)&quot; \
  FT2_LIBS=&quot;$(pkg-config --libs freetype2)&quot; \
  NO_DOCS=&quot;true&quot; \
  DEBUG_CLASSFILES=&quot;true&quot; \
  DEBUG_BINARIES=&quot;true&quot;

And it could not read/write JPEG files. With the attached test case, I got an
exception:
Exception in thread &quot;main&quot; java.lang.UnsatisfiedLinkError:
com.sun.imageio.plugins.jpeg.JPEGImageWriter.initWriterIDs(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;)V
    at com.sun.imageio.plugins.jpeg.JPEGImageWriter.initWriterIDs(Native
Method)
    at
com.sun.imageio.plugins.jpeg.JPEGImageWriter.&lt;clinit&gt;(JPEGImageWriter.java:181)
    at
com.sun.imageio.plugins.jpeg.JPEGImageWriterSpi.createWriterInstance(JPEGImageWriterSpi.java:96)
    at
javax.imageio.spi.ImageWriterSpi.createWriterInstance(ImageWriterSpi.java:351)
    at javax.imageio.ImageIO$ImageWriterIterator.next(ImageIO.java:843)
    at javax.imageio.ImageIO$ImageWriterIterator.next(ImageIO.java:827)
    at javax.imageio.ImageIO.getWriter(ImageIO.java:1596)
    at javax.imageio.ImageIO.write(ImageIO.java:1520)
    at ImageWritingTest.main(ImageWritingTest.java:30)

I then tried an icedtea7-forest build with:

make \
  ALLOW_DOWNLOADS=&quot;true&quot; \
  ALT_BOOTDIR=&quot;$JDK_TO_BUILD_WITH&quot; \
  ANT=&quot;/usr/bin/ant&quot; \
  STATIC_CXX=&quot;false&quot; \
  USE_SYSTEM_JPEG=true \
  JPEG_LIBS=&quot;-ljpeg&quot; \
  FT2_CFLAGS=&quot;$(pkg-config --cflags freetype2)&quot; \
  FT2_LIBS=&quot;$(pkg-config --libs freetype2)&quot; \
  NO_DOCS=&quot;true&quot; \
  DEBUG_CLASSFILES=&quot;true&quot; \
  DEBUG_BINARIES=&quot;true&quot;

And it works fine with reading/writing JPEGs.

objdump -t libjavajpeg.so shows interesting differences between the two builds.
Symbols like Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initWriterIDs
are missing from the first build but present in the second.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>