• atexit compilation errors?

    From Ryan Fantus@VERT to All on Sun Sep 3 02:10:13 2023
    Hey friends,

    I've been trying to compile Synchronet addons in the sbbs git repo using modern Ubuntu, but have also tried 20.04, 22.04, 22.10, and Debian 12. The way to reproduce the error I'm dealing with is to go into the /sbbs/repo/src/odoors directory and type "make". It'll fail on the 'ex_chat' compilation with an atexit symbol error.

    Anyone else find a way to deal with this, by chance? I'd really like to get some games to compile :)

    Thanks!

    --- Mystic BBS v1.12 A49 2023/02/26 (Linux/64)
    * Origin: m O N T E R E Y b B S . c O M (1:218/820)
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Ryan Fantus on Sun Sep 3 15:34:55 2023
    Re: atexit compilation errors?
    By: Ryan Fantus to All on Sun Sep 03 2023 02:10 am

    I've been trying to compile Synchronet addons in the sbbs git repo using modern Ubuntu, but have also tried 20.04, 22.04, 22.10, and Debian 12. The way to reproduce the error I'm dealing with is to go into the /sbbs/repo/src/odoors directory and type "make". It'll fail on the 'ex_chat' compilation with an atexit symbol error.

    Anyone else find a way to deal with this, by chance? I'd really like to get some games to compile :)

    The 'ex_chat' is just an example ODoors program. You could've just removed references to ex_chat from odoors/GNUmakefile, but it would've then failed to build the other examples too.

    I added a fix (using the '-shared' option) for that issue, but I also observed that the build was failing to find the xpdev library. I added a hack for that (assume the build target is an x64 system). And even with that hack, I had to add "LD=gcc" to the make command-line, but it did work for me:

    $ make LD=gcc
    cc -fPIC -O2 -Llibs-Linux/ -I../xpdev -shared -Wall -DHAS_INTTYPES_H ex_vote.c ../xpdev/filewrap.c -o exe-Linux/ex_vote -lODoors -DMULTINODE_AWARE
    --
    digital man (rob)

    Synchronet "Real Fact" #121:
    Synchronet v2.20a for DOS was released on Aug 31, 1995 (5 months after v2.11a) Norco, CA WX: 76.9°F, 59.0% humidity, 10 mph SSE wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Ryan Fantus@VERT to Digital Man on Mon Sep 4 16:39:24 2023
    The 'ex_chat' is just an example ODoors program. You could've just
    removed references to ex_chat from odoors/GNUmakefile, but it would've then failed to build the other examples too.

    Yeah, and I'm finding some other games that rely on ODoors have the same problem (clans, for example).

    I added a fix (using the '-shared' option) for that issue, but I also observed that the build was failing to find the xpdev library. I added a hack for that (assume the build target is an x64 system). And even with that hack, I had to add "LD=gcc" to the make command-line, but it did
    work for me:

    Thanks! I'll give this a whirl.

    BTW, how necessary is calling 'atexit' in OpenDoors? I commented out the line and compiled without `-shared` and it compiled fine. Wondering if it's truly needed, especially for linux x64?

    --- Mystic BBS v1.12 A49 2023/02/26 (Linux/64)
    * Origin: m O N T E R E Y b B S . c O M (1:218/820)
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From fusion@VERT/CFBBS to Ryan Fantus on Tue Sep 5 01:54:00 2023
    On 04 Sep 2023, Ryan Fantus said the following...

    BTW, how necessary is calling 'atexit' in OpenDoors? I commented out the line and compiled without `-shared` and it compiled fine. Wondering if it's truly needed, especially for linux x64?

    atexit is a way to create a stack of functions that are called when a program exits.

    my guess is since it's a door library (and they don't necessarily control the program flow, the door programmed with it does) they want to ensure if the door game just abruptly decides to do exit(), odoors can at least clean up after itself.

    the other option would be to make the door programmer responsible for it.. they'd call the atexit()-ed functions themselves when they're finishing up.

    --- Mystic BBS v1.12 A47 2021/12/25 (Windows/32)
    * Origin: cold fusion - cfbbs.net - grand rapids, mi