bugGNU gettext - Bugs: bug #63097, 0.21 build setup breaks Automake...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #63097: 0.21 build setup breaks Automake "compile" wrapper script

Submitter:  Peter Williams <pkgw>
Submitted:  Fri 23 Sep 2022 03:28:15 PM UTC
   
 
Category:  Build Severity:  3 - Normal
Item Group:  None Status:  Not a Bug
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Fri 23 Sep 2022 05:53:33 PM UTC, comment #3: 


> we found that there were checks in autoconf/automake that relied on the value of $CC being "cl" in order to properly detect and handle MSVC


I found it too burdensome to support this convention from A to Z. It's easier to assume that $CC and $CXX already contain the wrapper. So that's the way I documented it in the INSTALL.windows file. Last not least, it also allows you to make your private changes to the 'compile' and 'ar-lib' scripts without having to repeat these in every package.

Bruno Haible <haible>
Group administrator
Fri 23 Sep 2022 05:22:32 PM UTC, comment #2: 

In previous MSVC builds, we found that there were checks in autoconf/automake that relied on the value of $CC being "cl" in order to properly detect and handle MSVC, so we needed the code in `configure` to add the `compile` wrapper during the configuration process -- which is what _AM_PROG_CC_C_O did for us.

However, while looking into this issue, I do remember noticing some new configure code that looked like it could probe the compiler name removing wrappers if needed, so maybe that constraint is no longer an issue.

Peter Williams <pkgw>
Fri 23 Sep 2022 04:42:46 PM UTC, comment #1: 


> There isn't even a "compile" script in the "build-aux" subdirectory, as can be found in previous releases.


Actually there is no need to package this script in every package. gettext's INSTALL.windows file says

   You also need the scripts 'ar-lib' and 'compile' from
     https://git.savannah.gnu.org/gitweb/?p=automake.git;a=blob_plain;f=lib/ar-lib;hb=HEAD
     https://git.savannah.gnu.org/gitweb/?p=automake.git;a=blob_plain;f=lib/compile;hb=HEAD
   respectively.
   They may also be included in this package, in directory 'build-aux/'.
   Save them; the instructions below assume that you stored them in $HOME/msvc/.
   Make them executable:
      chmod a+x ar-lib compile


> This seems to erase the work done in aclocal's "init.m4" file, which extends AC_PROG_CC to also invoke _AM_PROG_CC_C_O.


In my experience, all $CC values support -c with -o, thus this special automake code is not necessary.


Bruno Haible <haible>
Group administrator
Fri 23 Sep 2022 03:28:15 PM UTC, original submission:  

In attempting to build gettext with MSVC on Windows, I've discovered that the build system of the 0.21 release has an issue that breaks Automake's "compile" wrapper script, used to support compilers that don't accept "-c" and "-o" at the same time or have other quirky behavior.

The problem is easy to demonstrate. There isn't even a "compile" script in the "build-aux" subdirectory, as can be found in previous releases.

The issue appears to be the new "std-gnu11.m4" gnulib script. Unlike other scripts that alter the C compiler detection, this script completely overwrites the definition of the AC_PROG_CC macro. This seems to erase the work done in aclocal's "init.m4" file, which extends AC_PROG_CC to also invoke _AM_PROG_CC_C_O. A variety of other M4 files seem to also extend AC_PROG_CC in a similar way, and the behavior of the std-gnu11 script may break those as well.

If, as an example workaround, I blank out the std-gnu11.m4 files in the gettext source tree and run "autoreconf", the "compile" script starts appearing in build-aux and the relevant code is re-added to the output "configure" script.

I'd say that this is essentially a bug in gnulib, but there's a question as to the right course of action to work around it here in gettext.

Peter Williams <pkgw>

 

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

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 haible (Posted a comment)
  • -email is unavailable- added by pkgw (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.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-09-23 haible StatusNone Not a Bug
        Assigned toNone haible
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code