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

guile-hall: fix cross build #377762

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

guile-hall: fix cross build #377762

wants to merge 2 commits into from

Conversation

sikmir
Copy link
Member

@sikmir sikmir commented Jan 29, 2025

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux (cross)
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Jan 29, 2025
@misuzu misuzu added the 11.by: package-maintainer This PR was created by the maintainer of the package it changes label Jan 30, 2025
@misuzu
Copy link
Contributor

misuzu commented Jan 30, 2025

The guile package doesn't cross compiles

guile> configurePhase completed in 1 minutes 6 seconds
guile> Running phase: buildPhase
guile> build flags: SHELL=/nix/store/4fvc5fm8bszmkydng1ivrvr5cbvr1g60-bash-5.2p37/bin/bash
guile> make -C libguile scmconfig.h
guile> make[1]: Entering directory '/build/guile-3.0.10/libguile'
guile>   GEN      gen-scmconfig.o
guile> In file included from ../libguile/inline.h:28,
guile>                  from ../libguile/gc.h:25,
guile>                  from ./strings.h:25,
guile>                  from /nix/store/hn4s3cq7368jkb2db02gzxhdzfa3g9zp-glibc-2.40-36-dev/include/string.h:462,
guile>                  from gen-scmconfig.c:142:
guile> ../libguile/scm.h:30:10: fatal error: libguile/scmconfig.h: No such file or directory
guile>    30 | #include "libguile/scmconfig.h"
guile>       |          ^~~~~~~~~~~~~~~~~~~~~~
guile> compilation terminated.
guile> make[1]: *** [Makefile:4478: gen-scmconfig.o] Error 1
guile> make[1]: Leaving directory '/build/guile-3.0.10/libguile'
guile> make: *** [Makefile:2615: libguile/scmconfig.h] Error 2

@sikmir
Copy link
Member Author

sikmir commented Jan 30, 2025

The guile package doesn't cross compiles

I build nix build -L .#pkgsCross.armv7l-hf-multiplatform.guile-hall on macos and that's OK. What platform you are trying to cross compile for?

@misuzu
Copy link
Contributor

misuzu commented Jan 30, 2025

What platform you are trying to cross compile for?

I've tried pkgsCross.aarch64-multiplatform.guile-hall and pkgsCross.riscv64.guile-hall on x86_64-linux, both fail the same way

@sikmir
Copy link
Member Author

sikmir commented Jan 30, 2025

What platform you are trying to cross compile for?

I've tried pkgsCross.aarch64-multiplatform.guile-hall and pkgsCross.riscv64.guile-hall on x86_64-linux, both fail the same way

Yes, I've managed to reproduce it on x86_64-linux.

@FliegendeWurst
Copy link
Member

FliegendeWurst commented Jan 31, 2025

For guile (3.0) cross-compiling I have locally:

preBuild = ''
  touch -d "1 days ago" libguile/scmconfig.h
'';

I don't remember whether it really worked. And it is a bit of a hack anyway.

@sikmir
Copy link
Member Author

sikmir commented Feb 3, 2025

I have no idea how to fix guile cross compilation on linux (it's ok on darwin). So, maybe it's for separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: cross-compilation Building packages on a different platform than they will be used on 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants