The generated-configure.sh script is dead - autoconf seems to write into the sources in the build process

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Tue Feb 6 17:30:52 UTC 2018


On 2018-02-06 18:22, Erik Joelsson wrote:
> Hello Volker,
>
> I think this is a reasonable idea, but have opinions on the 
> implementation. I think this should apply even if you have a 
> CUSTOM_ROOT defined. Thinking some more on this, isn't it always true 
> that you want it in $PWD/.build? Or if we want to get really strict 
> about it, if PWD is a subdir of TOPDIR (or CUSTOM_ROOT), then use 
> TOPDIR (or CUSTOM_ROOT), otherwise use PWD.
I don't think we allow running configure in anything else than the 
TOPDIR (or CUSTOM_ROOT), or an empty directory. Once upon a time, 
TOPDIR/make or TOPDIR/common/autoconf was also supported, but I removed 
that some time ago.

But I agree with your analysis that this should be used even if 
CUSTOM_ROOT is defined.

/Magnus
>
> /Erik
>
>
> On 2018-02-06 06:53, Volker Simonis wrote:
>> Hi,
>>
>> as Matthias wrote, we're usually running configure from a newly
>> created build directory which is outside the source tree. Also, the
>> build user who calls configure may differ from the user owning the
>> source tree. I'd therefor like to propose the following small change
>> which checks from where 'configure' was called. If configure was
>> called from within the source tree, nothing changes, otherwise we will
>> create the '.build' helper directory which contains
>> 'generated-configure.sh' right in the current build directory:
>>
>> diff -r fd40b0b3d849 make/autoconf/configure
>> --- a/make/autoconf/configure   Tue Feb 06 23:49:10 2018 +0530
>> +++ b/make/autoconf/configure   Tue Feb 06 15:46:48 2018 +0100
>> @@ -52,7 +52,16 @@
>>     fi
>>     build_support_dir="$CUSTOM_ROOT/.build"
>>   else
>> -  build_support_dir="$TOPDIR/.build"
>> +  # Test from where we are running configure, in or outside of src 
>> root.
>> +  if test "x$TOPDIR" = `pwd`; then
>> +    # We are running configure from the src root.
>> +    # Create 'build_support_dir' under $TOPDIR
>> +    build_support_dir="$TOPDIR/.build"
>> +  else
>> +    # We are running configure from outside of the src dir.
>> +    # Create 'build_support_dir' in the current directory.
>> +    build_support_dir=".build"
>> +  fi
>>   fi
>>
>>   conf_script_dir="$TOPDIR/make/autoconf"
>>
>> Would you be OK with this change? If nobody complains, I will open a
>> JBS issue and submit a webrev for formal review.
>>
>> Regards,
>> Volker
>>
>>
>> On Tue, Feb 6, 2018 at 2:27 PM, Baesken, Matthias
>> <matthias.baesken at sap.com> wrote:
>>> Hello I noticed  that   after replacing   generated-configure.sh   
>>> and  using autoconf , the  build process  writes into the sources .
>>> Error  looks like this   :
>>>
>>> Runnable configure script is not present
>>> Generating runnable configure script
>>> mkdir: cannot create directory `/openjdk/linuxppc64/jdk/.build': 
>>> Permission denied
>>>
>>>
>>> ( I run  configure  from  a separate  generation directory  )
>>>
>>> Is there a way around this  currently  (e.g.   placing the .build 
>>> folder  where configure is started and not into the sources ?) ?
>>>
>>>
>>> Thanks ,Matthias
>



More information about the build-dev mailing list