mainAutoconf - Support: sr #111044, autoconf should assert existence...

 
 

sr #111044: autoconf should assert existence of all subsidiary tools at startup

Submitter:  None
Submitted:  Mon 01 Apr 2024 03:10:23 PM UTC
   
 
Priority:  * 2 - Eventually Severity:  2 - Minor
Status:  Need Info Privacy:  Public
Assigned to:  None Originator Email:  -email is unavailable-
Open/Closed:  Open Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 01 Apr 2024 09:10:17 PM UTC, comment #3: 

comment #2:

> neither `diff` nor `awk` (and arguably not even `sed`) should be an implicit dependency.


Not sure I'd go that far. The GNU Coding Standards for utilities in makefiles lists the following as usable without further ado:

awk cat cmp cp diff echo egrep expr false grep install-info ln ls
mkdir mv printf pwd rm rmdir sed sleep sort tar test touch tr true


Although some of these are debatable (egrep is no longer required by POSIX and people should use 'grep -E', install-info is needed only if using info) it's not a bad list of utilities that should work everywhere. I'd hate for Autoconf to have to worry about platforms lacking 'rm'....

Paul Eggert <eggert>
Group administrator
Mon 01 Apr 2024 05:18:09 PM UTC, comment #2: 

Thank you for (re-)reporting this bug.  I agree that autoconf should make reasonable efforts to run in a minimal environment and, when the environment is too minimal to tolerate, it should give clear error messages.  In particular I agree that neither `diff` nor `awk` (and arguably not even `sed`) should be an implicit dependency.

That said, this kind of bug is very difficult to work on without concrete test cases and test environments.  If you could provide us with both of

  • a minimized configure.ac that produces a configure script that malfunctions (meaning, neither runs to completion correctly nor produces a useful error message and halts) in the minimal environment you're working with


  • details of the minimal environment you're working with, in particular the complete list of available shell commands ("command names" as defined in https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01_01 -- most importantly, both shell built-ins and external executables) and any cases where functionality guaranteed by POSIX.1-2001 is absent; f there is a straightforward recipe for constructing a matching environment from widely available free software, please describe it


that would be super helpful and would probably get the bug addressed orders of magnitude faster.

Zack Weinberg <zackw>
Group administrator
Mon 01 Apr 2024 04:20:23 PM UTC, comment #1: 

To elaborate on that, people may use the output of such tools to enable or disable certain compiler features. An example of such a case was found when building OpenVPN [0].

This was also reported in 2008 [1].

[0] https://twitter.com/disconnect3d_pl/status/1774747022362325263 (probably change twitter to nitter to get access without logging in)

[1] https://lists.gnu.org/archive/html/bug-autoconf/2008-03/msg00033.html

Anonymous
Mon 01 Apr 2024 03:10:23 PM UTC, original submission:  

The script generated by autoconf may run in environments even sparser than the gnu standards.  One recentish example is missing "diff", which results in confusing diagnostics but not an outright failure.

It'd be helpful - and possibly improve security overall - if autoconf's generated shell script were to enumerate and assert the existence of every /usr/bin type basic utility its code relies on, and if absent, abort abort abort.  Better that than partial or obscured failures leading to oddly configured target programs.

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 eggert (Posted a comment)
  • -email is unavailable- added by zackw (Posted a comment)
  • -email is unavailable- added by None (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-04-01 zackw Priority5 - Unprioritized 2 - Eventually
        Severity3 - Normal 2 - Minor
        StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code