helpAutoconf - Support: sr #110213, curl fails with autoconf master

 
 

sr #110213: curl fails with autoconf master

Submitter:  Ross Burton <rossburton>
Submitted:  Fri 20 Mar 2020 03:36:28 PM UTC
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Operating System:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Fri 10 Jul 2020 06:18:06 PM UTC, comment #2: 

Per discussion at https://lists.gnu.org/archive/html/bug-autoconf/2020-03/msg00011.html this was because of misuse of AC_REQUIRE in curl's configure script.  AC_REQUIRE([some_macro]) only makes sense if `some_macro` can be used without arguments.  There's no good way to detect, from the implementation of AC_REQUIRE, whether the macro it's been passed can be used without arguments, so there isn't really anything we can do about it besides add a note to NEWS, which I have done.

Zack Weinberg <zackw>
Project Administrator
Fri 20 Mar 2020 04:05:08 PM UTC, comment #1: 

Yes, thanks!

I'll forward that back to curl.  Many thanks for the quick response.  Feel free to close this.

Ross Burton <rossburton>
Fri 20 Mar 2020 03:36:28 PM UTC, original submission:  

Curl cross-compiles fine with autoconf 2.69.  Swapping to autoconf master fails.

It fails like this:
checking if compiler is DEC/Compaq/HP C... no
checking if compiler is HP-UX C... no
checking if compiler is IBM C... no
checking if compiler is Intel C... no
checking if compiler is clang... no
checking if compiler is GNU C... yes
checking if compiler is LCC... no
checking if compiler is SGI MIPSpro C... no
checking if compiler is SGI MIPS C... no
checking if compiler is SunPro C... no
checking if compiler is Tiny C... no
checking if compiler is Watcom C... no
configure: error: in `/scratch/poky/work/corei7-64-poky-linux/curl/7.69.0-r0/build':
configure: error: cannot run test program while cross compiling

Yes, I'm cross-compiling, but the invocation of AC_RUN_IFELSE is guarded with a $cross_compiling check.

Adding some echos, CURL_CHECK_COMPILER[1] succeeds but it never actually calls into the body of CURL_SET_COMPILER_BASIC_OPTS[2].  The generated code looks like this:

if test "$cross_compiling" = yes
then :
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
else
  if ac_fn_c_try_run "$LINENO"
then :

fi
rm -f core .core core.conftest. gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam
fi

      #
  if test "$compiler_id" != "unknown"; then
...

Which is the beginning of CURL_SET_COMPILER_BASIC_OPTS [3].  That eventually calls CURL_COMPILER_WORKS_IFELSE which has a AC_RUN_IFELSE wrapper without the cross-compiling fallback, but it is guarded with a $cross_compiling test[4].

Does autoconf now detect calls to AC_RUN_IFELSE without an if-cross-compiling option and abort ahead of time?  If so, this breaks people who guard AC_RUN_IFELSE themselves, correct?

[1] https://github.com/curl/curl/blob/master/configure.ac#L258
[2] https://github.com/curl/curl/blob/master/m4/curl-compilers.m4#L571
[3] https://github.com/curl/curl/blob/master/m4/curl-compilers.m4#L575
[4] https://github.com/curl/curl/blob/master/m4/curl-compilers.m4#L536

Ross Burton <rossburton>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by zackw (Posted a comment)
  • -email is unavailable- added by rossburton (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-07-10 zackw StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top


    Powered by Savane 3.9