Skip to content

Fix build instruction#224

Merged
rhafer merged 1 commit intoopencloud-eu:mainfrom
rhafer:issue/216
Apr 24, 2025
Merged

Fix build instruction#224
rhafer merged 1 commit intoopencloud-eu:mainfrom
rhafer:issue/216

Conversation

@rhafer
Copy link
Copy Markdown
Member

@rhafer rhafer commented Apr 10, 2025

At least with GNU make the -C option is not target specific. So for now we need two make calls.

Fixes #216

@rhafer rhafer self-assigned this Apr 10, 2025
@rhafer rhafer requested review from Svanvith and Copilot April 10, 2025 12:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@Narrat
Copy link
Copy Markdown

Narrat commented Apr 10, 2025

I would still advocate to add a remark on thread safety or explicitly add -j1 for the make generate call. Otherwise it will reliably fail to generate as it wants to use binaries which are in the process of being (re-)installed. At least happens for me.
May not be noticeable by default, as default is -j1, but people know about this specific knob. And using distro mechanics for creating a package to be managed by a package manager may make use of it too.

At least with GNU make the `-C` option is not target specific. So for
now we need two make calls.

Fixes opencloud-eu#216
@rhafer
Copy link
Copy Markdown
Member Author

rhafer commented Apr 22, 2025

I would still advocate to add a remark on thread safety or explicitly add -j1 for the make generate call. Otherwise it will reliably fail to generate

I would rather fix the Makefiles in that case. This helps for me : opencloud-eu/opencloud#709

@Narrat
Copy link
Copy Markdown

Narrat commented Apr 23, 2025

I would rather fix the Makefiles in that case. This helps for me : opencloud-eu/opencloud#709

Well, that works too :D
I tried the PR and can report that it isn't necessary anymore to be cautious with -j for make.

@Narrat
Copy link
Copy Markdown

Narrat commented Apr 23, 2025

Small addendum.
On a fresh clone it will fail if -j is set. But not because of trying to access binaries it is in the process of being (re-)installed anymore.

(...)
(re)installing /home/tir123/go/bin/buf-v1.39.0
(re)installing /home/tir123/go/bin/bingo-v0.9.0
generating protobuf content
cd ../../protogen/proto && /home/tir123/go/bin/buf-v1.39.0 generate
Failure: plugin doc: exec: "../../.bingo/protoc-gen-doc": stat ../../.bingo/protoc-gen-doc: no such file or directory
make[1]: *** [../../.make/protobuf.mk:24: /home/tir123/Builds/AUR/opencloud-git/src/opencloud/protogen/buf.sha1.lock] Fehler 1
make[1]: *** Es wird auf noch nicht beendete Prozesse gewartet …
make[1]: Verzeichnis „/home/tir123/Builds/AUR/opencloud-git/src/opencloud/services/settings“ wird verlassen
make: *** [Makefile:147: generate-prod] Fehler 1

Running the same command again on this work enviroment (like make -j4 clean generate) will succeed though.

@rhafer
Copy link
Copy Markdown
Member Author

rhafer commented Apr 23, 2025

On a fresh clone it will fail if -j is set. But not because of trying to access binaries it is in the process of being (re-)installed anymore.

Interesting. I couldn't reproduce this. Which make are you using? Nevermind. I think I know what's wrong.

opencloud-eu/opencloud#714 should fix it

@Narrat
Copy link
Copy Markdown

Narrat commented Apr 23, 2025

Which make are you using?

For completeness:

$ make --version
GNU Make 4.4.1

Will test the PR and report back.

@Narrat
Copy link
Copy Markdown

Narrat commented Apr 23, 2025

The mentioned PR does fix the issue :)

@rhafer rhafer merged commit 622a7c8 into opencloud-eu:main Apr 24, 2025
1 check passed
@openclouders openclouders mentioned this pull request Apr 23, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make command in bare-metal issue is wrong

4 participants