levelsio / levelsio/xdr-boost

Makefile: sudo make install causes permission errors on subsequent builds

Open Beginner friendly
#5 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
185
Forks
22
PR merge metrics
No merged PRs in 30d

Description

sudo make install triggers build as root, making .build/xdr-boost owned by root. Any subsequent non-sudo build fails:

ld: can't write output file: .build/xdr-boost

Repro: make buildsudo make installmake launch-agent → fails

Cause: Dependency chain launch-agent → install → build means sudo propagates into the build step.

Fix: Remove build as a dependency of install (and install from launch-agent), so sudo is only used for the copy to /usr/local/bin.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the Makefile and inspect the dependency chain between launch-agent, install, and build. Reproduce with make build, sudo make install, and make launch-agent; done means installation only uses sudo for copying to /usr/local/bin and a subsequent non-sudo build no longer fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system
Issue type
Bug
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.