Menu ▾ ▴

#189 configure uses mktemp --suffix, which is incompatible with non-GNU mktemp

autogen
pending
None
1
2020-09-26
2018-09-16
No

Hello, autogen 5.18.16 fails to configure on macOS with:

mktemp: illegal option -- -
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix 

agen5/mk-stamps.sh and config/mk-shdefs.in are trying to run mktemp with the --suffix argument. Only GNU mktemp supports that argument; BSD mktemp, which macOS uses, does not.

Looks like this problem was introduced in http://git.savannah.gnu.org/cgit/autogen.git/commit/?id=53307fa55a575402cb907b4883205a54adf4b591

Discussion

  • Bruce Korb

    Bruce Korb - 2018-09-16
    • status: open --> accepted
    • assigned_to: Bruce Korb
     
  • Bruce Korb

    Bruce Korb - 2018-09-16

    Portability is so difficult ...
    Portable "mktemp(1)" doesn't exist. At all. I'll have to wrap it in a shell function. Even that doesn't exist in the Bourne shell from the UNIX-hasn't-evolved-since-1984 crowd. (That is their problem tho.)

     

    Last edit: Bruce Korb 2018-09-16
  • Ken Cunningham

    Ken Cunningham - 2018-09-16

    Bruce - MacPorts has the gnu coreutils installed, but in that package your mktemp has had to be renamed to gmktemp so as not to conflict with the system software. Even some method of sending in the proper mktemp executable to use via configure.args would work nicely for us.

     
  • Bruce Korb

    Bruce Korb - 2018-09-16

    Thank you. Yes, I could make yet another configurable and do a substitution. But I won't. Creating new foo.in files is also a nusiance. The function will be an on-the-fly invention that will devolve to mkdir /tmp/something-$$.temp-dir if need be. A dozen lines of shell is easier than configuring two more files. :)

    I presume that for the immediate case, you have just removed the suffix specification, yes?

     

    Last edit: Bruce Korb 2018-09-16
  • Bruce Korb

    Bruce Korb - 2020-09-14

    This will be fixed in the 5.20 (next) release. I must have been feeling grouchy.

     
  • Bruce Korb

    Bruce Korb - 2020-09-26
    • status: accepted --> pending
     
  • Bruce Korb

    Bruce Korb - 2020-09-26

    fixed in alpha release 5.19.95

     

Log in to post a comment.