bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sr #110213] curl fails with autoconf master


From: Ross Burton
Subject: [sr #110213] curl fails with autoconf master
Date: Fri, 20 Mar 2020 11:36:30 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Safari/605.1.15

URL:
  <https://savannah.gnu.org/support/?110213>

                 Summary: curl fails with autoconf master
                 Project: Autoconf
            Submitted by: rossburton
            Submitted on: Fri 20 Mar 2020 03:36:28 PM UTC
                Category: None
                Priority: 5 - Normal
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None

    _______________________________________________________

Details:

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





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?110213>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]