Skip to content

Mac build fails if /opt/local/libexec/gnubin is in PATH #20613

@lefth

Description

@lefth

Is there an existing issue for this?

  • I checked and did not find my issue in the already reported ones

Describe the bug

If /opt/local/libexec/gnubin (or $(brew --prefix coreutils)/libexec/gnubin) is early in PATH, the versions of find and sed invoked will be the GNU versions. The arguments differ from the Mac versions in incompatible ways. I fixed it by prepending "/usr/bin/" to these two commands. Other commands seem to work, but the future-compatible fix is to be sure we are never calling the gnu executables by removing "gnubin" from PATH or moving it to the end.

Steps to reproduce

  1. Install homebrew
  2. brew install findutils gnu-sed
  3. Add $(brew --prefix coreutils)/libexec/gnubin) to the beginning of PATH
  4. Run the packaging/macos homebrew build scripts
  5. The error output is:
sed: can't read s|{VERSION}|5.5.0|: No such file or directory
./3_make_hb_darktable_package.sh{}:209: Error: command `sed -i '' 's|{VERSION}|'$(git describe --tags --long --match '*[0-9.][0-9.][0-9]' | cut -d- -f2 | sed 's/^\([0-9]*\.[0-9]*\)$/\1.0/')'|' "$dtWorkingDir"/Contents/Info.plist` failed with exit code 2

Expected behavior

No response

Logfile | Screenshot | Screencast

No response

Commit

No response

Where did you obtain darktable from?

self compiled

darktable version

2360650

What OS are you using?

Mac

What is the version of your OS?

MacOS 15

Describe your system

No response

Are you using OpenCL GPU in darktable?

None

If yes, what is the GPU card and driver?

No response

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug: invalidthe bug is not a bug, but a feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions