Skip to content

Conversation

@yzewei
Copy link
Contributor

@yzewei yzewei commented Jan 17, 2026

Add missing wrapper entries for libc/selinux/openssl symbols used by docker run (use apt/libsystemd).
Provide weak libc fallbacks for strerrorname_np and open_tree on older glibc.
Regenerate wrapper outputs.

box64 apt-get update

# run x86 apt/libsystemd in the container

Observed logs (before fix)

[BOX64] Error: Symbol fgetfilecon not found ... in /usr/bin/ls
[BOX64] Error: Symbol getfilecon not found ... in /usr/bin/ls
[BOX64] Error: Symbol pidfd_open not found ... in /lib/x86_64-linux-gnu/libsystemd.so.0
[BOX64] Error: Symbol pidfd_send_signal not found ... in /lib/x86_64-linux-gnu/libsystemd.so.0
[BOX64] Error: Symbol strerrorname_np not found ... in /lib/x86_64-linux-gnu/libsystemd.so.0
[BOX64] Error: Symbol open_tree not found ... in /lib/x86_64-linux-gnu/libsystemd.so.0
[BOX64] Error: Symbol SSL_has_pending not found ... in /usr/lib/apt/methods/http
[BOX64] Error: Symbol SSL_set0_wbio not found ...
[BOX64] Error: Symbol SSL_set0_rbio not found ...
[BOX64] Error: Symbol SSL_set1_host not found ...
[BOX64] Error: Symbol SSL_CTX_load_verify_file not found ...
[BOX64] Error: Symbol dn_skipname not found ... in /lib/x86_64-linux-gnu/libapt-pkg.so.7.0

@yzewei yzewei force-pushed the missing-117 branch 2 times, most recently from 6d28613 to 6bd94be Compare January 17, 2026 06:54
Copy link
Owner

@ptitSeb ptitSeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some function does not exists. Where did you find them and what needs them?

@ksco
Copy link
Collaborator

ksco commented Jan 17, 2026

From the description: it's for docker.

@ptitSeb
Copy link
Owner

ptitSeb commented Jan 17, 2026

Yet, those 2 functions will not exist in most glibc distributions.
And the signal one needs a GOM anyway.

@yzewei
Copy link
Contributor Author

yzewei commented Jan 17, 2026

From the description: it's for docker.

Some function does not exists. Where did you find them and what needs them?

These symbols are missing when running x86_64 binaries inside a docker container on loongarch with box64.

@yzewei
Copy link
Contributor Author

yzewei commented Jan 17, 2026

Thank you for your suggestions. I'm still exploring the box64 project and focusing on problem-solving . I'm glad you pointed out the pr. Thanks again! I will modify them. @ksco @ptitSeb

@yzewei yzewei marked this pull request as draft January 17, 2026 07:37
@yzewei
Copy link
Contributor Author

yzewei commented Jan 17, 2026

pidfd_send_signal and pidfd_open are using GOM.
** logs**

[BOX64] Box64 loongarch64 v0.4.1  with Dynarec built on Jan 17 2026 15:50:06
[BOX64] Dynarec for LoongArch with extension LSX LASX LBT_X86
[BOX64] Running on Unknown CPU with 4 cores, pagesize: 16384
[BOX64] Will use hardware counter measured at 100 MHz emulating 3.2 GHz
[BOX64] Didn't detect 48bits of address space, considering it's 39bits
[BOX64] Warning, older then 2.34 pthread_kill not found, using current one
[BOX64] Counted 8 Env var
[BOX64] Library search path: 
[BOX64] Binary search path: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/
[BOX64] Looking for apt-get
[BOX64] Dynarec for LoongArch with extension LSX LASX LBT_X86
[BOX64] Running on Unknown CPU with 4 cores, pagesize: 16384
[BOX64] Will use hardware counter measured at 100 MHz emulating 3.2 GHz
[BOX64] BOX64ENV: Variables overridden:
	BOX64_LD_LIBRARY_PATH=/abi2-root/lib64:/abi2-root/usr/lib64:/abi2-root/usr/lib:/abi2-root/lib:/home/yzw/cloud-multiarch/root.loong64/lib
[BOX64] argv[1]="update"
[BOX64] Rename process to "apt-get"
[BOX64] Using emulated /lib/x86_64-linux-gnu/libapt-private.so.0.0
[BOX64] Using emulated /lib/x86_64-linux-gnu/libapt-pkg.so.7.0
[BOX64] Using emulated /lib/x86_64-linux-gnu/libstdc++.so.6
[BOX64] Using emulated /lib/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 native(wrapped) libm.so.6
[BOX64] Using native(wrapped) libz.so.1
[BOX64] Using native(wrapped) libbz2.so.1
[BOX64] Using native(wrapped) liblzma.so.5
[BOX64] Using emulated /lib/x86_64-linux-gnu/liblz4.so.1
[BOX64] Using native(wrapped) libzstd.so.1
[BOX64] Using native(wrapped) libudev.so.1
[BOX64] Using emulated /lib/x86_64-linux-gnu/libsystemd.so.0
[BOX64] Using native(wrapped) libcrypto.so.3
[BOX64] Using emulated /lib/x86_64-linux-gnu/libxxhash.so.0
Get:1 http://deb.debian.org/debian sid InRelease [187 kB]

@ptitSeb
Copy link
Owner

ptitSeb commented Jan 17, 2026

Creating default falback for the new call also, that's nice.

@yzewei yzewei marked this pull request as ready for review January 17, 2026 08:19
@yzewei
Copy link
Contributor Author

yzewei commented Jan 17, 2026

Creating default falback for the new call also, that's nice.

Thank you! I'm really interested in improving support for running x86_64 containers on other architectures. I'll be doing more testing, so apologies in advance if I create a bit of noise with more PRs/Issues in the near future!

@ksco
Copy link
Collaborator

ksco commented Jan 17, 2026

We appreciate it if you could maintain a document on how to run x86_64 Docker containers with box64 in docs/.

@ksco ksco merged commit a0d01de into ptitSeb:main Jan 17, 2026
27 checks passed
@yzewei
Copy link
Contributor Author

yzewei commented Jan 17, 2026

We appreciate it if you could maintain a document on how to run x86_64 Docker containers with box64 in docs/.

It's still in the debugging stage, and due to the special nature of Loongarch ABI, I'm using the sysroot of ABI2 to run x86 containers on the physical machine of ABI1. I will come up with a standard way of running it as soon as possible (the reason for this is because the glibc version of ABI1 is too low).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants