[OpenSmalltalk/opensmalltalk-vm] Support for musl (instead of GNU libc) when building the VM for embedded system (#304)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] Support for musl (instead of GNU libc) when building the VM for embedded system (#304)

David T Lewis
 

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.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Support for musl (instead of GNU libc) when building the VM for embedded system (#304)"}],"action":{"name":"View Issue","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Support for musl (instead of GNU libc) when building the VM for embedded system (#304)", "sections": [ { "text": "", "activityTitle": "**Xuan Sang LE**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@lxsang", "facts": [ { "name": "Repository: ", "value": "OpenSmalltalk/opensmalltalk-vm" }, { "name": "Issue #: ", "value": 304 } ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 304,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 304\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 408484223\n}" } ], "themeColor": "26292E" } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl (instead of GNU libc) when building the VM for embedded system (#304)

timrowledge
 
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!


Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl when building the VM for embedded system (#304)

David T Lewis
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


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@lxsang in #304: 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 "}],"action":{"name":"View Issue","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437444317"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437444317", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437444317", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl when building the VM for embedded system (#304)", "sections": [ { "text": "", "activityTitle": "**Xuan Sang LE**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@lxsang", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 304,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 304\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437444317" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 408484223\n}" } ], "themeColor": "26292E" } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl when building the VM for embedded system (#304)

timrowledge
 


> 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


Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl when building the VM for embedded system (#304)

David T Lewis
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 :-)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@eliotmiranda in #304: 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\r\n\r\n#if TheDefimneThatSaysWereUsingMUSL\r\n# include \u003cwhereever/lives/stdio.h\u003e\r\n#endif \r\n\r\nThe 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 :-)"}],"action":{"name":"View Issue","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437469980"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437469980", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437469980", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl when building the VM for embedded system (#304)", "sections": [ { "text": "", "activityTitle": "**Eliot Miranda**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@eliotmiranda", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 304,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 304\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437469980" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 408484223\n}" } ], "themeColor": "26292E" } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl when building the VM for embedded system (#304)

David T Lewis
In reply to this post by David T Lewis
 

Hello,
It is indeed a dirty hack, the stdio.h is already in the include path, but i realized that in Musl, only the definition of FILE is available in stdio.h, the struct _IO_FILE, however, is not publicly defined (i.e. it is not available in the public headers). That cause an error about incomplete type definition when gcc tries to compile the line:

static FILE stdoutStack[STDOUT_STACK_SZ];

So i put the explicit definition to the sqVirtualMachine.c, it works for me, but, is indeed not a good solution. What we can do is to put that definition somewhere else, and only include it in sqVirtualMachine.c if we are using Musl as lib implementation.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@lxsang in #304: Hello,\r\nIt is indeed a dirty hack, the ```stdio.h``` is already in the include path, but i realized that in Musl, only the definition of FILE is available in stdio.h, the struct **_IO_FILE**, however, is not publicly defined (i.e. it is not available in the public headers). That cause an error about incomplete type definition when gcc tries to compile the line:\r\n```c\r\nstatic FILE stdoutStack[STDOUT_STACK_SZ];\r\n```\r\nSo i put the explicit definition to the ```sqVirtualMachine.c```, it works for me, but, is indeed not a good solution. What we can do is to put that definition somewhere else, and only include it in ```sqVirtualMachine.c``` if we are using Musl as lib implementation.\r\n"}],"action":{"name":"View Issue","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437506428"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437506428", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437506428", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl when building the VM for embedded system (#304)", "sections": [ { "text": "", "activityTitle": "**Xuan Sang LE**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@lxsang", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 304,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 304\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437506428" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 408484223\n}" } ], "themeColor": "26292E" } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl when building the VM for embedded system (#304)

David T Lewis
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?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@eliotmiranda in #304: 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?"}],"action":{"name":"View Issue","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437558515"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437558515", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437558515", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl when building the VM for embedded system (#304)", "sections": [ { "text": "", "activityTitle": "**Eliot Miranda**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@eliotmiranda", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 304,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 304\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437558515" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 408484223\n}" } ], "themeColor": "26292E" } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl when building the VM for embedded system (#304)

David T Lewis
In reply to this post by David T Lewis
 

I just do a check, there are two minor problems with Musl:

  1. Musl does not provide any predefined macro in order to test for its presence, like GLIBC
  2. The struct _IO_FILE is defined in src/internal/stdio_impl.h, but it is not a public API and is subject to change in the future.

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 -D__MUSL__ to the CFLAGS when executing the configure script.

For the second problem, the added explicit definition (as i did) is not guaranteed to work in the future version of Musl since the struct _IO_FILE may be changed. It would be nice if we can find a workaround that does not involve the (re)definition of that struct.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@lxsang in #304: I just do a check, there are two minor problems with Musl:\r\n\r\n1. Musl does not provide any predefined macro in order to test for its presence, like GLIBC\r\n2. The struct _IO_FILE is defined in ```src/internal/stdio_impl.h```, but it is not a public API and is subject to change in the future.\r\n\r\nFor the fist problem, we can just use some thing like this:\r\n```c\r\n#ifdef __MUSL__\r\n// do some stuffs\r\n#endif\r\n```\r\nThen, when one want to compile again Musl, just add the ```-D__MUSL__``` to the ```CFLAGS``` when executing the configure script.\r\n\r\nFor the second problem, the added explicit definition (as i did) is not guaranteed to work in the future version of Musl since the ```struct _IO_FILE``` may be changed. It would be nice if we can find a workaround that does not involve the (re)definition of that struct.\r\n\r\n"}],"action":{"name":"View Issue","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437575739"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437575739", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437575739", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl when building the VM for embedded system (#304)", "sections": [ { "text": "", "activityTitle": "**Xuan Sang LE**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@lxsang", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 304,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 304\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304#issuecomment-437575739" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 408484223\n}" } ], "themeColor": "26292E" } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl when building the VM for embedded system (#304)

David T Lewis
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.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304?email_source=notifications\u0026email_token=AIJPEW7HKC2IE3TTLYGCBNLQA6PNZA5CNFSM4GCY7F72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2UZ4XY#issuecomment-514432607", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304?email_source=notifications\u0026email_token=AIJPEW7HKC2IE3TTLYGCBNLQA6PNZA5CNFSM4GCY7F72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2UZ4XY#issuecomment-514432607", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl when building the VM for embedded system (#304)

David T Lewis
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 :-)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304?email_source=notifications\u0026email_token=AIJPEW3WJZMROALWP6KNY53QBAFTPA5CNFSM4GCY7F72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2VRSDA#issuecomment-514529548", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304?email_source=notifications\u0026email_token=AIJPEW3WJZMROALWP6KNY53QBAFTPA5CNFSM4GCY7F72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2VRSDA#issuecomment-514529548", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl when building the VM for embedded system (#304)

David T Lewis
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.



You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304?email_source=notifications\u0026email_token=AIJPEW2BMYJ64JVE2F5Z6TDQB2S4RA5CNFSM4GCY7F72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD277PIY#issuecomment-515897251", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304?email_source=notifications\u0026email_token=AIJPEW2BMYJ64JVE2F5Z6TDQB2S4RA5CNFSM4GCY7F72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD277PIY#issuecomment-515897251", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl when building the VM for embedded system (#304)

David T Lewis
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 pierce_alpine branch of my fork. It is for building pharo.cog.spur.minheadless on Alpine Linux x86_64. I've not tried building VMs for the other Smalltalks.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304?email_source=notifications\u0026email_token=AIJPEWZ5SR5OVSXQ4AQ4FPTQW3UXJA5CNFSM4GCY7F72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF3GGSI#issuecomment-561406793", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304?email_source=notifications\u0026email_token=AIJPEWZ5SR5OVSXQ4AQ4FPTQW3UXJA5CNFSM4GCY7F72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF3GGSI#issuecomment-561406793", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] Support for musl when building the VM for embedded system (#304)

David T Lewis
In reply to this post by David T Lewis
 

Closed #304.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304?email_source=notifications\u0026email_token=AIJPEWZOJIZLBZPWVEND3TDRCZUBNA5CNFSM4GCY7F72YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOWULIWPI#event-3038153533", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/304?email_source=notifications\u0026email_token=AIJPEWZOJIZLBZPWVEND3TDRCZUBNA5CNFSM4GCY7F72YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOWULIWPI#event-3038153533", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>