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

McCLIM build fails #32

Open
1 of 2 tasks
lukego opened this issue Feb 7, 2023 · 3 comments
Open
1 of 2 tasks

McCLIM build fails #32

lukego opened this issue Feb 7, 2023 · 3 comments

Comments

@lukego
Copy link
Collaborator

lukego commented Feb 7, 2023

McCLIM build is not working. I don't understand exactly why yet.

There seem to be a couple of issues:

  • mcclim-bezier package is being flagged as broken. (I see now this was done manually, possibly due to problem below.)
  • mcclim-bezier package fails because it tries to compile a file from mcclim-render into read-only nix store.

Reproduce on master branch:

$ lwp sbcl mcclim-bezier
error: builder for '/nix/store/1nhzagh6w25zsy2vzfmf128yvs654jfv-mcclim-bezier-20221106-git.drv' failed with exit code 1;
       last 10 log lines:
       > ; compiling file "/nix/store/8612lj65srfmy9a59l0l0f2w4igz0ir8-source/Extensions/fonts/ttf-medium-mixin.lisp" (written 01 JAN 1970 12:00:01 AM):
       >
       > ; wrote /build/source/Extensions/fonts/ttf-medium-mixin-tmpJAIDFZTC.fasl
       > ; compilation finished in 0:00:00.033
       > ;
       > ; compilation unit aborted
       > ;   caught 1 fatal ERROR condition
       > BUILD FAILED: Error opening #P"/nix/store/k7kcqlpc7a7p20bcarfxn7alyvryw98p-mcclim-render-20221106-git/Extensions/render/package-tmp8V3J6PE9.fasl":
       >
       >                 Permission denied
       For full logs, run 'nix log /nix/store/1nhzagh6w25zsy2vzfmf128yvs654jfv-mcclim-bezier-20221106-git.drv'.
error: 1 dependencies of derivation '/nix/store/p07vdqm699c6di1irnlp7skalwnnfhhm-sbcl-with-packages.drv' failed to build
@lukego
Copy link
Collaborator Author

lukego commented Feb 7, 2023

Thinking aloud...

The mcclim-render package seems to compile fine including Extensions/render/package.fasl:

[luke@snowy:~/git/nix-cl]$ nix build .#sbcl.pkgs.mcclim-render
warning: Git tree '/home/luke/git/nix-cl' is dirty

[luke@snowy:~/git/nix-cl]$ ls result
Apps      Copyright  data                Documentation  Experimental  INSTALL    NEWS         README.md  TODO
Backends  Core       default-icons.lisp  Examples       Extensions    Libraries  nix-support  Tests      Tools

[luke@snowy:~/git/nix-cl]$ find result/ -name '*.fasl'
result/Extensions/fonts/ttf-port-mixin.fasl
result/Extensions/fonts/mcclim-native-ttf.fasl
result/Extensions/fonts/fontconfig.fasl
result/Extensions/fonts/truetype-package.fasl
result/Extensions/fonts/ttf-medium-mixin.fasl
result/Extensions/render/vectors.fasl
result/Extensions/render/types.fasl
result/Extensions/render/utilities.fasl
result/Extensions/render/render/prim-arc.fasl
result/Extensions/render/render/prim-text.fasl
result/Extensions/render/package.fasl
result/Extensions/render/backend/mirror.fasl
result/Extensions/render/backend/fonts.fasl
result/Extensions/render/backend/medium.fasl
result/Extensions/render/backend/pixmap.fasl
result/Extensions/render/backend/port.fasl
result/Extensions/render/image.fasl

So it seems like mcclim-bezier is somehow attempting to recompile mcclim-render in a nix store directory where it is already precompiled? That's a new one for me :)

@Uthar
Copy link
Owner

Uthar commented Feb 7, 2023

mcclim/render depends on mcclim-fonts/truetype : Quicklisp ignores slashy systems in dependencies ,so we have to put it there manually

I got something to build using this patch, I don't know how to test it though:

diff --git a/imported.nix b/imported.nix
index a450468..bfc9131 100644
--- a/imported.nix
+++ b/imported.nix
@@ -39316,7 +39316,7 @@ in lib.makeScope pkgs.newScope (self: {
     systems = [ "mcclim-bezier" ];
     lispLibs = [ (getAttr "clim" self) (getAttr "clim-pdf" self) (getAttr "clim-postscript" self) (getAttr "flexichain" self) (getAttr "mcclim-clx" self) (getAttr "mcclim-null" self) (getAttr "mcclim-render" self) ];
     meta = {
-      broken = true;
+      broken = false;
     };
   });
   mcclim-bitmaps = (build-asdf-system {
diff --git a/ql.nix b/ql.nix
index 5b7987d..4559d06 100644
--- a/ql.nix
+++ b/ql.nix
@@ -193,6 +193,21 @@ let
     cl-sat_dot_minisat = super.cl-sat_dot_minisat.overrideLispAttrs (o: {
       propagatedBuildInputs = [ pkgs.minisat ];
     });
+    mcclim-fonts = super.mcclim-fonts.overrideLispAttrs (o: {
+      lispLibs = o.lispLibs ++ [
+        super.cl-dejavu
+        super.zpb-ttf
+        super.cl-vectors
+        super.cl-paths-ttf
+        super.flexi-streams
+      ];
+      systems = [ "mcclim-fonts" "mcclim-fonts/truetype" ];
+    });
+    mcclim-render = super.mcclim-render.overrideLispAttrs (o: {
+      lispLibs = o.lispLibs ++ [
+        self.mcclim-fonts
+      ];
+    });
   });
 
   qlpkgs =

@lukego
Copy link
Collaborator Author

lukego commented Feb 7, 2023

Thanks!

That patch builds for me, I'll let you know how it goes in practice.

lukego pushed a commit to lukego/nixpkgs that referenced this issue Apr 14, 2023
Introduce out-of-tree fixes to McCLIM build from
Uthar/nix-cl#32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants