• src/odoors/GNUmakefile

    From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Sunday, September 03, 2023 15:30:15
    https://gitlab.synchro.net/main/sbbs/-/commit/a56063a244054777164ada27
    Modified Files:
    src/odoors/GNUmakefile
    Log Message:
    Hacks to get ODoors to build on Linux (Debian/Ubuntu recent releases) again

    1. Resolve the "hidden symbol 'atexit' ... being referenced by DSO" error
    by using the -shared option (link against shared objects, not static libs) 2. The path to the xpdev output directory (where to find libxpdev.a) is just
    wrong. Hard-coded the machine architecuture portion (.x64) as a hack for
    now. Also, since this is use the LD macro, you need to pass "LD=gcc" on the
    make command-line. Not sure how this worked before.

    Fixes (or at least works-around) issues reported by Ryan Fantus (1:218/820)
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sunday, August 09, 2026 07:19:11
    https://gitlab.synchro.net/main/sbbs/-/commit/f2244bca8b757857d4d52676
    Modified Files:
    src/odoors/GNUmakefile
    Log Message:
    odoors: fix the example programs, which could never run

    LDFLAGS is used only by the five example link rules (the library
    itself is linked with SHFLAGS), but it was being assigned the
    shared-object flags: -shared, or -dynamiclib -single_module on Darwin.
    Every example was therefore emitted as a shared object with a NULL ELF
    entry point, and segfaulted the instant it was run.

    Dropping those flags exposed a second problem: the examples name the
    library by relative path, so libs-<OS>/libODoors.so only resolved when
    the current directory happened to be src/odoors. Give them an
    $ORIGIN-relative runpath, and give the library a soname; without one a
    client records the relative link path as its DT_NEEDED entry, and
    glibc does not consult the runpath for any name containing a slash.

    Appending to LDFLAGS rather than assigning it also stops -fPIC, and
    DEBUG=1's -g, from being discarded.

    Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net