• aarch64?

    From deon@ALTERANT to Digital Man on Wed Oct 9 17:40:01 2024
    Hey DM,

    Curios to know your plans, if any, to update libmoz and/or enabling SBBS to be built on aarch64?

    (While I'm not needing an update to libmoz, I'm thinking the current issue of building sbbs on aarch64 is failing because of the old libmoz, or some other old dependency?)

    I just tried and get:

    136.0 configure: error: "libffi has not been ported to aarch64-unknown-linux-gnu."
    136.0 configure: error: ./configure failed for ctypes/libffi

    (This is using bullseye-slim as a base image.)

    When I pulled in an existing libmoz from debian archives, it fails with:

    make RELEASE=1 NO_X=1 SBBSDIR=/opt/sbbs JSINCLUDE=/usr/include/js JSLIB=mozjs185 install
    ...
    340.9 In file included from ansiterm.cpp:22:
    340.9 sbbs.h:101:10: fatal error: jsversion.h: No such file or directory
    340.9 101 | #include <jsversion.h>
    340.9 | ^~~~~~~~~~~~~
    340.9 compilation terminated.
    340.9 make[1]: *** [/opt/sbbs/repo/src/sbbs3/../build/Common.gmake:550: gcc.linux.aarch64.obj.release-mt/ansiterm.o] Error 1
    340.9 make[1]: Leaving directory '/opt/sbbs/repo/src/sbbs3'



    ...δεσ∩

    ---
    ■ Synchronet ■ AnsiTEX bringing back videotex but with ANSI
  • From deon@ALTERANT to Digital Man on Wed Oct 9 17:54:51 2024
    Re: aarch64?
    By: deon to Digital Man on Wed Oct 09 2024 05:40 pm

    Howdy,

    340.9 In file included from ansiterm.cpp:22:
    340.9 sbbs.h:101:10: fatal error: jsversion.h: No such file or directory 340.9 101 | #include <jsversion.h>

    Sorry, this one is easy - its because I didnt have the dev package installed. So trying a build now as I type.

    Still curious though when aarch64 will be supported...


    ...δεσ∩

    ---
    ■ Synchronet ■ AnsiTEX bringing back videotex but with ANSI
  • From Digital Man to deon on Wed Oct 9 12:07:13 2024
    Re: aarch64?
    By: deon to Digital Man on Wed Oct 09 2024 05:40 pm

    Curios to know your plans, if any, to update libmoz and/or enabling SBBS to be built on aarch64?

    It's a huge change to SBBS to upgrade libmozjs, but it will happen. Sysops have built and run sbbs (and libmozjs) on aarch64 (e.g. for a 64-bit Linux on an rPi4) successfully, so it is possible to do it.
    --
    digital man (rob)

    Sling Blade quote #10:
    Morris: I stand on the hill, not for thrill, but for the breath of a fresh kill Norco, CA WX: 81.6°F, 47.0% humidity, 4 mph WSW wind, 0.00 inches rain/24hrs
  • From deon@ALTERANT to Digital Man on Thu Oct 10 08:20:19 2024
    Re: aarch64?
    By: Digital Man to deon on Wed Oct 09 2024 12:07 pm

    Howdy,

    It's a huge change to SBBS to upgrade libmozjs, but it will happen. Sysops have built and run sbbs (and libmozjs) on aarch64 (e.g. for a 64-bit Linux on an rPi4) successfully, so it is possible to do it.

    OK, keen to know who successfully runs an aarch64 build, and the instructions they used.

    My build completed no problem, but soon as I start it, it core dumps.

    (gdb) thread apply all bt

    Thread 12 (Thread 0xffffd37fe1c0 (LWP 537) "sbbs/jsStatic"):
    #0 futex_wait_cancelable (private=0, expected=0, futex_word=0xffffd800faa0) at ../sysdeps/nptl/futex-internal.h:186
    #1 __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0xffffd800f910, cond=0xffffd800fa78) at pthread_cond_wait.c:508
    #2 __pthread_cond_wait (cond=0xffffd800fa78, mutex=0xffffd800f910) at pthread_cond_wait.c:638
    #3 0x0000fffff64c6984 in PR_WaitCondVar () from /usr/lib/aarch64-linux-gnu/libnspr4.so
    #4 0x0000fffff695c648 in ?? () from /usr/lib/libmozjs185.so.1.0
    #5 0x0000ffffd3ffc418 in ?? ()
    #6 0xf64cca1000000000 in ?? ()
    Backtrace stopped: previous frame identical to this frame (corrupt stack?)

    Thread 11 (Thread 0xfffff03a31c0 (LWP 536) "sbbs/jsRTtrig"):
    #0 0x0000fffff6b68220 in __GI___clock_nanosleep (clock_id=<optimized out>, clock_id@entry=0, flags=flags@entry=0, req=0xfffff03a2980, rem=0xfffff03a2980) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48
    #1 0x0000fffff6b6db9c in __GI___nanosleep (requested_time=<optimized out>, remaining=<optimized out>) at nanosleep.c:27
    #2 0x0000fffff6f0a750 in trigger_thread (args=0x0) at js_rtpool.c:24
    #3 0x0000fffff6c45648 in start_thread (arg=0xfffff03a2ac0) at pthread_create.c:477
    #4 0x0000fffff6b9bc9c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78

    Thread 10 (Thread 0xffffd3fff1c0 (LWP 535) "sbbs/jsStatic"):
    #0 0x0000fffff6987810 in js_GetClassPrototype(JSContext*, JSObject*, JSProtoKey, JSObject**, js::Class*) () from /usr/lib/libmozjs185.so.1.0
    #1 0x0000fffff69543f4 in ?? () from /usr/lib/libmozjs185.so.1.0
    #2 0x0000ffffd3ffc550 in ?? ()
    Backtrace stopped: Cannot access memory at address 0xffffffff00000018

    Does this describe anything useful that is fixable?


    ...δεσ∩

    ---
    ■ Synchronet ■ AnsiTEX bringing back videotex but with ANSI
  • From Digital Man to deon on Wed Oct 9 14:44:49 2024
    Re: aarch64?
    By: deon to Digital Man on Thu Oct 10 2024 08:20 am

    Does this describe anything useful that is fixable?

    Not to me, but others maybe.

    There are some arm64 specific instructions added by others to https://wiki.synchro.net/howto:raspbian_install
    --
    digital man (rob)

    Sling Blade quote #11:
    Doyle Hargraves (to Karl): What in the hell you doin' with that hammer?
    Norco, CA WX: 87.2°F, 40.0% humidity, 6 mph W wind, 0.00 inches rain/24hrs
  • From deon@ALTERANT to Digital Man on Thu Oct 10 11:09:30 2024
    Re: aarch64?
    By: Digital Man to deon on Wed Oct 09 2024 02:44 pm


    Does this describe anything useful that is fixable?

    Not to me, but others maybe.

    There are some arm64 specific instructions added by others to https://wiki.synchro.net/howto:raspbian_install

    Yup, I used those instructions, and it doesnt work for me.

    Well, it compiles, but core dumps when you run sbbs root@582e62f72f8f:/opt/sbbs# sbbs
    ...
    10/10 11:07:59 mail SMTPS Submission Agent listening on socket :: port 465 10/10 11:07:59 mail POP3 Server listening on socket 0.0.0.0 port 110
    10/10 11:07:59 mail POP3 Server listening on socket :: port 110
    10/10 11:07:59 mail POP3S Server listening on socket 0.0.0.0 port 995
    [Threads: 8 Sockets: 37 Clients: 0 Served: 0 Errors: 0] (?=Help): Segmentation fault (core dumped)

    (This is a stock default environment, no configuration other than what was extract from the git repository.)

    ...δεσ∩

    ---
    ■ Synchronet ■ AnsiTEX bringing back videotex but with ANSI
  • From Digital Man to deon on Wed Oct 9 18:12:00 2024
    Re: aarch64?
    By: deon to Digital Man on Thu Oct 10 2024 11:09 am

    Well, it compiles, but core dumps when you run sbbs

    Are you using a distro-supplied build of libmozjs or building from source?
    --
    digital man (rob)

    Sling Blade quote #4:
    Doyle: wimpy-ass kids or mental retards.. she got one of each livin' with her. Norco, CA WX: 78.1°F, 49.0% humidity, 4 mph WSW wind, 0.00 inches rain/24hrs
  • From deon@ALTERANT to Digital Man on Thu Oct 10 13:02:04 2024
    Re: aarch64?
    By: Digital Man to deon on Wed Oct 09 2024 06:12 pm

    Hi,

    Well, it compiles, but core dumps when you run sbbs

    Are you using a distro-supplied build of libmozjs or building from source?

    Distro, as per the instructions on the wiki page: (from debian archives)

    root@52159e86af1a:/opt/sbbs# apt list --installed|grep ffi libffi6/oldoldstable,now 3.2.1-6 arm64 [installed,automatic] libffi7/oldstable,now 3.3-6 arm64 [installed,automatic]

    root@52159e86af1a:/opt/sbbs# apt list --installed|grep libmoz libmozjs185-1.0/oldoldstable,now 1.8.5-1.0.0+dfsg-6 arm64 [installed] libmozjs185-dev/oldoldstable,now 1.8.5-1.0.0+dfsg-6 arm64 [installed]

    While the wiki page lists "stretch" as the debian image, I'm using bookworm as the base.


    ...δεσ∩

    ---
    ■ Synchronet ■ AnsiTEX bringing back videotex but with ANSI
  • From Digital Man to deon on Thu Oct 10 11:51:02 2024
    Re: aarch64?
    By: deon to Digital Man on Thu Oct 10 2024 01:02 pm

    Re: aarch64?
    By: Digital Man to deon on Wed Oct 09 2024 06:12 pm

    Hi,

    Well, it compiles, but core dumps when you run sbbs

    Are you using a distro-supplied build of libmozjs or building from source?

    Distro, as per the instructions on the wiki page: (from debian archives)

    When I wrote those instructions, they were for a 32-bit ARM build, not 64-bit. You might have better luck building libmozjs from source (including in the sbbs git repo) and using that instead.
    --
    digital man (rob)

    Steven Wright quote #7:
    A clear conscience is usually the sign of a bad memory.
    Norco, CA WX: 75.9°F, 58.0% humidity, 3 mph W wind, 0.00 inches rain/24hrs
  • From deon@ALTERANT to Digital Man on Fri Oct 11 08:24:04 2024
    Re: aarch64?
    By: Digital Man to deon on Thu Oct 10 2024 11:51 am

    Howdy,

    When I wrote those instructions, they were for a 32-bit ARM build, not 64-bit. You might have better luck building libmozjs from source (including in the sbbs git repo) and using that instead.

    Filed in the "too hard" basket.

    The person I was helping has decided to play with Mystic instead.


    ...δεσ∩

    ---
    ■ Synchronet ■ AnsiTEX bringing back videotex but with ANSI
  • From Digital Man to deon on Thu Oct 10 15:22:26 2024
    Re: aarch64?
    By: deon to Digital Man on Fri Oct 11 2024 08:24 am

    Re: aarch64?
    By: Digital Man to deon on Thu Oct 10 2024 11:51 am

    Howdy,

    When I wrote those instructions, they were for a 32-bit ARM build, not 64-bit. You might have better luck building libmozjs from source (including in the sbbs git repo) and using that instead.

    Filed in the "too hard" basket.

    It's actually the default build option: by *not* including the JSLIB option on the make command-line, that's what happens. :-)

    The person I was helping has decided to play with Mystic instead.

    Okay, cool. Best of luck to them then.
    --
    digital man (rob)

    Rush quote #1:
    Danger plus survival equals fun. - Neil Peart
    Norco, CA WX: 86.2°F, 36.0% humidity, 8 mph WNW wind, 0.00 inches rain/24hrs
  • From Ree@FTELNET to Digital Man on Thu Oct 10 20:52:34 2024
    When I wrote those instructions, they were for a 32-bit ARM build, not 64-bit. You might have better luck building libmozjs from source (including in the sbbs git repo) and using that instead.

    Didn't work for me when I tried building libmozjs from source (same error as reported in original post: configure: error: "libffi has not been ported to aarch64-unknown-linux-gnu.")

    But the 32-bit ARM instructions worked fine for 64-bit here. Just in case the friend decides to try sbbs again, here's the full log of commands I executed:

    ---
    apt install build-essential perl zip git gdb libarchive-dev libncursesw5-dev libnspr4-dev libmosquitto-dev libsystemd-dev libcap-dev xorg-dev libsdl2-dev libgtk-3-dev libglade2-dev python3 python-is-python3 lrzsz gkermit

    wget http://archive.debian.org/debian/pool/main/libf/libffi/libffi6_3.2.1-6_arm 64.deb
    apt install ./libffi6_3.2.1-6_arm64.deb
    wget http://archive.debian.org/debian/pool/main/m/mozjs/libmozjs185-1.0_1.8.5-1 .0.0+dfsg-6_arm64.deb
    apt install ./libmozjs185-1.0_1.8.5-1.0.0+dfsg-6_arm64.deb
    wget http://archive.debian.org/debian/pool/main/m/mozjs/libmozjs185-dev_1.8.5-1 .0.0+dfsg-6_arm64.deb
    apt install ./libmozjs185-dev_1.8.5-1.0.0+dfsg-6_arm64.deb

    mkdir /sbbs
    cd /sbbs
    wget https://gitlab.synchro.net/main/sbbs/-/raw/master/install/GNUmakefile
    make install SYMLINK=1 NOCAP=1 JSINCLUDE=/usr/include/js JSLIB=mozjs185
    ---

    uname -a reports: Linux rpi-bookworm-arm64 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

    And logging in via telnet reports: NODE: 1 (of 4) - Debian GNU/Linux 12 (bookworm) aarch64
    ---
    ■ Synchronet ■ fTelnet Demo Server - ftelnet.synchro.net
  • From deon@ALTERANT to Digital Man on Fri Oct 11 12:23:30 2024
    Re: aarch64?
    By: Digital Man to deon on Thu Oct 10 2024 03:22 pm

    Howdy,

    It's actually the default build option: by *not* including the JSLIB option on the make command-line, that's what happens. :-)

    Yes, that's my default build option too - but it too didnt work.

    libffi complains about not knowing about aarch64 (from memory)...


    ...δεσ∩

    ---
    ■ Synchronet ■ AnsiTEX bringing back videotex but with ANSI
  • From deon@ALTERANT to Ree on Fri Oct 11 14:02:43 2024
    Re: aarch64?
    By: Ree to Digital Man on Thu Oct 10 2024 08:52 pm

    Howdy,

    But the 32-bit ARM instructions worked fine for 64-bit here. Just in case the friend decides to try sbbs again, here's the full log of commands I executed:

    Thanks, that's pretty much what I had as well - but it core dumps after starting (clean environment, new install, no configuration).

    10/11 13:31:09 srvc WSS listening on socket :: port 11235
    10/11 13:31:09 srvc 0000 Services thread started (18 service sockets bound) [Threads: 9 Sockets: 38 Clients: 0 Served: 0 Errors: 0] (?=Help): Segmentation fault (core dumped)
    root@badd3ace98bf:/opt/sbbs# uname -a
    Linux badd3ace98bf 5.14.0-362.24.1.el9_3.aarch64 #1 SMP PREEMPT_DYNAMIC Wed Mar 13 14:53:45 EDT 2024 aarch64 GNU/Linux

    Same old dependancy files:

    root@badd3ace98bf:/opt/sbbs# dpkg -l
    ii libmozjs185-1.0 1.8.5-1.0.0+dfsg-6 arm64 SpiderMonkey JavaScript engine
    ii libmozjs185-dev 1.8.5-1.0.0+dfsg-6 arm64 SpiderMonkey JavaScript library - development headers
    ii libffi6:arm64 3.2.1-6 arm64 Foreign Function Interface library runtime

    gdb backtrace was provided previously...

    sbbs would only stay running if I start it with "sbbs s- ne", but as soon as I telneted to it, it segfaulted.


    ...δεσ∩

    ---
    ■ Synchronet ■ AnsiTEX bringing back videotex but with ANSI
  • From MRO@BBSESINF to deon on Fri Oct 11 00:04:53 2024
    Re: aarch64?
    By: deon to Digital Man on Fri Oct 11 2024 08:24 am

    Re: aarch64?
    By: Digital Man to deon on Thu Oct 10 2024 11:51 am

    Howdy,

    When I wrote those instructions, they were for a 32-bit ARM build, not 64-bit. You might have better luck building libmozjs from source (including in the sbbs git repo) and using that instead.

    Filed in the "too hard" basket.

    The person I was helping has decided to play with Mystic instead.



    NOOOOOOO!
    we lost another one to mystic!
    the pain!! the pain!!
    ---
    ■ Synchronet ■ ::: BBSES.info - free BBS services :::