Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile is broken on osx with zsh #33

Closed
patcon opened this issue Oct 17, 2024 · 3 comments · Fixed by #34
Closed

Makefile is broken on osx with zsh #33

patcon opened this issue Oct 17, 2024 · 3 comments · Fixed by #34
Labels
bug Something isn't working

Comments

@patcon
Copy link
Member

patcon commented Oct 17, 2024

Expected behavior:
For make build on edge branch to build successfully

Actual behavior:
I get this error:

$ make build
ENV_FILE=.env
POSTGRES_DOCKER= true
TAG= dev
docker compose -f docker-compose.yml -f docker-compose.dev.yml --profile postgres --env-file .env build
[+] Building 0.0s (0/0)                                                                                                                                                                       docker:colima
invalid tag "docker.io/compdem/polis-postgres:\tdev": invalid reference format
make: *** [build] Error 17

To Reproduce:
Git clone and run make build or make echo_vars

Note the tabs "\t" in the output, and the whitespace in the vars

Screenshots:
Screenshot 2024-10-17 at 2 18 20 PM

Device information:
Current environment:

  • OSX Sonoma 14.5
  • zsh 5.9 (x86_64-apple-darwin23.0)
  • colima version 0.7.5 (alternative docker-compat container runtime)
    • this is the only "weird" thing, but I isolated a fix in the makefile environmen
  • Docker version 27.2.1, build 9e34c9bb39
  • Docker Compose version 2.29.2
  • GNU Make 3.81

Additional context:
None

Solution

I've found a fix that I will share shortly. Basically, issue involves make format, the define method, and whitespace in a place that make doesn't like it :)

patcon added a commit to patcon/polis that referenced this issue Oct 17, 2024
@patcon
Copy link
Member Author

patcon commented Oct 17, 2024

oi, took like an hour to figure out and zero in, but the very tiny fix is in #34 😅

cc @ballPointPenguin to get it cherry-picked into upstream. Godspeed, human!

$ git remote add patcon [email protected]:patcon/polis.git
$ git fetch patcon
$ git checkout -b makefile-build-error
$ git cherry-pick e2438334

(For others: Doing this round-about workflow, because for complicated and unrelated reasons, I'm unable to report the bug or submit the PR to the upstream compdem repo on my own)

@ballPointPenguin
Copy link

good catch. Makefile tabs-vs-spaces strikes again.

@ballPointPenguin
Copy link

merged compdemocracy#1822

@NewJerseyStyle NewJerseyStyle added the bug Something isn't working label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants