Uxn ecosystem on Haiku

Recently, I tried to test UXN2 recent versions ( https://git.sr.ht/\~rabbits/uxn2 ) on both 32 and 64 bit nightlies.

On the 64 bits, although running the UXN test/demo (perifs) failed, the emulator did ran fine enough to play the Oquonie game.

But on the 32 bit, I wasn’t able to make it, even with the relevant SDL and SDL2 devel packages installed and using both x86_gcc2 and x86 (requiring -DSDL_DISABLE_IMMINTRIN_H). The compiler errors suggests some missing dependency, which I could not figure out (as it compiles cleanly on 64 bit).

AFAIK, there’s no funcional difference between the Depot uxn1 package and the UXN2 above, no need to update the current package, just curious about the 32 bit build failure.

Would be nice if you listed the encountered error(s) on 32bit (maybe the Terminal output). :slight_smile:

Build output using x86_gcc2:

cc -I/boot/system/develop/headers/SDL2 -D_REENTRANT -DNDEBUG -O2 -g0 -s -L/usr/local/lib  src/uxn2.c -o bin/uxn2 -L/boot/system/lib -lSDL2
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c: In function  screen_deo_sprite':
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:357: parse error before `*'
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:359: `dst' undeclared (first use in this function)
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:359: (Each undeclared identifier is reported only once
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:359: for each function it appears in.)
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:359: `col' undeclared (first use in this function)
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:362: parse error before `int'
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:362: `k' undeclared (first use in this function)
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:362: `row' undeclared (first use in this function)
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:362: parse error before `)'
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:365: `color' undeclared (first use in this function)
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c: At top level:
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:370: parse error before `if'
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:372: `y1' redeclared as different kind of symbol
/boot/system/develop/headers/posix/math.h:321: previous declaration of `y1'
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:372: `flipy' undeclared here (not in a function)
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:372: `y' undeclared here (not in a function)
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:372: `flipy' undeclared here (not in a function)
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:372: `y' undeclared here (not in a function)
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:373: parse error before `-'
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:373: conflicting types for `screen_change'
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:195: previous declaration of `screen_change'
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:373: warning: data definition has no type or storage class
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c: In function `emu_init':
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:1356: parse error before `window_flags'
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:1358: `window_flags' undeclared (first use in this function)
make: *** [makefile:47: bin/uxn2] Error 1

Build output using x86:

~/uxn2-98892d13f5123d9975b5a330494c8285983ca59e> setarch x86

Switching to architecture x86

[x86] ~/uxn2-98892d13f5123d9975b5a330494c8285983ca59e> cc -I/boot/system/develop/headers/SDL2 -D_REENTRANT -DNDEBUG -O2 -g0 -s -L/usr/local/lib  src/uxn2.c -o bin/uxn2 -L/boot/system/lib -lSDL2 -DSDL_DISABLE_IMMINTRIN_H
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c: In function screen_deo_sprite': /boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:357: parse error before *’
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:359: dst' undeclared (first use in this function) /boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:359: (Each undeclared identifier is reported only once /boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:359: for each function it appears in.) /boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:359: col’ undeclared (first use in this function)
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:362: parse error before int' /boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:362: k’ undeclared (first use in this function)
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:362: row' undeclared (first use in this function) /boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:362: parse error before )’
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:365: color' undeclared (first use in this function) /boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c: At top level: /boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:370: parse error before if’
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:372: y1' redeclared as different kind of symbol /boot/system/develop/headers/posix/math.h:321: previous declaration of y1’
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:372: flipy' undeclared here (not in a function) /boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:372: y’ undeclared here (not in a function)
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:372: flipy' undeclared here (not in a function) /boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:372: y’ undeclared here (not in a function)
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:373: parse error before -' /boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:373: conflicting types for screen_change’
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:195: previous declaration of screen_change' /boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:373: warning: data definition has no type or storage class /boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c: In function emu_init’:
/boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:1356: parse error before window_flags' /boot/home/uxn2-98892d13f5123d9975b5a330494c8285983ca59e/src/uxn2.c:1358: window_flags’ undeclared (first use in this function)

Did manage to built the SDL-based “Uxn1” in the past. The current “Uxn 1.0” is a X11-based version (UXN11), the SDL version is named UXN2.

I would not check on gcc2 (my 2 cents for this), on the note above, did you try with -L/boot/system/lib/x86 ? This shouldn’t be needed when switched with setarch, but doesn’t hurt to try.

Also weird about the parse errors, I’ve seen them mostly in combination with gcc2, not gcc13 :confused:

You were right, my system had only gcc 2.95… Installed gcc 13, ran make but now ld cannot find crti.o, start_dyn.o and init_term_dyn.o (they are at /boot/system/develop/lib), even after passing -L/boot/system/develop/lib .

PS: Tried to install the uxn_sources package(s) from HaikuDepot for reference, but they’re not available, both the 32 and 64 bit versions.

You probably miss gcc_syslibs_devel for these?

1 Like

haiku_x86_devel was the missing package.. I think I got messed up with the x86/non-x86 packages…
Thank you for your help!

2 Likes

Yeah, that’s pretty default :slight_smile: one advantage from working with recipes/haikuporter, those dependencies are installed by default (if not already in place). :slight_smile: