• Error in editline.c

    From Nick Boel@1:103/705 to GitLab issue in main/sbbs on Mon Sep 8 16:29:38 2025
    open https://gitlab.synchro.net/main/sbbs/-/issues/971

    editline.c
    editline.c: In function ‘TTYput’:
    editline.c:181:1: warning: old-style function definition [-Wold-style-definition]
    181 | TTYput(c)
    | ^~~~~~
    editline.c: In function ‘TTYputs’:
    editline.c:192:1: warning: old-style function definition [-Wold-style-definition]
    192 | TTYputs(p)
    | ^~~~~~~
    editline.c: In function ‘TTYshow’:
    editline.c:200:1: warning: old-style function definition [-Wold-style-definition]
    200 | TTYshow(c)
    | ^~~~~~~
    editline.c: In function ‘TTYstring’:
    editline.c:221:1: warning: old-style function definition [-Wold-style-definition]
    221 | TTYstring(p)
    | ^~~~~~~~~
    editline.c: In function ‘TTYbackn’:
    editline.c:246:1: warning: old-style function definition [-Wold-style-definition]
    246 | TTYbackn(n)
    | ^~~~~~~~
    editline.c: In function ‘left’:
    editline.c:322:1: warning: old-style function definition [-Wold-style-definition]
    322 | left(Change)
    | ^~~~
    editline.c: In function ‘right’:
    editline.c:339:1: warning: old-style function definition [-Wold-style-definition]
    339 | right(Change)
    | ^~~~~
    editline.c: In function ‘do_macro’:
    editline.c:356:1: warning: old-style function definition [-Wold-style-definition]
    356 | do_macro(c)
    | ^~~~~~~~
    editline.c: In function ‘do_forward’:
    editline.c:374:1: warning: old-style function definition [-Wold-style-definition]
    374 | do_forward(move)
    | ^~~~~~~~~~
    editline.c: In function ‘do_case’:
    editline.c:399:1: warning: old-style function definition [-Wold-style-definition]
    399 | do_case(type)
    | ^~~~~~~
    editline.c: In function ‘insert_string’:
    editline.c:475:1: warning: old-style function definition [-Wold-style-definition]
    475 | insert_string(p)
    | ^~~~~~~~~~~~~
    editline.c: In function ‘do_insert_hist’:
    editline.c:536:1: warning: old-style function definition [-Wold-style-definition]
    536 | do_insert_hist(p)
    | ^~~~~~~~~~~~~~
    editline.c: In function ‘do_hist’:
    editline.c:549:1: warning: old-style function definition [-Wold-style-definition]
    549 | do_hist(move)
    | ^~~~~~~
    editline.c: In function ‘substrcmp’:
    editline.c:591:1: warning: old-style function definition [-Wold-style-definition]
    591 | substrcmp(text, pat, len)
    | ^~~~~~~~~
    editline.c: In function ‘search_hist’:
    editline.c:607:1: warning: old-style function definition [-Wold-style-definition]
    607 | search_hist(search, move)
    | ^~~~~~~~~~~
    editline.c:631:15: error: assignment to ‘int (*)(void)’ from incompatible pointer type ‘int (*)(const char *, const char *, size_t)’ {aka ‘int (*)(const char *, const char *, long unsigned int)’} [-Wincompatible-pointer-types]
    631 | match = strncmp;
    | ^
    In file included from editline.h:66,
    from editline.c:64:
    /usr/include/string.h:159:12: note: ‘strncmp’ declared here
    159 | extern int strncmp (const char *__s1, const char *__s2, size_t __n)
    | ^~~~~~~
    editline.c:641:14: error: too many arguments to function ‘match’; expected 0, have 3
    641 | if ((*match)((char *)H.Lines[H.Pos], pat, len) == 0)
    | ~^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
    editline.c: In function ‘save_yank’:
    editline.c:697:1: warning: old-style function definition [-Wold-style-definition]
    697 | save_yank(begin, i)
    | ^~~~~~~~~
    editline.c: In function ‘delete_string’:
    editline.c:716:1: warning: old-style function definition [-Wold-style-definition]
    716 | delete_string(count)
    | ^~~~~~~~~~~~~
    editline.c: In function ‘insert_char’:
    editline.c:815:1: warning: old-style function definition [-Wold-style-definition]
    815 | insert_char(c)
    | ^~~~~~~~~~~
    editline.c: In function ‘emacs’:
    editline.c:880:1: warning: old-style function definition [-Wold-style-definition]
    880 | emacs(c)
    | ^~~~~
    editline.c: In function ‘TTYspecial’:
    editline.c:902:1: warning: old-style function definition [-Wold-style-definition]
    902 | TTYspecial(c)
    | ^~~~~~~~~~
    editline.c: In function ‘hist_add’:
    editline.c:979:1: warning: old-style function definition [-Wold-style-definition]
    979 | hist_add(p)
    | ^~~~~~~~
    editline.c: In function ‘rl_reset_terminal’:
    editline.c:1002:1: warning: old-style function definition [-Wold-style-definition]
    1002 | rl_reset_terminal(p)
    | ^~~~~~~~~~~~~~~~~
    editline.c: In function ‘readline’:
    editline.c:1013:1: warning: old-style function definition [-Wold-style-definition]
    1013 | readline(prompt)
    | ^~~~~~~~
    editline.c:1026:5: error: too many arguments to function ‘rl_ttyset’; expected 0, have 1
    1026 | rl_ttyset(0);
    | ^~~~~~~~~ ~
    editline.h:118:17: note: declared here
    118 | extern void rl_ttyset();
    | ^~~~~~~~~
    editline.c:1037:5: error: too many arguments to function ‘rl_ttyset’; expected 0, have 1
    1037 | rl_ttyset(1);
    | ^~~~~~~~~ ~
    editline.h:118:17: note: declared here
    118 | extern void rl_ttyset();
    | ^~~~~~~~~
    editline.c: In function ‘add_history’:
    editline.c:1049:1: warning: old-style function definition [-Wold-style-definition]
    1049 | add_history(p)
    | ^~~~~~~~~~~
    editline.c: In function ‘argify’:
    editline.c:1253:1: warning: old-style function definition [-Wold-style-definition]
    1253 | argify(line, avp)
    | ^~~~~~

    In the directory /sbbs/repo/3rdp/src/mozjs/js-1.8.5/js/src/editline
    The following command failed to execute properly:
    cc -o editline.o -c -fvisibility=hidden -DANSI_ARROWS -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT -DSYS_UNIX -DHAVE_STDLIB -DUNIQUE_HISTORY -DOSTYPE="Linux6.16" -DOSARCH=Linux -I. -I. -I../dist/include -I../dist/include/nsprpub -I/usr/include/nspr -fPIC -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -W -pedantic -Wno-long-long -fno-strict-aliasing -pthread -pipe -DNDEBUG -DTRIMMED -g -include ../js-confdefs.h -DMOZILLA_CLIENT -MD -MF .deps/editline.pp editline.c
    make[4]: *** [../config/rules.mk:1440: editline.o] Error 1
    make[3]: *** [config/rules.mk:907: libs] Error 2
    make[2]: *** [config/rules.mk:754: default] Error 2
    make[1]: *** [GNUmakefile:104: ../build/../../src/../3rdp/gcc.linux.x64.debug/mozjs/lib/libmozjs185-1.0.a] Error 2
    make[1]: Leaving directory '/sbbs/repo/3rdp/build'
    make: *** [/sbbs/repo/src/sbbs3/../build/Common.gmake:630: js] Error 2
    --- SBBSecho 3.29-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Sep 8 21:23:56 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/971#note_7599

    This is an issue building libmozjs. You can try using a system libmozjs instead (if you can/have one installed), otherwise, we'll need to more information about the build system: OS/version, compiler/version, etc.
    --- SBBSecho 3.29-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nick Boel@1:103/705 to GitLab note in main/sbbs on Tue Sep 9 13:49:12 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/971#note_7603

    $ cat /proc/version
    Linux version 6.16.5-arch1-1 (linux@archlinux) (gcc (GCC) 15.2.1 20250813, GNU ld (GNU Binutils) 2.45.0) #1 SMP PREEMPT_DYNAMIC Thu, 04 Sep 2025 23:18:13 +0000

    If you need any more specifics, please let me know.
    --- SBBSecho 3.29-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nick Boel@1:103/705 to GitLab note in main/sbbs on Mon Sep 15 17:37:47 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/971#note_7609

    For what it's worth, I tried installing the 'js115' package from my repository, and building Synchronet still tries to use 1.8.5 from the repo.

    Then realized I had to at least try the JSLIB=/usr/lib/libmozjs-115.so in my make line, and I got a fatal error right away:

    ```
    In file included from terminal.h:4,
    from ansi_terminal.h:6,
    from ansi_terminal.cpp:1:
    sbbs.h:101:10: fatal error: jsversion.h: No such file or directory
    101 | #include <jsversion.h>
    | ^~~~~~~~~~~~~
    compilation terminated.
    make: *** [/home/axisd/sbbs/repo/src/sbbs3/../build/Common.gmake:568: gcc.linux.x64.obj.debug-mt/ansi_terminal.o] Error 1
    ```

    So, probably not a great idea to continue with this as I honestly don't know what I'm doing trying to link to other libraries outside of Synchronet, and don't want to mess anything more up.

    I've already run a 'make clean' at some point and lost my executables, so sbbsecho and whatever else won't run any more. 'sbbs' is still running as a process but I'm sure that'll go down eventually, too.
    --- SBBSecho 3.29-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Mon Sep 15 17:42:08 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/971#note_7610

    And you set JSINCLUDE right?
    --- SBBSecho 3.29-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nick Boel@1:103/705 to GitLab note in main/sbbs on Mon Sep 15 17:49:25 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/971#note_7611

    Yes:

    JSLIB=/use/lib/libmozjs-115.so JSINCLUDE=/usr/include/mozjs-115 as it wanted a directory.
    --- SBBSecho 3.29-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Sep 15 17:50:27 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/971#note_7612

    As Nigel eluded too, it sounds like you pointed sbbs to link to another libmozjs, but didn't point to another libmozjs include (header file) directory.

    That said, libmozjs 115 is *not* going to work with current Synchronet source. It *has* to be v1.8.5 (or a fork of it).
    --- SBBSecho 3.29-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nick Boel@1:103/705 to GitLab note in main/sbbs on Mon Sep 15 17:55:00 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/971#note_7613

    There was no eluding. I answered him probably while you were writing your message.

    Your original message on this issue was "You can try using a system libmozjs instead (if you can/have one installed)", so that's what I tried to do, since libmozjs 115 is the only one that is currently offered in the system's package manager.

    Thanks for the heads up that it won't work, I can stop what I'm doing..
    --- SBBSecho 3.29-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Sep 15 17:58:57 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/971#note_7614

    You could try using pre-built x64 binaries available for download off Vertrauen.

    You can also build other targets (skipping sbbs), if you want to build sbbsecho or anything else, from source, in the mean time.
    ```
    $ make gcc.linux.x64.exe.debug/sbbsecho
    ```
    --- SBBSecho 3.29-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nick Boel@1:103/705 to GitLab note in main/sbbs on Mon Sep 15 18:01:36 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/971#note_7615

    Oh, thanks for that info! At least I can try get things back to normal and just hope I don't have a power outage or anything causing sbbs to stop. ;)
    --- SBBSecho 3.29-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Mon Sep 15 19:26:27 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/971#note_7616

    I may have missed but which OS and architecture are you trying to build for? --- SBBSecho 3.29-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)