Review Request: 8005178: build-infra: Dependency on libfdlibm on mac is broken

Tim Bell tim.bell at oracle.com
Wed Dec 19 16:31:14 UTC 2012


Looks good to me-

Tim

On 12/19/12 01:16, Erik Joelsson wrote:
> Oh, I will explain it.
>
> So, on all other platforms, this is the dependency chain (simplified, 
> skipping the actual recipe rules):
>
> BUILD_LIBFDLIBM:=/path/to/libfdlibm.a
> BUILD_LIBJAVA:=/path/to/libjava.so
> $(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM)
>
> This forces the linking of libjava to happen after libfdlibm is created.
>
> On mac there was a complication:
>
> BUILD_LIBFDLIBM:=/path/to/temp/location/for/libfdlibm.a
> /path/to/libfdlibm.a: $(BUILD_LIBFDLIBM)
> $(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM)
>
> The recipe for BUILD_LIBJAVA looks for libfdlibm.a in 
> /path/to/libfdlibm.a and not in the temp location. This results in a 
> race condition where the copy of libfdlibm.a might not have happened 
> before linking of libjava.
>
> My fix does this:
>
> BUILD_LIBFDLIBM_MAC:=/path/to/temp/location/for/libfdlibm.a
> BUILD_LIBFDLIBM:=/path/to/libfdlibm.a
> $(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC)
> $(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM)
>
> The difference is that the variable BUILD_LIBFDLIBM now points to the 
> final location of libfdlibm.a on all platforms so the dependency is 
> correct on all platforms.
>
> There are other ways to solve this of course, but I prefer to minimize 
> differences between platforms if possible.
>
> /Erik
>
> On 2012-12-19 02:04, Kelly O'Hair wrote:
>> I'm assuming that the issue is that a static library is an additive 
>> thing, AR will add to it, while
>> a shared library is created from scratch each time.
>>
>> It's possible that another fix is actually in the 
>> NativeCompilation.gmk file where the static library
>> is created.
>>
>> But I'm curious too, hopefully Erik will set us straight in a few 
>> hours after he wakes up. ;^)
>>
>> -kto
>>
>> On Dec 18, 2012, at 3:38 PM, David Holmes wrote:
>>
>>> I don't understand the fix. Other than a name change this just seems 
>>> to be "re-arranging the deckchairs". What is the actual function 
>>> change ??
>>>
>>> David
>>>
>>> On 19/12/2012 1:55 AM, Erik Joelsson wrote:
>>>> Was asked to fix the comment, new webrev:
>>>>
>>>> http://cr.openjdk.java.net/~erikj/8005178/webrev.jdk.02/
>>>>
>>>> On 2012-12-18 16:35, Erik Joelsson wrote:
>>>>> This fixes a problem with make dependencies from libjava to libfdlibm
>>>>> which causes intermittent build failures on mac.
>>>>>
>>>>> http://cr.openjdk.java.net/~erikj/8005178/webrev.jdk.01/





More information about the build-dev mailing list