KallistiOS / kos-ports

Ported library collection for KallistiOS
Other
57 stars 35 forks source link

Error building micropython port on FreeBSD #40

Closed darcagn closed 10 months ago

darcagn commented 11 months ago

This error is given on FreeBSD

fatal error: alloca.h: No such file or directory
   36 | #include <alloca.h>
      |          ^~~~~~~~~~

This header isn't required though, as alloca is provided by stdlib.h. Editing dist/micropython-1.21.0/ports/embed/port/mpconfigport_common.h and changing alloca.h to stdlib.h will fix compilation.

sizious commented 11 months ago

I guess this could be submitted to the micropython project directly? Or we can maybe add a sed thing in the port itself..

gyrovorbis commented 11 months ago

Damn, what do you guys think? Gotta get this one taken care of... honestly this is kind of their bad, and surely they want to have their own codebase building for FreeBSD? Somebody wanna try PRing this upstream?

sizious commented 11 months ago

Yes I think it’s best to submit a PR to them. It needs to be fixed properly imo.

gyrovorbis commented 11 months ago

Alrighty, I mentioned this to @darcagn. He's going to look into submitting a PR upstream, once he verifies that he has a fix that doesn't break micropython for the other platforms... That would be an unwelcome surprise from the Dreamcast scene. lmao.

darcagn commented 11 months ago

Submitted a fix upstream based on similar PRs submitted to handle alloca() for other micropython ports in their tree.

https://github.com/micropython/micropython/pull/13360

darcagn commented 10 months ago

My PR was accepted upstream. micropython now builds fine under FreeBSD. Closing issue as solved.