Andy Tai <[email protected]> writes: > Thanks. This works for me, for arm 32-bit. > > guix shell -C -e '(use-modules (gnu packages > cross-base))(cross-gcc-toolchain "arm-linux-gnueabihf")'
Hi Andy! Just some remarks from my side. Maybe you find them helpful. Some time ago i had the same problem and solved it in a similar fashion. However, this is imho only part of the solution. What if you want to cross-compile a project in your guix shell which in turn uses a third party dependency (lets say libpng). You can certainly download the source and cross-compile it with your toolchain you just enabled in your dev environment. However, wouldn't it be nice to just use the arm32 package provided by guix? However, I couldn't find an easy way to make the arm32 version of the library available in the guix shell. What i came up with is a function which goes recursively through all manifest entries of the dependency of the target library and resets `target` to platform i need. By doing so i can derive a package definition which lets me install a library compiled for a different platform in my guix shell (see https://yhetil.org/guix-user/[email protected]/). I also wondered if there is not an easier method. Or if this is worth a new feature in guix e.g let the user specify for each package in the manifest file for which target platform the package should be compiled to. Best regards Christoph -- Best regards Christoph Buck <[email protected]> GnuPG key: https://web.icepic.de/public_key.txt FingerPrint: B43F 4D2B 2017 E715 36C0 03C6 B8BB BCDE CD00 3305
