patchGNU Autoconf Archive - Patches: patch #9926, AC_PROG_CC_FOR_BUILD: "test:...

 
 

patch #9926: AC_PROG_CC_FOR_BUILD: "test: =: unary operator expected"

Submitter:  None
Submitted:  Wed 22 Apr 2020 10:42:10 PM UTC
 
Priority:  5 - Normal Status:  Done
Assigned to:  None Originator Email:  -email is unavailable-
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Thu 17 Jun 2021 01:16:55 PM UTC, comment #3: 
Peter Simons <simons>
Project Administrator
Fri 19 Feb 2021 11:11:38 AM UTC, comment #2: 

We'd need a patch to do anything about this issue, I'm afraid.

Peter Simons <simons>
Project Administrator
Wed 17 Jun 2020 09:09:11 AM UTC, comment #1: 

The relevant shell script triggering the warning is this:

if test $ac_compiler_gnu = yes; then
  GCC_FOR_BUILD=yes
else
  GCC_FOR_BUILD=
fi

So this is a classical case of $ac_compiler_gnu not being set. One can fix it by checking `$ac_compiler_gnu = xyes` instead.

As such, I would suspect this commit as source of the regression: http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=commitdiff;h=10e1f73a781df74eb7b088948d78793b11b12225

But that might be totally wrong. Unfortunately, I don't know enough about m4 or the autoconf internals to figure out what the proper fix for this ought to be :-(. Perhaps the patch author (Jannick) has an idea?

Max Horn <fingolfin>
Wed 22 Apr 2020 10:42:10 PM UTC, original submission:  

It seems that since commit 3715541f5605c821d992645cdf981331e05c5980, using AC_PROG_CC_FOR_BUILD results in "test: =: unary operator expected" syntax error in output of configure.

$ cat configure.ac
AC_INIT
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC_FOR_BUILD
AC_OUTPUT
$ autoreconf
$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking build system type... x86_64-pc-linux-gnu
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking whether we are using the GNU C compiler... (cached) yes
./configure: line 3129: test: =: unary operator expected
checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes
checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... none needed
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E
configure: creating ./config.status

Anonymous

 

(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 simons (Posted a comment)
  • -email is unavailable- added by fingolfin (Posted a comment)
  • -email is unavailable- added by fingolfin
  •  

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-06-17 simons StatusNeed Info Done
    2021-02-19 simons StatusNone Need Info
        Open/ClosedOpen Closed
    2020-06-17 fingolfin Carbon-CopyRemoved fingolfin -
    2020-06-17 fingolfin Carbon-Copy- Added fingolfin
        Carbon-Copy- Added -email is unavailable-

    Back to the top


    Powered by Savane 3.9