mainAutoconf - Support: sr #110271, libSDL2 fails with autoconf 2.70

 
 

sr #110271: libSDL2 fails with autoconf 2.70

Submitter:  Ross Burton <rossburton>
Submitted:  Thu 16 Jul 2020 03:28:14 PM UTC
   
 
Priority:  * 5 - Unprioritized Severity:  3 - Normal
Status:  Invalid Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 16 Jul 2020 05:04:27 PM UTC, comment #2: 

Thanks for following up; closing the bug report.

Paul Eggert <eggert>
Group administrator
Thu 16 Jul 2020 04:36:12 PM UTC, comment #1: 

Discussion on the list:
---
This is a classic M4 quoting bug.  The macro should quote the third
argument to AC_CACHE_CHECK (and really, should quote all the arguments).

The problem is that diversions do not work properly during arugment
collection so AC_REQUIRE (which depends on diversions) and many other
macros will not work properly if it is expanded during argument
collection.

Quote the arguments to AC_CACHE_CHECK and the prerequisite macros will
get expanded in the correct order.
---

I've tested this is the case and this can be closed.

Ross Burton <rossburton>
Thu 16 Jul 2020 03:28:14 PM UTC, original submission:  

First, apologies if we've already discussed this but I cant find the discussion.

libSDL2 fails to configure with autoconf 2.70 but works with 2.69:

| checking for size_t... yes
| checking for M_PI in math.h... ../SDL2-2.0.12/configure: line 13202: CPP: command not found
| checking how to run the C preprocessor... gcc  -E
| ../SDL2-2.0.12/configure: line 13328: ac_fn_c_try_cpp: command not found
| ../SDL2-2.0.12/configure: line 13328: ac_fn_c_try_cpp: command not found
| configure: error: in `/home/pokybuild/yocto-worker/qemux86-64/build/build/tmp/work/x86_64-linux/libsdl2-native/2.0.12-r0/build':
| configure: error: C preprocessor "gcc  -E" fails sanity check
| See `config.log' for more details
| WARNING: exit code 1 from a shell command.

The configure.ac is just a very badly named macro:

    AC_CHECK_DEFINE(M_PI, math.h)

Which is implemented here:

https://github.com/spurious/SDL-mirror/blob/master/acinclude/ac_check_define.m4

This uses AC_EGREP_CPP but it doesn't appear to explicitly look for a cpp.  My workaround is to explicltly call AC_PROG_CPP earlier: should AC_EGREP_CPP be doing this, or should this requirement be documented?

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 eggert (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-16 eggert StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code