Administrator
发布于 2026-01-06 / 11 阅读
0
0

麒麟银河V10编译安装box64

git clone https://github.com/ptitSeb/box64
cd box64
mkdir build; cd build; cmake .. ${OPTIONS}
make -j$(nproc)

在开始编译前需要修改CMakeLists.txt,将其中涉及Python依赖的判断语句注释掉。银河麒麟系统已经预装了python2及python3,不过可能是包名不同,编译程序会报未安装python的错误,注释掉就好了。

最后执行安装:

pico@Admin-pc:~/src/box64/build$ sudo make install
输入密码         
[  0%] Generating ../src/wrapped/generated/functions_list.txt
[  0%] Built target WRAPPERS
[  9%] Built target interpreter
[  9%] Generating ../src/wrapped/generated/functions_list.txt
[  9%] Built target functions_list
[ 10%] Built target generate_git_head_target
[100%] Built target mainobj
[100%] Built target box64
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/local/bin/box64
-- Installing: /usr/local/bin/box64-bash
-- Installing: /etc/binfmt.d/box64.conf
-- Installing: /etc/box64.box64rc
-- Installing: /usr/lib/box64-x86_64-linux-gnu/libstdc++.so.5
-- Installing: /usr/lib/box64-x86_64-linux-gnu/libstdc++.so.6
-- Installing: /usr/lib/box64-x86_64-linux-gnu/libgcc_s.so.1
-- Installing: /usr/lib/box64-x86_64-linux-gnu/libpng12.so.0
-- Installing: /usr/lib/box64-x86_64-linux-gnu/libcrypto.so.1.1
-- Installing: /usr/lib/box64-x86_64-linux-gnu/libcrypto.so.1.0.0
-- Installing: /usr/lib/box64-x86_64-linux-gnu/libssl.so.1.1
-- Installing: /usr/lib/box64-x86_64-linux-gnu/libssl.so.1.0.0
-- Installing: /usr/lib/box64-x86_64-linux-gnu/libunwind.so.8
-- Installing: /usr/lib/box64-x86_64-linux-gnu/libmbedx509.so.1
-- Installing: /usr/lib/box64-x86_64-linux-gnu/libmbedx509.so.0
-- Installing: /usr/lib/box64-x86_64-linux-gnu/libmbedtls.so.14
-- Installing: /usr/lib/box64-x86_64-linux-gnu/libmbedtls.so.12
-- Installing: /usr/lib/box64-x86_64-linux-gnu/libmbedcrypto.so.7
-- Installing: /usr/lib/box64-x86_64-linux-gnu/libmbedcrypto.so.3

最后用Z-Library二进制程序测试:

pico@Admin-pc:~/下载/Z-Library-3.0.0$ box64 ./Z-Library 
[BOX64] Box64 v0.4.1 c31bf3329 built on Jan  6 2026 09:59:03
[BOX64] Running on HUAWEI Kirin 9000C with 12 cores, pagesize: 4096
[BOX64] Will use time-based emulation for RDTSC, even if hardware counters are available
[BOX64] Will use software counter measured at 1.0 GHz emulating 2.0 GHz
[BOX64] Didn't detect 48bits of address space, considering it's 39bits
[BOX64] Counted 75 Env var
[BOX64] Library search path: 
[BOX64] Binary search path: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/:/usr/games/:/usr/local/games/
[BOX64] Looking for ./Z-Library
[BOX64] Running on HUAWEI Kirin 9000C with 12 cores, pagesize: 4096
[BOX64] Will use time-based emulation for RDTSC, even if hardware counters are available
[BOX64] Will use software counter measured at 1.0 GHz emulating 2.0 GHz
[BOX64] Rename process to "Z-Library"
[BOX64] Redirecting overridden malloc from symtab function for /home/pico/下载/Z-Library-3.0.0/Z-Library
[BOX64] Using emulated libffmpeg.so
[BOX64] Using native(wrapped) libdl.so.2
[BOX64] Using native(wrapped) libpthread.so.0
[BOX64] Using native(wrapped) libgobject-2.0.so.0
[BOX64] Using native(wrapped) libglib-2.0.so.0
[BOX64] Using native(wrapped) libgio-2.0.so.0
[BOX64] Using native(wrapped) libgmodule-2.0.so.0
[BOX64] Using native(wrapped) libnss3.so
[BOX64] Using native(wrapped) libnssutil3.so
[BOX64] Using native(wrapped) libsmime3.so
[BOX64] Using native(wrapped) libnspr4.so
[BOX64] Using native(wrapped) libdbus-1.so.3
[BOX64] Using native(wrapped) libatk-1.0.so.0
[BOX64] Using native(wrapped) libatk-bridge-2.0.so.0
[BOX64] Using native(wrapped) libSM.so.6
[BOX64] Using native(wrapped) libICE.so.6
[BOX64] Using native(wrapped) libXau.so.6
[BOX64] Using native(wrapped) libxcb.so.1
[BOX64] Using native(wrapped) libXdmcp.so.6
[BOX64] Using native(wrapped) libcups.so.2
[BOX64] Using native(wrapped) libdrm.so.2
[BOX64] Using native(wrapped) libgtk-3.so.0
[BOX64] Using native(wrapped) libgdk-3.so.0
[BOX64] Using native(wrapped) libgdk_pixbuf-2.0.so.0
[BOX64] Using native(wrapped) libpangocairo-1.0.so.0
[BOX64] Using native(wrapped) libpango-1.0.so.0
[BOX64] Using native(wrapped) libcairo.so.2
[BOX64] Using native(wrapped) libX11.so.6
[BOX64] Using native(wrapped) libXcomposite.so.1
[BOX64] Using native(wrapped) libXdamage.so.1
[BOX64] Using native(wrapped) libXext.so.6
[BOX64] Using native(wrapped) libXfixes.so.3
[BOX64] Using native(wrapped) libXrandr.so.2
[BOX64] Using native(wrapped) libXrender.so.1
[BOX64] Using native(wrapped) libgbm.so.1
[BOX64] Using native(wrapped) libexpat.so.1
[BOX64] Using native(wrapped) libxkbcommon.so.0
[BOX64] Using native(wrapped) libasound.so.2
[BOX64] Using native(wrapped) libatspi.so.0
[BOX64] Using native(wrapped) libm.so.6
[BOX64] Using emulated /usr/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) libutil.so.1
[BOX64] Using native(wrapped) librt.so.1
[BOX64] Using native(wrapped) libbsd.so.0
[BOX64] Warning: Weak Symbol ZSTD_trace_decompress_begin not found, cannot apply R_X86_64_JUMP_SLOT @0x10a937598 (0xa393046)
[BOX64] Warning: Weak Symbol ZSTD_trace_decompress_end not found, cannot apply R_X86_64_JUMP_SLOT @0x10a9375a0 (0xa393056)
[BOX64] Warning: Weak Symbol _ZTHN2v88internal12trap_handler21g_thread_in_wasm_codeE not found, cannot apply R_X86_64_JUMP_SLOT @0x10a937c30 (0xa393d76)
[BOX64] Warning: Weak Symbol _ZTHN2v88internal19RwxMemoryWriteScope31code_space_write_nesting_level_E not found, cannot apply R_X86_64_JUMP_SLOT @0x10a937c38 (0xa393d86)
[BOX64] Warning: Weak Symbol OPENSSL_memory_alloc not found, cannot apply R_X86_64_JUMP_SLOT @0x10a937e70 (0xa3941f6)
[BOX64] Warning: Weak Symbol OPENSSL_memory_free not found, cannot apply R_X86_64_JUMP_SLOT @0x10a937e78 (0xa394206)
[BOX64] Warning: Weak Symbol sdallocx not found, cannot apply R_X86_64_JUMP_SLOT @0x10a937e80 (0xa394216)
[BOX64] Warning: Weak Symbol OPENSSL_memory_get_size not found, cannot apply R_X86_64_JUMP_SLOT @0x10a937e88 (0xa394226)
free(): invalid pointer
[BOX64] NativeBT: /usr/local/bin/box64() [0x34822b70]
[BOX64] NativeBT: /usr/local/bin/box64() [0x3485c064]
[BOX64] NativeBT: linux-vdso.so.1(__kernel_rt_sigreturn+0) [0x724c1c17b8]
[BOX64] NativeBT: /lib/aarch64-linux-gnu/libc.so.6(gsignal+0xe0) [0x724c034c60]
[BOX64] NativeBT: /lib/aarch64-linux-gnu/libc.so.6(abort+0x110) [0x724c021a68]
[BOX64] NativeBT: /lib/aarch64-linux-gnu/libc.so.6(+0x6dc14) [0x724c06ec14]
[BOX64] NativeBT: /lib/aarch64-linux-gnu/libc.so.6(+0x74fd4) [0x724c075fd4]
[BOX64] NativeBT: /lib/aarch64-linux-gnu/libc.so.6(+0x76840) [0x724c077840]
[BOX64] NativeBT: /usr/local/bin/box64() [0x34845ed4]
[BOX64] NativeBT: /usr/local/bin/box64() [0x34f67b98]
[BOX64] NativeBT: /usr/local/bin/box64() [0x34833e00]
[BOX64] NativeBT: /usr/local/bin/box64(my___libc_start_main+0x104) [0x34840cac]
[BOX64] NativeBT: /usr/local/bin/box64() [0x3489a9b0]
[BOX64] NativeBT: /usr/local/bin/box64() [0x34845ed4]
[BOX64] NativeBT: /usr/local/bin/box64() [0x34f67b98]
[BOX64] NativeBT: /usr/local/bin/box64() [0x34833e00]
[BOX64] NativeBT: /usr/local/bin/box64() [0x3482e914]
[BOX64] NativeBT: /usr/local/bin/box64() [0x348228f0]
[BOX64] NativeBT: /lib/aarch64-linux-gnu/libc.so.6(__libc_start_main+0xe8) [0x724c021d90]
[BOX64] NativeBT: /usr/local/bin/box64() [0x34822964]
[BOX64] EmulatedBT: box64(free+0) [0x300000a0]
[BOX64] EmulatedBT: /home/pico/下载/Z-Library-3.0.0/Z-Library+9ff7a1f [0x109ff7a1f]
[BOX64] EmulatedBT: /home/pico/下载/Z-Library-3.0.0/Z-Library+9ff6fa1 [0x109ff6fa1]
[BOX64] EmulatedBT: /home/pico/下载/Z-Library-3.0.0/Z-Library+a002c64 [0x10a002c64]
[BOX64] EmulatedBT: /home/pico/下载/Z-Library-3.0.0/Z-Library(__libc_csu_init+45) [0x102384195]
[BOX64] EmulatedBT: box64(ExitEmulation+0) [0x30000080]
[BOX64] EmulatedBT: /home/pico/下载/Z-Library-3.0.0/Z-Library(+2a) [0x101fe202a]
[BOX64] 52350|SIGABRT @0x724c034c60 (gsignal(/lib/aarch64-linux-gnu/libc.so.6)) (x64pc=0x300000b3/"box64/free + 0x13", rsp=0x724bbc9b18), for accessing 0x3e90000cc7e (code=-6)
RAX:0x0000006c00210078 RCX:0x0000000000000000 RDX:0x0000000000001c30 RBX:0x0000006c00210090 
RSP:0x000000724bbc9b18 RBP:0x000000724bbc9ba0 RSI:0x0000006c002100f0 RDI:0x0000006c00210090 
 R8:0x0000006c002100c0  R9:0x000000724bbc9b77 R10:0x0000000000000009 R11:0x0000000000000040 
R12:0x000000010aaf1978 R13:0x000000724bbc9bc8 R14:0x0000006c00210078 R15:0x000000000000000a ES:0x002b CS:0x0033 SS:0x002b DS:0x002b FS:0x0000 GS:0x0000 FSBASE=0x61d2af20 GSBASE=(nil)

已放弃 (核心已转储)

╮(╯▽╰)╭


评论