debian 11 arm64 aarch64 源码变异winehq arm64 笔记

发布时间:2024年01月12日

安装华为毕昇编译器

sudo apt install libc++1-13
?

编译tools

cd tools

su root

export PATH=/opt/bisheng-compiler-1.3.3-aarch64-linux/bin:$PATH

root@debian:/home/yeqiang/下载/src/wine/tools# ../configure CC=/opt/bisheng-compiler-1.3.3-aarch64-linux/bin/clang CXX=/opt/bisheng-compiler-1.3.3-aarch64-linux/bin/clang++ --host=aarch64-unknown-linux --without-x
?

部分configure 日志

configure: Wayland development files not found, the Wayland driver won't be supported.
configure: OpenCL development files not found, OpenCL won't be supported.
configure: pcap development files not found, wpcap won't be supported.
configure: libpcsclite not found, smart cards won't be supported.
configure: libdbus development files not found, no dynamic device support.
configure: libsane development files not found, scanners won't be supported.
configure: libusb-1.0 development files not found (or too old), USB devices won't be supported.
configure: libv4l2 development files not found.
configure: libgphoto2 development files not found, digital cameras won't be supported.
configure: libgphoto2_port development files not found, digital cameras won't be auto-detected.
configure: libpulse development files not found or too old, Pulse won't be supported.
configure: gstreamer-1.0 base plugins development files not found, GStreamer won't be supported.
configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported.
configure: libudev development files not found, plug and play won't be supported.
configure: libunwind development files not found, stack unwinding won't work.
configure: libSDL2 development files not found, SDL2 won't be supported.
configure: libcapi20 development files not found, ISDN won't be supported.
configure: libcups development files not found, CUPS won't be supported.
configure: fontconfig development files not found, fontconfig won't be supported.
configure: libkrb5 development files not found (or too old), Kerberos won't be supported.
configure: libnetapi not found, Samba NetAPI won't be supported.
configure: libvulkan and libMoltenVK development files not found, Vulkan won't be supported.

configure: WARNING: gettext tools not found (or too old), translations won't be built.

configure: WARNING: libgnutls development files not found, no schannel support.

configure: WARNING: No sound system was found. Windows applications will be silent.

configure: Finished. ?Do 'make' to compile Wine.
?

安装依赖:

sudo apt install -y libwayland-dev ?libpcap-dev libpcsclite-dev libdbus-1-dev libsane-dev libusb-1.0-0-dev libv4l-dev libgphoto2-dev ?libpulse-dev libgstreamer-plugins-base1.0-dev oss-compat libudev-dev libunwind-dev libsdl2-dev libcapi20-dev libcups2-dev libfontconfig1-dev libkrb5-dev ?libvulkan-dev?
sudo apt install mesa-opencl-icd

sudo apt install -y libgphoto2-dev

sudo apt install -y samba-dev

sudo apt install -y libvulkan-dev

sudo apt install -y gettext autopoint

编译tools

root@debian:/home/yeqiang/下载/src/wine/tools# ../configure CC=/opt/bisheng-compiler-1.3.3-aarch64-linux/bin/clang CXX=/opt/bisheng-compiler-1.3.3-aarch64-linux/bin/clang++ --host=aarch64-unknown-linux --without-x --without-freetype

# make ?depend -j8
# make tools -j8

make -j8

编译报错

<inline asm>:11:2: error: unknown directive

资料

root@debian:/home/yeqiang/下载/src/wine/tools# clang -D__STDC__ -c -o dlls/ntdll/aarch64-windows/relay.o ../dlls/ntdll/relay.c -Idlls/ntdll -I../dlls/ntdll -Iinclude -I../include 

-I../include/msvcrt -D_MSVCR_VER=0 -D__WINESRC__ -D_NTSYSTEM_ -D_ACRTIMP= -DWINBASEAPI= 

-D__WINE_PE_BUILD -Wall --target=aarch64-windows-msvc -fuse-ld=lld -fno-strict-aliasing 

-Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Winit-self -Wno-pragma-pack 

-Wno-microsoft-enum-forward-reference -Wstrict-prototypes -Wtype-limits -Wvla -Wwrite-strings 

-Wpointer-arith -Wabsolute-value -Wenum-conversion -g -O2
:11:2: error: unknown directive
.seh_save_fplr_x 16
^
:13:2: error: unknown directive
.seh_set_fp

正如之前所述,Clang 对于 Microsoft 的 Structured Exception Handling(SEH)语法支持有限,尤其对于 .seh_save_fplr_x 和 .seh_set_fp 这样的 Microsoft-specific inline assembly 指令并不支持。

为了成功编译 Wine 的源代码,特别是涉及 Windows 体系结构特有的异常处理的部分,你可能需要使用支持 SEH 的编译器,如 MinGW-w64 或者微软自家的 Visual C++ 编译器(对于非 Windows 平台,可能需要借助 Cross-Compiled 版本)。

对于 Wine 的交叉编译,官方推荐的做法通常是使用 Mingw-w64 工具链。请参考 Wine 的官方文档或社区讨论,了解如何正确设置 Mingw-w64 工具链来进行 Wine 的交叉编译。

如果你确实需要使用 Clang 并想探索能否使其支持 Windows 异常处理模型,你可能需要查找是否存在社区开发的补丁或扩展,或者考虑向 Clang 社区提出 feature request 或者参与开发。然而,目前 Clang 对 Windows SEH 的支持并不完善,因此这种方式可能面临较多挑战。

回到gcc

root@debian:/home/yeqiang/下载/src/wine/tools# ?../configure CC=/usr/bin/gcc CXX=/usr/bin/g++ --host=aarch64-linux-gnu --without-x --without-freetype

creating Makefile rules... done
configure: creating ./config.status
config.status: creating include/config.h
config.status: linking ../tools/winewrapper to wine
config.status: executing include/stamp-h commands
config.status: executing tools/makedep commands
config.status: executing Makefile commands

configure: Wayland development files not found, the Wayland driver won't be supported.
configure: OpenCL development files not found, OpenCL won't be supported.
configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported.

configure: WARNING: libgnutls development files not found, no schannel support.

configure: Finished. ?Do 'make' to compile Wine.
?

AI

我在debian 11 aarch64架构系统上,CPU是arm64架构。我期望使用wine启动一个x86 或者x86_64的windows 应用程序。是否可行?

在 Debian 11 aarch64 架构系统上直接运行 x86 或 x86_64 架构的 Windows 应用程序是不可行的,因为 CPU 架构之间存在不兼容性。aarch64(ARM64)架构的处理器不支持直接执行 x86 或 x86_64 架构的机器指令。

Wine 通常用于在 Linux 上运行原生为 x86 或 x86_64 架构编译的 Windows 应用程序,但它依赖于底层 CPU 架构的兼容性。对于 aarch64 架构,Wine 必须通过某种形式的二进制转换或模拟技术来支持运行 x86/x86_64 应用程序,而这种支持的程度取决于 Wine 的开发进度和实现细节。

目前,Wine 对于 aarch64 架构的支持尚在发展中,而且支持度和性能表现可能不及 x86 和 x86_64 架构。在 WineHQ 官方网站上可以查询到最新的支持状态和兼容性报告。

尽管如此,有一些项目(如 Box64、ExaGear Desktop)致力于提供 x86 仿真环境,允许在 ARM 架构上运行 x86 应用程序,但这通常需要更多的配置和优化,并且性能和兼容性都有局限性。同时,这些项目与 Wine 本身是相互独立的,需要单独安装和配置。

放弃wine研究,转向Box64

ExaGear Desktop

文章来源:https://blog.csdn.net/hknaruto/article/details/135543442
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。