Change JDK-8044480 breaks OpenJDK builds which bundle other libraries

Volker Simonis volker.simonis at gmail.com
Mon Oct 27 17:16:37 UTC 2014


Hi Erik,

sorry, you're right - I looked at the wrong grep result line.

Thanks for pointing me to the actual cause.

Did you mean I should open a bug and propose a fix as suggested by you
or was that just intended as workaround for my local build problem?
(I've actually solved my local problem by replacing the sym-links by
hard-links which was easy in my case because I built freetype).

I'd actually prefer to fix it by adding the "mkdir & cp" as the real
cause of the problem is a race as you've correctly described in
"8057755: Race in copying of libfreetype".

Regards,
Volker


On Mon, Oct 27, 2014 at 5:33 PM, Erik Joelsson <erik.joelsson at oracle.com> wrote:
> Hello Volker,
>
> I very much doubt that JDK-8044480 had anything to do with this. It only
> touched Bundles.gmk which is only used on Macosx. There was a change
> recently to how freetype is copied:
> https://bugs.openjdk.java.net/browse/JDK-8058756
>
> The bug wanted to fix the lack of an "$(MKDIR) -p $(@D)" line in the recipe.
> I recommended replacing the copy with an $(install-file) instead. It seems
> that wasn't a good idea in this case as install-file is set to preserve
> symlinks. To fix your problem, simply replace $(install-file) with mkdir and
> explicit cp, with follow symlinks, and a comment describing why install-file
> can't be used.
>
> /Erik
>
>
>
> On 2014-10-27 17:08, Volker Simonis wrote:
>>
>> Hi,
>>
>> your change for "JDK-8044480: JDK image target overwrites
>> lib/server/libjsig.dylib symlink with a copy of lib/libjsig.dylib"
>> breaks our OpenJDK builds on Solaris. The problem is that because on
>> Solaris "freetype" isn't installed by default on every machine we have
>> manually build a version of freetype for Solaris into a shared
>> directory and use that one for our builds.
>>
>> The lib-directory of a vanilly freetype build looks as follows (which
>> is not unusual):
>>
>> $ ls -la freetype/lib/
>> total 1536
>> drwxr-xr-x   2 d046063  cproj       4096 Apr 26  2013 .
>> drwxr-xr-x   4 d046063  cproj       4096 Apr 26  2013 ..
>> lrwxrwxrwx   1 d046063  cproj         20 Apr 26  2013 libfreetype.so
>> -> libfreetype.so.6.8.0
>> lrwxrwxrwx   1 d046063  cproj         20 Apr 26  2013 libfreetype.so.6
>> -> libfreetype.so.6.8.0
>> -rwxr-xr-x   1 d046063  cproj     773448 Apr 26  2013 libfreetype.so.6.8.0
>>
>> When using "--with-freetype" this will automatically enable
>> "freetype-bundling" and this in turn will require to copy the freetype
>> libraries into the image during the build. Unfortunately, after change
>> JDK-8044480, this will now only copy the corresponding symlink which
>> meaningless in the jdk-directory and leads to a subsequent build error
>> later on:
>>
>> gmake[3]: *** No rule to make target
>>
>> `/net/usr.work/openjdk/nb/sun_64/nightly/output-jdk9/jdk/lib/sparcv9/libfreetype.so.6',
>> needed by
>> `/net/usr.work/openjdk/nb/sun_64/nightly/output-jdk9/images/j2re-image/lib/sparcv9/libfreetype.so.6'.
>> Stop.
>>
>> The same problem may also apply to other bundled libraries like zlib,
>> png, jpeg, etc..
>>
>> Do you have any idea how we could solve this problem? Or the other way
>> round - do you see a possibility how to fix "JDK-8044480: JDK image
>> target overwrites lib/server/libjsig.dylib symlink with a copy of
>> lib/libjsig.dylib" without affecting the bundling of third part
>> libraries?
>>
>> Thank you and best regards,
>> Volker
>
>



More information about the build-dev mailing list