最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to cross-compile glib 2.54.3 for aarch64 on Ubuntu 18.04? - Stack Overflow

programmeradmin3浏览0评论

I'm encountering issues trying to cross-compile glib 2.54.3 for the aarch64 architecture on Ubuntu 18.04.6. My development environment is as follows:

Operating System: Ubuntu 18.04.6 LTS GCC Version: 7.5 Target Architecture: aarch64 glib Version: 2.54.3 Cross-Compilation Toolchain: gcc-aarch64-linux-gnu

[host_machine]
system = 'linux'        
cpu_family = 'aarch64' 
cpu = 'aarch64'        
endian = 'little'      

[built-in options]
c_args = []
c_link_args = []

[properties]
needs_exe_wrapper = true   

[binaries]
c = 'aarch64-linux-gnu-gcc'        
cpp = 'aarch64-linux-gnu-g++'      
ar = 'aarch64-linux-gnu-ar'        
ld = 'aarch64-linux-gnu-ld'       
objcopy = 'aarch64-linux-gnu-objcopy' 
strip = 'aarch64-linux-gnu-strip' 
pkg-config = 'aarch64-linux-gnu-pkg-config' 
windres = 'aarch64-linux-gnu-windres'  

When I run the following command to configure the build directory, I encounter the following error:

meson setup builddir --cross-file=cross_file.txt

Checking if "open() option O_DIRECTORY" compiles: YES

meson.build:633:12: ERROR: Can not run test applications in this cross environment.

A full log can be found at /home/coke/glib-2.54.3/builddir/meson-logs/meson-log.txt

I tried using the following command to disable tests: meson setup builddir --cross-file=cross_file.txt -Dtest=false

But the problem persists.

Is there any solution to skip tests or bypass this error? Or is there a specific setting or step that I missed?

I attempted to cross-compile glib 2.54.3 for the aarch64 architecture on my Ubuntu 18.04 system using meson and a cross-compilation toolchain (aarch64-linux-gnu-gcc). I set up the cross-compilation configuration correctly and ran the meson setup builddir --cross-file=cross_file.txt command. I also tried to disable tests by using -Dtest=false to avoid running test programs that could fail in the cross-compilation environment. My expectation was that meson would successfully configure the build environment without running any tests, but instead, I encountered an error message stating that test programs could not run in the cross-compilation environment.

发布评论

评论列表(0)

  1. 暂无评论