mainAutoconf - Support: sr #110434, autotools idea: use faster/more...

 
 

sr #110434: autotools idea: use faster/more portable dirty job tool than sh

Submitter:  Zlobin Nikita <nick87720z>
Submitted:  Wed 27 Jan 2021 01:06:49 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 27 Jan 2021 01:06:49 PM UTC, original submission:  

For summary:
- Shell is far from fastest scripting tool even for relatively fast shells like dash.
- Posix shell is only for posix, while devs keep projects buildable for non-unix platforms, like windows.
- Other tools (cmake, meson) feature both speed and greater portability, but require core tool in all stages, including build configuration.

Problem could be solved by using way faster scripting language, but as far as I understand, gnu project is unlikely to use it if there's no implementation under gpl-like license. So, now same but more verbosely, with pros and cons.

Note: I'm not sure if below affects only autoconf. Probably other autotools components need adaptation. But configuration stage is primary in my opinion - lone autoconf is nice to use with any build system, including ninja, while automake certainly depens in AC. So..... (let's start)

Issues from using shell language for dirty job
pros:
- Portability within Unix standards
cons:
- Slow due to Shell language used for dirty job. Of course, there are faster shells, like Dash, but... see below issues.
- Posix shell compliance is noop when tested with bash
- - bash --posix just enables existing posix-compliant scripts to run -> it will never warn about some non-posix features used
- - bash documentation wrongly lists some bash-specific features as basic shell features
- - developing true posix shell scripts is achievable by testing, e.g., with dash shell. But some existing packages use bashisms in build code, thus requiring bash in reality. Keeping both is somewhat cumbersome.
- Even dash is not as fast by nature, compared with some scripting languages.

Issues from other build-systems: cmake, waf, meson, etc.
pros:
- not only for unix
cons:
- require main dev tool (cmake, waf, meson, etc) in all stages, including configuration

Proposal: use fast scripting language for dirty job instead of shell (even posix).
Example languages: lua, python, perl
python:
- simple to learn. As they say, first useful code may be written after just look to existing code (no need to traverse language ref)
- as result, looks like super-popular
- as far as I know, far from fastest scripting language even among pure cross-os subset
lua:
- claimed to be among fastest scripting language
- Some say about bad versatility due to missing basic functionality like round(), yet low dev-friendliness due to inability to print object structures as in python.
- As result it seems, that few people use it.
perl:
- listed just to accompany python item
- probably it's faster than python
- uses artistic gpl unlike python (PSF) and lua (MIT), so could be more wanted for gnu project like autoconf.

Expected enhancements:
- Great speed boost in all cases
- Portability is same as for used dirty job language, even no need for MinGW.
Requirements:
- Requires various upgrades for existing autotools-based projects, ranging from release config stuff regenerating to rewrite for some shell code, most likely used for configure.ac and 3rd-party ac/m4 scripts.

Would be great if automake derivatives could be created for make alternatives, including ninja. Well, I never even used ninja, but e.g. in gentoo meson-based packages prefer it over make for basic level build tool.

Zlobin Nikita <nick87720z>

 

(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 nick87720z (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.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.12