Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Apr 2014 20:05:46 -0400
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        Jonathan Chen <jonc@chen.org.nz>, freebsd-java@freebsd.org
Subject:   Re: openjdk-7.55.13_3,1: UnsatisfiedLinkError jpeg_resync_to_restart
Message-ID:  <53603E5A.7040804@FreeBSD.org>
In-Reply-To: <536037C4.7070405@FreeBSD.org>
References:  <CAJuc1zNtQuDQijoXtSL-kw0DFwABfECA3sVs6iAQrqO4DEgAqQ@mail.gmail.com> <CAJuc1zPqjCVn9pCn4TxdM4Y0bfQx0MYdfTW2-8gvJ80cdFeZ8g@mail.gmail.com> <536037C4.7070405@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------030303040609040508010700
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.

Jung-uk Kim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)

iQEcBAEBAgAGBQJTYD5aAAoJEHyflib82/FGgaoIAIsQeaWjbzUdsVfZsygsLTr2
kCbK4X/Ys5Ftyw3zYG9tWrg9Tx7HP99+7ACHUMzsdUutm51aj6H8Zu8MNNSkLZeK
nnuPtYFxUvCG5MlKLLgukVqlUH0CHml2Mdsns1AC4W1B4/lanRT61Eejv9ckF7De
PwZa31f1heb6DcH5gTusjnSAHnqarwNy51f3yGXd78p6304HhFHzsuBZkbdXptr0
UI5DyBnhSTQ2WmoJrGJIUXOcH8uKaw3YGOr3hrntV90eIZdEYHhHpS3mBLSVT/Xf
mazLpvs0wmaqLAixPWTc9mbqkx72AWzvgFts0JtELWsr9tYC9Q+kLaYtjClIV4k=
=nY19
-----END PGP SIGNATURE-----

--------------030303040609040508010700
Content-Type: text/x-patch;
 name="openjdk7.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="openjdk7.diff"

Index: java/openjdk7/files/patch-set
===================================================================
--- java/openjdk7/files/patch-set	(revision 352659)
+++ java/openjdk7/files/patch-set	(working copy)
@@ -24740,8 +24740,17 @@
  build: $(BUILD_TARGETS)
  
 --- jdk/make/sun/splashscreen/Makefile	2013-09-06 11:27:41.000000000 -0700
-+++ jdk/make/sun/splashscreen/Makefile	2014-04-20 12:39:22.000000000 -0700
-@@ -83,15 +83,16 @@
++++ jdk/make/sun/splashscreen/Makefile	2014-04-29 19:58:21.000000000 -0400
+@@ -60,6 +60,8 @@
+ #
+ 
+ CFLAGS += -DSPLASHSCREEN
++CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen
++CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg
+ 
+ ifeq ($(PLATFORM), macosx)
+   CFLAGS += -DWITH_MACOSX
+@@ -83,15 +85,16 @@
  				  -framework JavaNativeFoundation
  else ifneq ($(PLATFORM), windows)
    CFLAGS += -DWITH_X11
@@ -24766,6 +24775,15 @@
  else # PLATFORM
    CFLAGS += -DWITH_WIN32
    OTHER_LDLIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib /DELAYLOAD:user32.dll
+@@ -121,8 +124,6 @@
+   CPPFLAGS += $(call NativeSrcDirList,-I,native/$(PKGDIR)/splashscreen)
+   CPPFLAGS += $(call NativeSrcDirList,-I,/native/sun/osxapp)
+ endif
+-CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen
+-CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg
+ ifneq ($(SYSTEM_ZLIB),true)
+   CPPFLAGS += -I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
+ else
 --- jdk/make/sun/xawt/Makefile	2013-09-06 11:27:41.000000000 -0700
 +++ jdk/make/sun/xawt/Makefile	2014-04-20 12:39:22.000000000 -0700
 @@ -52,6 +52,9 @@

--------------030303040609040508010700--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53603E5A.7040804>