• aarch64

    From alterego@VERT/ALTERANT to Digital Man on Monday, September 28, 2020 23:36:56
    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!