Skip to content

Conversation

@yzewei
Copy link
Contributor

@yzewei yzewei commented Jan 14, 2026

Add arc4random to libc to allow x86_64 NumPy wheels to load.

@yzewei
Copy link
Contributor Author

yzewei commented Jan 14, 2026

CI failed because rebuild_wrappers.py doesn't know LA64_ABI_1 without the CMake change, need https://github.com/ptitSeb/box64/pull/3371

@ksco
Copy link
Collaborator

ksco commented Jan 14, 2026

It's simple enough and related, please put it in this PR for the ease of merging.

Signed-off-by: Zewei Yang <yangzewei@loongson.cn>
@yzewei
Copy link
Contributor Author

yzewei commented Jan 14, 2026

It's simple enough and related, please put it in this PR for the ease of merging.

OK

@ptitSeb
Copy link
Owner

ptitSeb commented Jan 14, 2026

But what about #3367 ?

@yzewei
Copy link
Contributor Author

yzewei commented Jan 14, 2026

But what about #3367 ?

This PR is a minimal workaround for the missing symbol I hit in practice: only arc4random was unresolved on LA64 ABI1/glibc, and other arc4random_* weren’t referenced. So I only wrapped arc4random to keep the change small.

#3367 is still valid and not fully addressed here. fixed in #3373

@ptitSeb
Copy link
Owner

ptitSeb commented Jan 14, 2026

Please do not introduce a my_ specific to a system. Instead, create a weak version of the arc4random in libc.c, like I have done previously for strlcpy and __strlcpy_chk so the fix is more generic.

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