David Craven <da...@craven.ch> skribis: >> Hmm why is there a second one? ‘gnu-build-system’ already provides gcc >> and gcc:lib as implicit inputs, so maybe it’s just a matter of removing >> ‘gcc’ from Rust’s ‘inputs’? > > So we do have an implicit gcc:lib package as an input. But I have to patchelf > the rustc binaries and libraries so I need a way to retrieve the gcc lib > output. > I can do (assoc-ref inputs "gcc") but how do I get a reference to the > lib output? > (assoc-ref* inputs "gcc" "lib") doesn't work... So I add ("gcc:lib" > ,gcc "lib") explicitly > to the inputs so that I can retrieve it. This results in slightly > different versions > being included.
OK, got it. Then you should probably be able to do: (inputs `(("gcc:lib" ,(canonical-package gcc) "lib") …)) >> When you do ‘guix build rust -s i686-linux’, you get 32-bit packages. >> Is that enough or am I missing something? > > The problem here is that we are patching precompiled binaries for i686 to get > them to run with guix. So I need to get a reference to a 32-bit glibc > from within the package definition. I think that we'd have to > --enable-multilib. > I don't know if we can make it a separate output and how we can prevent it > from being added to %final-inputs by default. And then we need a way of > obtaining it from within a package definition which amounts to the same > problem as with gcc:lib. We don’t currently --enable-multilib, but you could force a reference to a 32-bit libc with this hack: (inputs `(("glibc32" ,(package (inherit glibc) (arguments '(#:system "i686-linux" …)))))) That’s unnecessary when the system is already "i686-linux", of course. Would that help? Cheers, Ludo’.