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: fix parallel compilation using inkscape #261

Closed
wants to merge 1 commit into from

Conversation

tleb
Copy link
Member

@tleb tleb commented Jan 13, 2025

Inkscape does DBus accesses at startup to look for other running instances. The feature fails quite often for some obscure reason. Disable it using (undocumented) SELF_CALL environment variable.

Before:

⟩ make clean
⟩ make -j20 full-linux-kernel-slides.pdf
make: *** [Makefile:271: <...PATH-TO-TRAINING-MATERIALS...>/out/./common/sd-card.pdf] Error 134
make: *** Waiting for unfinished jobs....
make: *** [Makefile:271: <...PATH-TO-TRAINING-MATERIALS...>/out/./common/qemu-logo.pdf] Error 134
make: *** [Makefile:269: <...PATH-TO-TRAINING-MATERIALS...>/out/./common/strace-c-output.pdf] Error 134
make: *** [Makefile:269: <...PATH-TO-TRAINING-MATERIALS...>/out/./agenda/qemu-logo.pdf] Error 134
make: *** [Makefile:269: <...PATH-TO-TRAINING-MATERIALS...>/out/./common/gdb-vs-gdbserver.pdf] Error 134
make: *** [Makefile:269: <...PATH-TO-TRAINING-MATERIALS...>/out/./common/logo-cc.pdf] Error 134
⟩ # note that failing targets is random and changes on each call

After:

⟩ make clean
⟩ make -j20 full-linux-kernel-slides.pdf
⟩ # works without errors

Posting as a PR as I would appreciate a round of review before pushing to the master branch.

Inkscape does DBus accesses at startup to look for other running
instances. The feature fails quite often for some obscure reason.
Disable it using (undocumented) SELF_CALL environment variable.

Code doing it in Inkscape:
https://gitlab.com/inkscape/inkscape/-/blob/a77b160f/src/inkscape-application.cpp#L557

They set it for their child extensions:
https://gitlab.com/inkscape/inkscape/-/blob/0b4d3151/src/extension/extension.cpp#L529-530

Found in a bug comment:
https://gitlab.com/inkscape/inkscape/-/issues/4716#note_1898150983

Computation of INKSCAPE_IS_NEW must be done using the same variable as
we do recursive make calls.

Before:

⟩ make clean
⟩ make -j20 full-linux-kernel-slides.pdf
make: *** [Makefile:271: <...PATH-TO-TRAINING-MATERIALS...>/out/./common/sd-card.pdf] Error 134
make: *** Waiting for unfinished jobs....
make: *** [Makefile:271: <...PATH-TO-TRAINING-MATERIALS...>/out/./common/qemu-logo.pdf] Error 134
make: *** [Makefile:269: <...PATH-TO-TRAINING-MATERIALS...>/out/./common/strace-c-output.pdf] Error 134
make: *** [Makefile:269: <...PATH-TO-TRAINING-MATERIALS...>/out/./agenda/qemu-logo.pdf] Error 134
make: *** [Makefile:269: <...PATH-TO-TRAINING-MATERIALS...>/out/./common/gdb-vs-gdbserver.pdf] Error 134
make: *** [Makefile:269: <...PATH-TO-TRAINING-MATERIALS...>/out/./common/logo-cc.pdf] Error 134
⟩ # note that failing targets is random and changes on each call

After:

⟩ make clean
⟩ make -j20 full-linux-kernel-slides.pdf
⟩ # works without errors

Signed-off-by: Théo Lebrun <[email protected]>
@tleb tleb force-pushed the fix-concurrent-builds branch from b3413d8 to ff32eb2 Compare January 14, 2025 09:26
@tleb
Copy link
Member Author

tleb commented Jan 15, 2025

After feedback in direct messages, I merged the patch as e16c791.

@tleb tleb closed this Jan 15, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 2025
@tleb tleb deleted the fix-concurrent-builds branch January 15, 2025 09:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant