Skip to content

Makefile: create BINDIR before installing - #44

Merged
sfchen merged 1 commit into
OpenGene:mainfrom
BenjaminDEMAILLE:makefile-install-mkdir
Sep 4, 2026
Merged

Makefile: create BINDIR before installing#44
sfchen merged 1 commit into
OpenGene:mainfrom
BenjaminDEMAILLE:makefile-install-mkdir

Conversation

@BenjaminDEMAILLE

@BenjaminDEMAILLE BenjaminDEMAILLE commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

make install fails when $(PREFIX)/bin does not exist yet, because install does not create the destination directory:

install fastplong /path/to/prefix/bin/fastplong
install: /path/to/prefix/bin/fastplong: No such file or directory

This shows up in any staged install into a fresh prefix (distro/Homebrew packaging, DESTDIR-style installs, containers), where packagers currently have to mkdir -p the bin directory themselves before calling make install.

Adding mkdir -p $(BINDIR) to the install target fixes it and is a no-op when the directory already exists.

The same patch is open for fastp, which has the identical Makefile: OpenGene/fastp#714

Tested: make install PREFIX=/tmp/fresh-prefix now succeeds where it previously failed.

`make install` fails when $(PREFIX)/bin does not exist yet, because `install`
does not create the destination directory:

    install fastplong /path/to/prefix/bin/fastplong
    install: /path/to/prefix/bin/fastplong: No such file or directory

This happens with any staged install into a fresh prefix (packaging, DESTDIR-style
installs, containers). Create BINDIR first.
@sfchen
sfchen merged commit a669259 into OpenGene:main Sep 4, 2026
1 of 3 checks passed
@BenjaminDEMAILLE

Copy link
Copy Markdown
Contributor Author

Thanks for merging.

Do you have a rough timeline for the next tagged release? Homebrew builds from release tarballs, so the fix only reaches us once it is in a tag. Until then the formula has to carry a mkdir workaround before make install, which is exactly what a reviewer flagged: Homebrew/homebrew-core#301438

No rush on my side if a release is already planned; I just want to know whether to keep the workaround or wait for the tag before the formula is merged.

@BenjaminDEMAILLE
BenjaminDEMAILLE deleted the makefile-install-mkdir branch September 8, 2026 11:38
@BenjaminDEMAILLE
BenjaminDEMAILLE restored the makefile-install-mkdir branch September 8, 2026 13:11
@BenjaminDEMAILLE
BenjaminDEMAILLE deleted the makefile-install-mkdir branch September 8, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants