dbohdan / initool

Manipulate INI files from the command line
MIT License
60 stars 7 forks source link

readlink: illegal option -- f #7

Closed barracuda156 closed 1 year ago

barracuda156 commented 1 year ago

Build fails on macOS on this:

make: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_initool/initool/work/initool-75e6b71307ef65ad0061d761acc11713c2ee16f0'
mlton initool.mlb
sh test.sh
readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix 
make: *** [test] Error 1
barracuda156 commented 1 year ago

Also this:

sh test.sh
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix 
make: *** [test] Error 1
barracuda156 commented 1 year ago

Solution is either use greadlink and gmktemp from coreutils, or maybe this or alike: https://github.com/corda/corda-kubernetes-deployment/pull/9/files

dbohdan commented 1 year ago

I have modified test.sh to remove the GNUisms. (GNU coreutils would be an inconvenient dependency for macOS users.) I don't have a Mac to test it on. Please try again and tell me if it works.

barracuda156 commented 1 year ago

@dbohdan Sorry for a delay. Yes, now it builds fine without depending on coreutils, which is awesome. (While coreutils is not a heavy dependency, it is pretty fragile – GNU folks regularly break something.) I will update initool in Macports to your latest commit.

dbohdan commented 1 year ago

Great! Thanks for taking care of the port.

dbohdan commented 1 year ago

(Oh, this is a brand new port. I didn't realize it; I thought you were updating an existing one. That's pretty cool.)

barracuda156 commented 1 year ago

@dbohdan I made a port for MLton with support of PowerPC, and then started looking what I can build with it :) I saw your port in FreeBSD repo and ported over to ours. Thank you for fixing gnuisms!

dbohdan commented 1 year ago

You're welcome! I see. :-) The last Mac I owned was PowerPC, a Mac Mini G4. I ran Tiger, then Leopard, then Debian on it. While I like the idea of NetBSD and OpenBSD on old hardware, it's nice that people like you keep it usable with its original operating systems.

barracuda156 commented 1 year ago

@dbohdan I wanted to have FreeBSD as a second system for Macports, but turned out at least the current one has broken support for multicore PowerMacs: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271826 But yeah, we try to keep Darwin PPC alive and up to date as much as possible.