Darwin awards#1000
Merged
Merged
Conversation
it. Because lniking keg-only formulas is generally a terrible idea.
Probably harmless change, but at least it's referenced somewhere. c.f., man ld
We can't run 'em inside the same rule, as they cannot be run in // (we need the binary to be built & linked before being able to patch it!). Leverage an obscure GNU Make feature to achieve that. (https://www.gnu.org/software/make/manual/make.html#Double_002dColon)
To recap: * We want to load our own luajit, not brew's. * We want to pull our own depdendencies, not brew's. Take a roundabout way via otool -L, because sometimes, what's picked up is: * an absolute path to our own lib: GOOD * a relative path to our own lib: GOOD * an absolute path to brew's lib: BAD * a weird @rpath-prefix to our own lib, but not in the right place: BAD * a system path: BAD I love macOS. >_<".
Member
Author
|
ONE THOUSAND§§! (You couldn't have planned this one better.) |
Member
Author
|
Note that, of course, this might, to a certain extent, depend on what exactly you happen to have installed via brew... (Say, if you happened to have a matching tesseract or leptonica installed, something could potentially fuck those up, too). |
Member
Author
|
Also kind of forgot to patch my macOS tree, so, one build in the wind :D. |
-dylib is an LLD flag -dynamiclib is a Clang flag
Not a dep field. Yay. Fix it anyway.
$(shell) is make syntax, it gets expanded early, which explains the parallelism issues. Switch to pure shell syntax instead (i.e., backticks). It makes for an uglier echo, since it's not expanded, but it's less crazy ;).
Member
Author
|
Random remark: the latest SNAFU seems to confirm that the library's id is what gets used as a dependency in other libs that link to it, so fixing the id isn't as useless as I would have thought ;). |
Member
Author
|
Okay, fresh build is OK on my macOS box, so this should be good to go if the CI is clear ;). |
NiLuJe
added a commit
to NiLuJe/koreader
that referenced
this pull request
Oct 29, 2019
NiLuJe
added a commit
to koreader/koreader
that referenced
this pull request
Oct 30, 2019
Merged
mwoz123
pushed a commit
to mwoz123/koreader
that referenced
this pull request
Mar 29, 2020
0xstillb
pushed a commit
to 0xstillb/koreader-thai
that referenced
this pull request
May 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Attempt to appease the insanity currently happening w/ XCode 11
Relies on obscure GNU make features to defeat parallelism issues, hopefully the CI won't implode.
I have a Mojave build running in // to double-check.
Said insanity being completely broken dependencies in dynamic libraries: insane random @rpath, or brew libraries pulled instead of our own, or just plain broken paths. There's also often a self-reference in the deps (why is it here in the first place?) that's also broke 72.4% of the time.
I'm not actually familiar with the intricacies of the Mach-O format (nor with the relevant tools to mangle it), so, here be dragons.