box64 icon indicating copy to clipboard operation
box64 copied to clipboard

Infinite Log Loop and Segfault Wrapping libfontconfig.so.1

Open devarajabc opened this issue 7 months ago • 3 comments

I'm trying to run box64 wine control on RISC-V Voyager using the same configuration as in issue #2645.

When I execute:

BOX64_DYNAREC_RV64NOEXT=1 box64 wine64 control

I encounter this error while wrapping libfontconfig.so.1 (log_box64_wine_control.log):

[BOX64] Using native(wrapped) libfreetype.so.6
[BOX64] Error initializing native libfontconfig.so.1 (last dlerror is libfontconfig.so: cannot open shared object file: No such file or directory)
[BOX64] Error loading needed lib libfontconfig.so.1
[BOX64] Warning: Cannot dlopen("libfontconfig.so.1"/0x3f0210f7ba, 2)
[BOX64] 2454|Ask to run at NULL, will segfault
[BOX64] Box64 riscv64 v0.3.5 a9ddd396 with Dynarec built on May 16 2025 10:20:08
[BOX64] Dynarec for rv64g

This triggers an infinite logging loop that can’t be stopped, even with Ctrl+C ( see: video) .I then tried:

export BOX64_EMULATED_LIBS=libfontconfig.so.1

but it still crashes with a segmentation fault in AddPath, because collection is 0x20 (and thus invalid):

Program received signal SIGSEGV, Segmentation fault.
AddPath (path=path@entry=0x3fffffe0a0 "libfontconfig.so.1", 
    collection=collection@entry=0x20, folder=folder@entry=0)
    at /root/box64/src/tools/pathcoll.c:91
91	        if(collection->size==collection->cap) {
(gdb) print *collection 
Cannot access memory at address 0x20

Finally, I tried disabling Dynarec completely (BOX64_DYNAREC=0) but it still triggers the same infinite-loop

devarajabc avatar May 19 '25 13:05 devarajabc

You should install libfontconfig (the risc-v version from you system package manager), it's needed for wine.

ptitSeb avatar May 19 '25 13:05 ptitSeb

That fixed the problem, thanks!

Maybe I can list all the required libraries for RV64, similar to how it's done in X64WINE.md and also steam, since I couldn't find any documentation specifically for RV64 (still trying).

devarajabc avatar May 20 '25 09:05 devarajabc

This is not specific to RISC-V.

ksco avatar May 20 '25 09:05 ksco