• aarch64

    From alterego@VERT/ALTERANT to Digital Man on Mon Sep 28 23:36:56 2020
    Hey DM,

    I was playing with Rasberry Pi 64 today and thought I'd see if I could get SBBS to compile. (I couldnt).

    I managed to get past the "configure: error: can not guess host type; you must specify one", but I couldnt figure out how to add the patch to your build process (as it seems each time I ran a make, you must be re-extracting the libmoz source?)

    So I tried to run make in libmoz, but it would fail - so wasnt sure if there was more needed on the make line (as you seems you are patching the source as well)? It fails with:

    In file included from jsapi.cpp:94:
    jsobjinlines.h: In member function 'void JSObject::setArrayLength(uint32)': jsobjinlines.h:316:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    setPrivate((void*) length);
    ^~~~~~
    jsapi.cpp: In function 'JSIdArray* JS_Enumerate(JSContext*, JSObject*)': jsapi.cpp:3988:16: error: cannot convert 'bool' to 'JSIdArray*' in return
    return false;
    ^~~~~
    jsapi.cpp: In function 'JSObject* JS_New(JSContext*, JSObject*, uintN, jsval*)':
    jsapi.cpp:5182:51: warning: 'void* memcpy(void*, const void*, size_t)' copying an object of type 'class js::Value' with 'private' member 'js::Value::data' from an array of 'jsval' {aka 'long unsigned int'}; use assignment or copy-initialization instead [-Wclass-memaccess]
    memcpy(args.argv(), argv, argc * sizeof(jsval));
    ^
    In file included from jsobj.h:64,
    from jsstr.h:56,
    from jsatom.h:52,
    from jsarray.h:47,
    from jsapi.cpp:57:
    jsvalue.h:331:7: note: 'class js::Value' declared here
    class Value
    ^~~~~
    make[1]: *** [config/rules.mk:1477: jsapi.o] Error 1
    make[1]: Leaving directory '/opt/sbbs/repo/3rdp/src/mozjs/js-1.8.5/js/src' make: *** [config/rules.mk:754: default] Error 2

    This is how I patched configure:

    root@64e9751b3545:/tmp# diff config.guess /opt/sbbs/repo/3rdp/src/mozjs/js-1.8.5/js/src/build/autoconf/
    162d161
    < aarch64*) machine=arm-unknown ;;
    171c170
    < aarch64|arm*|i386|m68k|ns32k|sh3*|sparc|vax)
    ---
    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
    857,866d855
    < exit ;;
    < aarch64*:Linux:*:*)
    < eval $set_cc_for_build
    < if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
    < | grep -q __ARM_EABI__
    < then
    < echo ${UNAME_MACHINE}-unknown-linux-gnu
    < else
    < echo ${UNAME_MACHINE}-unknown-linux-gnueabi
    < fi

    (I really dont know what I'm doing, so wondering if there was an obvious fix that you could suggest.)

    ...δεσ∩

    ... TACT: The ability to make guests feel at home when you wish that they were ---
    ■ Synchronet ■ Alterant | an SBBS in Docker on Pi!
  • From Mortifis@VERT/EPHRAM to alterego on Mon Sep 28 13:13:11 2020
    Hey DM,

    I was playing with Rasberry Pi 64 today and thought I'd see if I could get SBBS to compile. (I couldnt).


    (I really dont know what I'm doing, so wondering if there was an obvious fix that you could suggest.)

    ...δεσ∩


    There are a couple of steps/considerations (not apparently linked in the wiki) for installing on an RPi. http://wiki.synchro.net/howto:raspbian_install

    make sure you have all of the prerequisites, you'd likely also to: sudo apt-get install libmozjs185-dev and on the make commandline add: JSINCLUDE=/usr/include/js JSLIB=mozjs185 to your make command line.

    I don't use symlinks so I: export SBBSCTRL=/sbbs/crtl; export SBBSEXEC /sbbs/exec; cd /sbbs/repo; git -C /sbbs/repo pull; cd src/sbbs3; make install RELEASE=1 USE_DOSEMU=1 JSINCLUDE=/usr/include/js JSLIB=mozjs185 setcap;

    After the build has completed the executables should be in /sbbs/exec. You may also need to manually copy all of the js and ssjs from /sbbs/exec and sbbs/exec/load ...

    hope this helps a bit

    ~Mortifis

    ---
    ■ Synchronet ■ posted via alleycat etrucker-runemaster web ui
  • From Digital Man@VERT to alterego on Mon Sep 28 11:34:45 2020
    Re: aarch64
    By: alterego to Digital Man on Mon Sep 28 2020 11:36 pm

    Hey DM,

    I was playing with Rasberry Pi 64 today and thought I'd see if I could get SBBS to compile. (I couldnt).

    Yeah, the aarch64 build is known to fail.

    I managed to get past the "configure: error: can not guess host type; you must specify one", but I couldnt figure out how to add the patch to your build process (as it seems each time I ran a make, you must be re-extracting the libmoz source?)

    It does re-extract the archive and then applies patches from the build dir.

    So I tried to run make in libmoz, but it would fail - so wasnt sure if there was more needed on the make line (as you seems you are patching the source as well)? It fails with:

    You pasted warnings, which are not the cause of the failure.

    This is how I patched configure:

    root@64e9751b3545:/tmp# diff config.guess /opt/sbbs/repo/3rdp/src/mozjs/js-1.8.5/js/src/build/autoconf/
    162d161
    < aarch64*) machine=arm-unknown ;;
    171c170
    < aarch64|arm*|i386|m68k|ns32k|sh3*|sparc|vax)

    The actual error would be further back in the output and have the word "error" in it.

    digital man

    Sling Blade quote #25:
    Karl: they seen fit to put me in here and here I've been a great long while. Norco, CA WX: 91.8°F, 40.0% humidity, 0 mph WSW wind, 0.00 inches rain/24hrs ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Mortifis on Mon Sep 28 11:46:15 2020
    Re: Re: aarch64
    By: Mortifis to alterego on Mon Sep 28 2020 01:13 pm

    Hey DM,

    I was playing with Rasberry Pi 64 today and thought I'd see if I could get SBBS to compile. (I couldnt).

    There are a couple of steps/considerations (not apparently linked in the wiki) for installing on an RPi. http://wiki.synchro.net/howto:raspbian_install

    Those instructions are for the 32-bit build on Raspbian. A different animal.

    digital man

    This Is Spinal Tap quote #20:
    Well, I'm sure I'd feel much worse if I weren't under such heavy sedation. Norco, CA WX: 94.0°F, 38.0% humidity, 0 mph SSE wind, 0.00 inches rain/24hrs ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Mortifis@VERT/EPHRAM to Digital Man on Mon Sep 28 16:31:33 2020
    Re: Re: aarch64
    By: Mortifis to alterego on Mon Sep 28 2020 01:13 pm

    Hey DM,

    I was playing with Rasberry Pi 64 today and thought I'd see if I could get SBBS to compile. (I couldnt).

    There are a couple of steps/considerations (not apparently linked in the wiki) for installing on an RPi. http://wiki.synchro.net/howto:raspbian_install

    Those instructions are for the 32-bit build on Raspbian. A different animal.

    digital man

    Ah, sorry, didn't know that, I don't use those instructions myself, but I do need the extra prerequisites libmozjs185-dev and libncursesw5-dev.

    ~Mortifis

    ---
    ■ Synchronet ■ posted via alleycat etrucker-runemaster web ui
  • From alterego@VERT/ALTERANT to Mortifis on Tue Sep 29 09:00:05 2020
    Re: Re: aarch64
    By: Mortifis to alterego on Mon Sep 28 2020 01:13 pm

    Hey Mortifis,

    I was playing with Rasberry Pi 64 today and thought I'd see if I could
    get SBBS to compile. (I couldnt).
    There are a couple of steps/considerations (not apparently linked in the wiki) for installing on an RPi. http://wiki.synchro.net/howto:raspbian_install

    Thanks for helping out.

    Actually I'm already running on a Pi (32 bit).

    My questions were about running on 64 bit. (aka aarch64 or arm64).

    When compiling there isnt libmoz 1.8.5 provided by the Debian repos, so it needs to be compiled, and 1.8.5 doesnt know how to handle arm64. It might be that it cant handle arm64, but I'd thought I'd ask anyway...

    FWIW, 32bit arm compiles of SBBS seem to be running fine on the 64bit environment - I'll be doing more playing over the next few days. It'll mean that I'd have to figure out how to compile in 32bit mode or keep the old Pi around to keep my SBBS updated.

    Since I run in Docker, compiling on 1 machine (and a gitlab runner does that for me) and running on another is super easy.

    ...δεσ∩

    ... Chuck Norris can sleep while he's awake.

    ---
    ■ Synchronet ■ Alterant | an SBBS in Docker on Pi!
  • From alterego@VERT/ALTERANT to Digital Man on Tue Sep 29 09:04:17 2020
    Re: aarch64
    By: Digital Man to alterego on Mon Sep 28 2020 11:34 am

    Hey,

    You pasted warnings, which are not the cause of the failure.

    Actually, I thought I got the error - was this not it?

    jsapi.cpp:3988:16: error: cannot convert 'bool' to 'JSIdArray*' in return
    return false;
    ^~~~~

    From what I can see everything else is a warning...

    ...δεσ∩

    ... Jargon is used as a means of succeeding by, not simplifying.

    ---
    ■ Synchronet ■ Alterant | an SBBS in Docker on Pi!
  • From Digital Man@VERT to alterego on Mon Sep 28 16:36:47 2020
    Re: aarch64
    By: alterego to Digital Man on Tue Sep 29 2020 09:04 am

    Re: aarch64
    By: Digital Man to alterego on Mon Sep 28 2020 11:34 am

    Hey,

    You pasted warnings, which are not the cause of the failure.

    Actually, I thought I got the error - was this not it?

    jsapi.cpp:3988:16: error: cannot convert 'bool' to 'JSIdArray*' in return
    return false;
    ^~~~~

    From what I can see everything else is a warning...

    Indeed, my mistake. I missed it.

    digital man

    This Is Spinal Tap quote #45:
    I don't really think the end can be assessed as of itself as being the end Norco, CA WX: 93.5°F, 34.0% humidity, 7 mph N wind, 0.00 inches rain/24hrs
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net