-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Various cross-compilation fixes #51154
Conversation
@@ -62,6 +62,9 @@ in stdenv.mkDerivation rec { | |||
doCheck = true; | |||
|
|||
postInstall = glib.flattenInclude + '' | |||
substituteInPlace $dev/bin/freetype-config \ | |||
--replace ${buildPackages.pkgconfig} ${pkgconfig} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct? I would think you would want buildPackages pkgconfig in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so freetype-config
is build for the host machine and buildPackages.pkgconfig has the wrong architecture. We also have a check for that to warn about those cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dealing with -config
style applications is a different challenge we have to face. This would need some kind of buildPackage
that points to the host packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I would straight up
rm "$dev/bin"
cp -r "${buildPackages.freetype.dev}/bin" "$dev/"
and file an issue upstream with the maintainer so we can easily build *-config
as a separate derivation and sidestep the issue entirely.
*-config
style stuff sucks for the same reason compilers insisting on building their own standard libraries sucks. Packages' installations should be for only one platform (/ not cross bootstrapping stages).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait, I forgot that the *-config
binaries are hard-coded with that necessary data often, so my cp -r
won't work. Ugh!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we also discuss this here: #51176
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
Unexpected error: command failed with exit code 1 on aarch64-linux (full log) Attempted: freetype, libpfm, wayland Partial log (click to expand)
|
Timed out, unknown build status on x86_64-darwin (full log) Attempted: freetype The following builds were skipped because they don't evaluate on x86_64-darwin: libpfm, wayland Partial log (click to expand)
|
Timed out, unknown build status on x86_64-linux (full log) Attempted: freetype, libpfm, wayland Partial log (click to expand)
|
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)