zalando / restful-api-guidelines

A model set of guidelines for RESTful APIs and Events, created by Zalando
https://opensource.zalando.com/restful-api-guidelines/
Creative Commons Attribution 4.0 International
2.61k stars 384 forks source link

make all fails on Apple Mac #780

Closed Nkalakatha closed 9 months ago

Nkalakatha commented 11 months ago

make all fails on Apple Mac, with the following error:

rm -rf output includes;
mkdir -p includes; scripts/generate-includes.sh "includes";
scripts/generate-includes.sh: line 22: ${1}/${NAME,,}.yaml: bad substitution
make: *** [includes] Error 1
ePaul commented 11 months ago

This looks like it could be caused by a feature (the variable substitution with case change) not supported by your version of bash. Could you give us the output of bash --version, as well as your Mac OS version?

Nkalakatha commented 10 months ago

Thanks @ePaul

Mac OS is: Sonoma 14.0

bash --version GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin23) Copyright (C) 2007 Free Software Foundation, Inc.

tkrop commented 10 months ago

Bash 3.2 from (c) 2007 is a darn old version. Current systems should bet on Bash 5.1. Bash 4.0 released 2009 would be a reasonable compatibility requirement that I think is supported by us. May be you can try to update to the latest available version for your system using

brew update && brew install bash
Nkalakatha commented 10 months ago

Worth a try @tkrop - thanks! Unfortunately though, it doesn't resolve the issue. I get the same error on the updated version of bash bash --version GNU bash, version 5.2.15(1)-release (x86_64-apple-darwin23.0.0) Copyright (C) 2022 Free Software Foundation, Inc.

tkrop commented 10 months ago

@Nkalakatha okay, since I have no Mac, I needed to investigate a bit to understand the problem. The problem is, that the main MacOS bash upgrades suggest to do a side-by-side installation of the new bash and the original bash delivered by Apple. The original stays under /bin/bash while the new is installed under /usr/local/bin/bash.

Since the Makefile as well as the script use /bin/bash, the upgrade is not changing anything and the build still fails. This is a most annoying behavior or MacOS.

ePaul commented 10 months ago

@Nkalakatha could you please check out the branch of #786 and see whether that runs properly for you?

Nkalakatha commented 10 months ago

@ePaul I can confirm that this change resolves the issue on my Apple Mac. Thank you to all involved for this fix - much appreciated!!