RFR: 8221907: make reconfigure broken with "build/jmh/jars does not exist or is not a directory"

Jie Fu fujie at loongson.cn
Thu Apr 4 06:38:33 UTC 2019


Hi Eric and David,

Thank you for your review and suggestions.

Now I think it's not a good practice to assign a configure parameter 
with a relative path.
I had assigned "--with-jmh=build/jmh/jars" just because the doc[1] told 
me to do so.

Even "make configure" would break with a relative path in a particular 
case (e.g., in a symbolic link topdir).

So I will prefer absolute paths for configure parameters (except 
--with-jmh).
Thanks.

Best regards,
Jie

[1] http://hg.openjdk.java.net/jdk/jdk/file/5c7418757bad/doc/testing.md#l44


On 2019/4/4 上午9:49, David Holmes wrote:
> Hi Erik,
>
> On 4/04/2019 1:33 am, Erik Joelsson wrote:
>> Hello Jie,
>>
>> This issue applies not only to --with-jmh, but to any configure 
>> parameter given with a relative path. I think the proper fix would be 
>> to record the current working directory when configure is launched 
>> and cd to that directory when running reconfigure. Here is my 
>> suggested patch:
>>
>> http://cr.openjdk.java.net/~erikj/8221907/webrev.01/index.html
>>
>> The relevant parts are exporting the variable from configure and 
>> using it in Init.gmk. The rest is just renaming the variable since 
>> CURDIR would clash with the pre defined make variable CURDIR.
>
> I see how the change fixes the issue with existing relative paths, but 
> it indicates that OUTPUTDIR is different to CONFIGURE_START_DIR - so 
> what happens with generated output now we have a different cwd? Is it 
> all controlled by absolute paths and so will still go to the place(s) 
> regardless?
>
> Thanks,
> David
>
>> /Erik
>>
>> On 2019-04-03 05:28, Jie Fu wrote:
>>> Hi all,
>>>
>>> JBS: https://bugs.openjdk.java.net/browse/JDK-8221907
>>>
>>> For more info (e.g. the symptom & how to reproduce), please see the 
>>> JBS.
>>>
>>> It can be fixed by
>>> -----------------------------------------
>>> diff -r 3326be37cd9a make/autoconf/lib-tests.m4
>>> --- a/make/autoconf/lib-tests.m4        Tue Apr 02 17:27:48 2019 -0700
>>> +++ b/make/autoconf/lib-tests.m4        Wed Apr 03 19:56:24 2019 +0800
>>> @@ -73,6 +73,10 @@
>>>    else
>>>      # Path specified
>>>      JMH_HOME="$with_jmh"
>>> +    if test "x${JMH_HOME:0:1}" != x/; then
>>> +      JMH_HOME="$TOPDIR/$JMH_HOME"
>>> +    fi
>>> +
>>>      if test ! -d [$JMH_HOME]; then
>>>        AC_MSG_RESULT([no, error])
>>>        AC_MSG_ERROR([$JMH_HOME does not exist or is not a directory])
>>> -----------------------------------------
>>>
>>> Could you please review it?
>>> Thanks a lot.
>>>
>>> Best regards,
>>> Jie
>>>
>>>




More information about the build-dev mailing list