Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Apr 2014 13:19:41 +1200
From:      Jonathan Chen <jonc@chen.org.nz>
To:        Jung-uk Kim <jkim@freebsd.org>
Cc:        freebsd-java@freebsd.org
Subject:   Re: openjdk-7.55.13_3,1: UnsatisfiedLinkError jpeg_resync_to_restart
Message-ID:  <CAJuc1zMSJqkzyYv9Lxf=Dm9S%2BcpgV230emoknSokanah%2B9Oq8g@mail.gmail.com>
In-Reply-To: <53603E5A.7040804@FreeBSD.org>
References:  <CAJuc1zNtQuDQijoXtSL-kw0DFwABfECA3sVs6iAQrqO4DEgAqQ@mail.gmail.com> <CAJuc1zPqjCVn9pCn4TxdM4Y0bfQx0MYdfTW2-8gvJ80cdFeZ8g@mail.gmail.com> <536037C4.7070405@FreeBSD.org> <53603E5A.7040804@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 30 April 2014 12:05, Jung-uk Kim <jkim@freebsd.org> wrote:
> On 2014-04-29 19:37:40 -0400, ?? wrote:
>> On 2014-04-29 19:09:36 -0400, ?? wrote:
>>> On 28 April 2014 13:51, Jonathan Chen <jonc@chen.org.nz> wrote:
>>>> Hi,
>>>>
>>>> I'm trying out the latest openjdk-7.55.13_3,1 with
>>>> squirrel-sql and have noticed that the logs are reporting:
>>>>
>>>> java.lang.UnsatisfiedLinkError:
>>>> /usr/local/openjdk7/jre/lib/amd64/libsplashscreen.so:
>>>> /usr/local/openjdk7/jre/lib /amd64/libsplashscreen.so:
>>>> Undefined symbol "jpeg_resync_to_restart" at
>>>> java.lang.ClassLoader$NativeLibrary.load(Native Method)
>>
>>> So I had a look at this with openjdk-7.55.13_4,1, and it appears
>>> that the internal openjdk jpeg library is being compiled with
>>> "NEED_SHORT_EXTERNAL_NAMES" defined, resulting in libjpeg.so
>>> with the shortened name of "jResyncRestart"
>>
>>> 11:00am> nm /usr/local/openjdk7/jre/lib/amd64/libjpeg.so | grep
>>> jResync 000000000000f6e0 T jResyncRestart
>>
>>> However, when libsplashscreen.so is built,
>>> "NEED_SHORT_EXTERNAL_NAMES" has not been defined and the
>>> expanded "jpeg_resync_to_restart" symbol is used instead,
>>> resulting in the undefined reference.
>>
>>> Unfortunately, I can't determine just how libjpeg.so is being
>>> built, and where the unecessary "NEED_SHORT_EXTERNAL_NAMES" is
>>> being defined in the build. Any pointers from the list would be
>>> appreciated.
>>
>> I guess ${LOCALBASE}/include/jconfig.h was found before
>> ${WRKSRC}/jdk/src/share/native/sun/awt/image/jpeg/jconfig.h.
>
> Please try the attached patch.

You've hit the nail on the head. The patch is good, and the build
works on my machine running 10-STABLE/amd64.

Thanks!
-- 
Jonathan Chen <jonc@chen.org.nz>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJuc1zMSJqkzyYv9Lxf=Dm9S%2BcpgV230emoknSokanah%2B9Oq8g>