open鸿蒙的meson编译经典报错
root@00e492cb8863:/ohos/third_party/mesa3d# python ./ohos/build_ohos64.py /ohos rpi4 /ohos/third_party/mesa3d
generate_cross_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/zlib.pc
generate_pc_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/gbm.pc
generate_pc_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/libjpeg.pc
generate_pc_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/wayland-egl-backend.pc
generate_pc_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/wayland-server.pc
generate_pc_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/wayland-protocols.pc
generate_pc_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/wayland-client.pc
generate_pc_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/libhilog.pc
generate_pc_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/libdrm.pc
generate_pc_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/libsurface.pc
generate_pc_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/wayland-cursor.pc
generate_pc_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/wayland-egl.pc
generate_pc_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/libpng.pc
generate_pc_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/libxml2.pc
generate_pc_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/libudev.pc
generate_pc_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/expat.pc
generate_pc_file
/ohos/third_party/mesa3d/ohos/pkgconfig_template/wayland-scanner.pc
generate_pc_file
process_pkgconfig
build command: PKG_CONFIG_PATH=./pkgconfig meson setup /ohos/third_party/mesa3d build-ohos -Dplatforms=ohos -Degl-native-platform=ohos -Ddri-drivers= -Dgallium-drivers=v3d,vc4,kmsro -Dvulkan-drivers= -Dgbm=enabled -Degl=enabled -Dgles1=enabled -Dgles2=enabled -Dcpp_rtti=false -Dglx=disabled -Dtools= -Ddri-search-path=/vendor/lib64/chipsetsdk --cross-file=cross_file --prefix=/ohos/third_party/mesa3d/build-ohos/install
DEPRECATION: c_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
DEPRECATION: cpp_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
DEPRECATION: c_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
DEPRECATION: cpp_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
The Meson build system
Version: 0.62.0
Source dir: /ohos/third_party/mesa3d
Build dir: /ohos/third_party/mesa3d/build-ohos
Build type: cross build
Program python3 found: YES (/usr/bin/python3)
Project name: mesa
Project version: 22.2.4
C compiler for the host machine: ccache /ohos/prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang (clang 15.0.4 “OHOS (dev) clang version 15.0.4 (llvm-project d1aa604d90b55a96aa22af9992d170fccbd41938)”)
C linker for the host machine: /ohos/prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang ld.lld 15.0.4
C++ compiler for the host machine: ccache /ohos/prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang++ (clang 15.0.4 “OHOS (dev) clang version 15.0.4 (llvm-project d1aa604d90b55a96aa22af9992d170fccbd41938)”)
C++ linker for the host machine: /ohos/prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang++ ld.lld 15.0.4
C compiler for the build machine: ccache cc (gcc 9.4.0 “cc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0”)
C linker for the build machine: cc ld.bfd 2.34
C++ compiler for the build machine: ccache c++ (gcc 9.4.0 “c++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0”)
C++ linker for the build machine: c++ ld.bfd 2.34
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: arm
Host machine cpu: armv8
Target machine cpu family: arm
Target machine cpu: armv8
meson.build:529: WARNING: cannot auto-detect -mtls-dialect when cross-compiling, using compiler default
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency libsurface found: YES 2.4.1
Run-time dependency libhilog found: YES 2.4.1
Checking for function “bswap32” : NO
Checking for function “bswap64” : NO
Checking for function “clz” : NO
Checking for function “clzll” : NO
Checking for function “ctz” : NO
Checking for function “expect” : NO
Checking for function “ffs” : NO
Checking for function “ffsll” : NO
Checking for function “popcount” : NO
Checking for function “popcountll” : NO
Checking for function “unreachable” : NO
Checking for function “types_compatible_p” : NO
Compiler for C supports function attribute const: YES
Compiler for C supports function attribute flatten: YES
Compiler for C supports function attribute malloc: YES
Compiler for C supports function attribute pure: YES
Compiler for C supports function attribute unused: YES
Compiler for C supports function attribute warn_unused_result: YES
Compiler for C supports function attribute weak: YES
Compiler for C supports function attribute format: YES
Compiler for C supports function attribute packed: YES
Compiler for C supports function attribute returns_nonnull: YES
Compiler for C supports function attribute alias: YES
Compiler for C supports function attribute noreturn: YES
Compiler for C supports function attribute visibility:hidden: YES
Checking if “__uint128_t” compiles: YES
Checking for function “reallocarray” : NO
Compiler for C supports link arguments -Wl,–gc-sections: NO
Compiler for C supports arguments -Werror=implicit-function-declaration: YES
Compiler for C supports arguments -Werror=missing-prototypes: YES
Compiler for C supports arguments -Werror=return-type: YES
Compiler for C supports arguments -Werror=empty-body: YES
Compiler for C supports arguments -Werror=incompatible-pointer-types: YES
Compiler for C supports arguments -Werror=int-conversion: YES
Compiler for C supports arguments -Wimplicit-fallthrough: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-format-truncation: NO
Compiler for C supports arguments -fno-math-errno: YES
Compiler for C supports arguments -fno-trapping-math: YES
Compiler for C supports arguments -Qunused-arguments: YES
Compiler for C supports arguments -fno-common: YES
Compiler for C supports arguments -Wno-microsoft-enum-value: YES
Compiler for C supports arguments -Wno-unused-function: YES
Compiler for C supports arguments -Werror=format: YES
Compiler for C supports arguments -Wformat-security: YES
Compiler for C supports arguments -Werror=thread-safety: YES
Compiler for C++ supports arguments -Werror=return-type: YES
Compiler for C++ supports arguments -Werror=empty-body: YES
Compiler for C++ supports arguments -Wno-non-virtual-dtor: YES
Compiler for C++ supports arguments -Wno-missing-field-initializers: YES
Compiler for C++ supports arguments -Wno-format-truncation: NO
Compiler for C++ supports arguments -fno-math-errno: YES
Compiler for C++ supports arguments -fno-trapping-math: YES
Compiler for C++ supports arguments -Qunused-arguments: YES
Compiler for C++ supports arguments -flifetime-dse=1: NO
Compiler for C++ supports arguments -Wno-microsoft-enum-value: YES
Compiler for C++ supports arguments -Werror=format: YES
Compiler for C++ supports arguments -Wformat-security: YES
Compiler for C supports arguments -Wno-override-init: YES
Compiler for C supports arguments -Wno-initializer-overrides: YES
Compiler for C supports arguments -Werror=pointer-arith: YES
Compiler for C supports arguments -Werror=vla: YES
Compiler for C supports arguments -Werror=gnu-empty-initializer: YES
Compiler for C++ supports arguments -Werror=pointer-arith: YES
Compiler for C++ supports arguments -Werror=vla: YES
Compiler for C++ supports arguments -Werror=gnu-empty-initializer: YES
Checking if “GCC atomic builtins” compiles: YES
Checking if “GCC atomic builtins required -latomic” : links: NO
meson.build:1350:4: ERROR: C shared or static library ‘atomic’ not found
大佬们,这个报错说是找不到atomic,怎么解决呢?网上说是meson版本过低,但是更新到0.63.3版本还是报这个错误,怎么解决呢?
请问这个问题最后解决了嘛?
解决了,最后带我的老师给了我他的docker环境,这个是docker环境问题,我的因为网络等其他问题不知道少下载了哪些东西导致的