Skip to content

[Box64][Termux-GlibC?] missing symbol __strlcpy_chk in hl_amd64.so compiled by Ubuntu 24.04 #3060

@TheKingFireS

Description

@TheKingFireS

Log:

~/xashds
$ box64 xash 
[BOX64] Box64 arm64 v0.3.7 af437fa with Dynarec built on Oct 12 2025 08:27:30
[BOX64] Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2
[BOX64] Running on Kryo-4XX-Silver with 8 cores, pagesize: 4096
[BOX64] Will use hardware counter measured at 19.2 MHz emulating 2.4 GHz
[BOX64] Didn't detect 48bits of address space, considering it's 39bits
[BOX64] Counted 54 Env var
[BOX64] Library search path: 
[BOX64] Binary search path: ./:bin/:/data/data/com.termux/files/usr/glibc/bin/:/data/data/com.termux/files/usr/bin/:/data/data/com.termux/files/home/.dotnet/tools/
[BOX64] Looking for xash
[BOX64] Rename process to "xash"
[BOX64] Using native(wrapped) libm.so.6
[BOX64] Using emulated /data/data/com.termux/files/usr/glibc/lib/box64-x86_64-linux-gnu/libgcc_s.so.1
[BOX64] Using native(wrapped) libc.so.6
[BOX64] Using native(wrapped) ld-linux-x86-64.so.2
[BOX64] Using native(wrapped) libpthread.so.0
[BOX64] Using native(wrapped) libdl.so.2
[BOX64] Using native(wrapped) libutil.so.1
[BOX64] Using native(wrapped) libresolv.so.2
[BOX64] Using native(wrapped) librt.so.1
[BOX64] Using native(wrapped) libbsd.so.0
[BOX64] Using emulated filesystem_stdio.so
[BOX64] Using emulated /data/data/com.termux/files/usr/glibc/lib/box64-x86_64-linux-gnu/libstdc++.so.6
[09:11:08] /data/data/com.termux/files/home/xashds is working directory now
[09:11:08] Adding directory: ./
[09:11:08] FS_AddGameHierarchy( valve )
[09:11:08] Adding directory: valve/downloaded/
[09:11:08] Adding directory: valve/
[09:11:08] Adding directory: valve/custom/
[BOX64] Using emulated /data/data/com.termux/files/home/xashds/valve/dlls/hl_amd64.so
[BOX64] Error: Symbol __strlcpy_chk not found, cannot apply R_X86_64_JUMP_SLOT @0x3f031da038 (0x910a0) in /data/data/com.termux/files/home/xashds/valve/dlls/hl_amd64.so
[BOX64] Error: relocating Plt symbols in elf hl_amd64.so
[BOX64] Error initializing needed lib /data/data/com.termux/files/home/xashds/valve/dlls/hl_amd64.so
[09:11:08] Error: can't initialize dlls/hl_amd64.so: Cannot dlopen("/data/data/com.termux/files/home/xashds/valve/dlls/hl_amd64.so"/0x38605ad8, 2)
[09:11:08] Type 'map <mapname>' to start game...
[09:11:08] execing server.cfg
exit
[09:17:24] Note: Issuing host shutdown due to reason "command"

Explain:
Only happened when I compiled hl_amd64.so (from FWGS's hlsdk-portable, gamelogic for Half-Life game) with Ubuntu 24.04. Worked fine when compiled with 22.04 or 20.04.

I'm pretty sure it wasn't caused by outdated GlibC as Termux-GlibC has 2.41 and Ubuntu 24.04 has 2.39.

I also searched this symbol, I only found mention in this unrelated issue #2478.

To reproduce this:

  1. Download XashDS FWGS AMD64 from https://github.com/FWGS/xash3d-fwgs/releases/download/continuous/xashds-linux-amd64.tar.gz

  2. Compile your own hl_amd64.so in Ubuntu 24.04 (or download my attached hl_amd64.so here hl_amd64_library.zip)

  3. Install necessary resources (valve folder only) beside where xash and filesystem_stdio.so (do not replace it with goldsrc one!) binaries files installed.

  4. Install hl_amd64.so to valve/dlls/ folder

  5. Start XashDS FWGS by running grun -s box64 xash (this is for Termux).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions