From owner-freebsd-java@FreeBSD.ORG Wed Apr 30 01:19:49 2014 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C549D431 for ; Wed, 30 Apr 2014 01:19:49 +0000 (UTC) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com [209.85.215.47]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BDD811FB for ; Wed, 30 Apr 2014 01:19:48 +0000 (UTC) Received: by mail-la0-f47.google.com with SMTP id pn19so735690lab.34 for ; Tue, 29 Apr 2014 18:19:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=wgV8z6W2Fe/n48v1GCLVvdvFHWbptW1bykgTe+Pcp2Q=; b=juoBw1NVGdahGMnTkFUEzVKjrFK6q2ig2/alMBNxKiAsVzrAuUZKySwH1TmF8I+Xek l+vpoGHLKWFCi3K9zemOkdWF3lXGXSboIl7ue5vUAUd85O699qmE5nw/iSe6+tP2SMVO +a0lBPoS8IOXWQqgLvowG3eXVpLYzEwhS8QmenoPhUOFB5c1yL26oSXORAIRFwk09MNh dQtFyIwOG6m8xjNNqgsm7PmXL7NlSLXcY1pEP5LNtDoqGVsTvCW4C1+0oTEM8pYfWROR LNgCQi0Pk4KkWGGkvsfZ69VHBM0aTViX67HxFxoVoihTcen3zMQh99fKRovT4nFvLGDy kzgQ== X-Gm-Message-State: ALoCoQnHLwN8D1fNMVGFf7f0k/7P/L/SGa8dh2/l97+GSajrSySVENeAZGdX3Nhvw7esquJNLzzv MIME-Version: 1.0 X-Received: by 10.112.143.99 with SMTP id sd3mr609153lbb.11.1398820781407; Tue, 29 Apr 2014 18:19:41 -0700 (PDT) Received: by 10.112.35.40 with HTTP; Tue, 29 Apr 2014 18:19:41 -0700 (PDT) X-Originating-IP: [203.99.129.1] In-Reply-To: <53603E5A.7040804@FreeBSD.org> References: <536037C4.7070405@FreeBSD.org> <53603E5A.7040804@FreeBSD.org> Date: Wed, 30 Apr 2014 13:19:41 +1200 Message-ID: Subject: Re: openjdk-7.55.13_3,1: UnsatisfiedLinkError jpeg_resync_to_restart From: Jonathan Chen To: Jung-uk Kim Content-Type: text/plain; charset=UTF-8 Cc: freebsd-java@freebsd.org X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2014 01:19:49 -0000 On 30 April 2014 12:05, Jung-uk Kim 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 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