Hello, I have a small issue when building (cross-compile) the Smalltalk VM on an ARM(v6) embedded linux system (Nano Pi neno and Raspberry Pi Zero) that uses Musl as default libc implementation. The problem is that the code and the configure script does not have official support for Musl, so I created a patch file that adds support to Musl, you can find the patch here. With this patch, i am able to cross-compile on the ARM toolchain for my system; with 4 plugins:
You can find the build script here For now, i can live with this dirty trick, but i would be verry happy if the mainline VM has official support to Musl. That's why i create this issue. Thanks — |
Hello to anotherARM VM maker; nice to know I'm not the only one ... Why use cross-compiling? You know the Pi can perfectly happily compile & build for itself, right? That's the only build I ever use. Do the build on a Pi3b+ and it takes not very long at all. > On 2018-11-09, at 1:32 AM, Xuan Sang LE <[hidden email]> wrote: > > Hello, > > I have a small issue when building (cross-compile) the Smalltalk VM on an ARM(v6) embedded linux system (Nano Pi neno and Raspberry Pi Zero) that uses Musl as default libc implementation. > > The problem is that the code and the configure script does not have official support for Musl, so I created a patch file that adds support to Musl, you can find the patch here. > > With this patch, i am able to cross-compile on the ARM toolchain for my system; with 4 plugins: > > FilePlugin \ > SqueakSSL \ > SqueakFFIPrims \ > SocketPlugin > > You can find the build script here > > For now, i can live with this dirty trick, but i would be verry happy if the mainline VM has official support to Musl. > > That's why i create this issue. > > Thanks > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub, or mute the thread. > tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Useful Latin Phrases:- Utinam logica falsa tuam philosophiam totam suffodiant! = May faulty logic undermine your entire philosophy! |
In reply to this post by David T Lewis
I used cross-compile because I built my own barebones linux system with musl + busybox, (and with my own toolchain), so building the VM directly on the device (which runs my very lightweight embedded linux system) is not an option for me in this case — |
> On 2018-11-09, at 10:05 AM, Xuan Sang LE <[hidden email]> wrote: > > I used cross-compile because I built my own barebones linux system with musl + busybox, (and with my own toolchain), so building the VM directly on the device (which runs my very lightweight embedded linux system) is not an option for me in this case Fair enough; perfectly good reason. tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Fractured Idiom:- MONAGE A TROIS - I am three years old |
In reply to this post by David T Lewis
Hi, making the change to config.sub is fine. What I don't get is the explicit definition for struct _IO_FILE in sqVirtualMachine.c. Shouldn't we do something like #if TheDefimneThatSaysWereUsingMUSL include <whereever/lives/stdio.h>#endif The key here is to not break the existing build, and including a possibly incompatible definition of struct _IO_FILE in sqVirtualMachine.c is almost guaranteed to break the build somewhere :-) — |
In reply to this post by David T Lewis
Hello, static FILE stdoutStack[STDOUT_STACK_SZ]; So i put the explicit definition to the — |
In reply to this post by David T Lewis
Then I think the best thing to do is simply to #ifdef out the stdoutStack, pushOutputFile, and popOutputFile code on Musl. What is the define that indicates that Must is being used? — |
In reply to this post by David T Lewis
I just do a check, there are two minor problems with Musl:
For the fist problem, we can just use some thing like this: #ifdef __MUSL__
// do some stuffs
#endif Then, when one want to compile again Musl, just add the For the second problem, the added explicit definition (as i did) is not guaranteed to work in the future version of Musl since the — |
In reply to this post by David T Lewis
Didn't see this earlier. I've built the VM on Alpine Linux, which is also Musl. I don't remember having to modify the source. Did have to modify CMake files to link against some more libraries. — |
In reply to this post by David T Lewis
Could you share your modification (i.e. the CMake)? Modifying the source works for me, but I'm not really happy about it :-) — |
In reply to this post by David T Lewis
On Wed, Jul 24, 2019 at 01:15:51AM -0700, Xuan Sang LE wrote: > Could you share your modification (i.e. the CMake)? Modifying the source works for me, but I'm not really happy about it :-) I'll be making a branch in my fork to do the necessary modifications. I hope to do it quite soon, say, in the month of Aug. — |
In reply to this post by David T Lewis
Replying to my own comment, I've now put up my modifications to the source tree in the — |
In reply to this post by David T Lewis
Closed #304. — |
Free forum by Nabble | Edit this page |