Help creating a package which requires a host build
I'm trying to create a package for chibi scheme for termux. Would someone be willing to help me do that?
I'm having trouble because scheme needs to bootstrap itself: I need to run the scheme executable to finish building it. But I'm building in my desktop and the host architecture is different from what's on my phone.
Here's what I've got so far. I'm comparing my build script to the one for guile scheme since it probably has to do some bootstrapping too.
Right now I turned on an option to have it build a version for the host machine and the build is finishing but whatever is inside the
package is built for my host machine. That's not what I want.
10 Replies
And here's the build script I've got so far:
Looks like a pretty standard
build.sh
, what issue are you getting?The resulting package is built for the host architecture (x86-64) instead of the phone's architecture (aarch64).
Hmm, let me find a couple packages that do host builds as examples
I'm guessing you might have to specify the target architecture manually in the host build step, not sure about the specifics of compiling this project.
oh chibi-scheme
let me see...
you might need to use termux-docker, since the Makefile for chibi-scheme doesn't provide any cross-compile related variables, take a look at pypy's
build.sh
for referenceSo this is easier to build on a device. How would I turn that into a package?
Like for the moment I'd be happy if I can create a package for use on another device. I have an old tablet I'm using as a build environment for my phone. I want to build chibi scheme on my tablet and then install it on my phone. I'm trying to avoid having stuff like clang on my phone, because I just don't have the space for it.
putting it in TUR might be perfect
especially in tur-on-device section, which will only build the package on the device
It seems to work but now I'm not sure how to get the package after building it through the TUR environment.
Like I see the output directory while in the TUR docker, but not when out of it
I figured out a way. However for some reason the package is still built in the host architecture (x86-64).
I put my build file in tur-on-device
I spent a little bit more time with it. I'm not able to build any packages from tur-on-device. It looks like whatever it builds for chibi scheme it's somehow looked at the package definition from the normal termux-packages repo on my computer
Since I already have this built successfully on a device running termux, is there a simple way for me to just package this up for installation on another device? Or am I going to have to learn how to manually create a .deb file? I opened up another thread elsewhere for trying to get my tur environment working.
iirc TUR provide an action workflow for that, open
Actions
tab and search for a workflow related to build and then check if it has workflow dispatchSo I'd have to get my package submitted to the tur in order to have it on my device? Or at least added on my fork, I suppose.
Also, how do I know if it's related to build? I have no experience with GitHub actions so I don't know what I'm looking for.