mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-04-18 10:58:18 +00:00
python3-grpcio: fix native build failure on ubuntu 16.04 and centos 8
1. Keep '-std=c++11' and '-std=gnu99' to fix native build error with old gcc (such as gcc 5.4.0 on ubuntu 16.04); for clang, remove them through setting GRPC_PYTHON_CFLAGS at do_compile in bb recipe 2. While export CC="gcc ", cc_args is empty, it will cause subprocess.Popen always return 1. On centos 8, if you don't install package libatomic, there will be a native build error `cannot find /usr/lib64/libatomic.so.1.2.0'. Add no harm '-g' to cc_args if cc_args is empty. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
@@ -23,6 +23,10 @@ inherit pypi
|
||||
|
||||
export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY = "1"
|
||||
|
||||
do_compile_prepend_toolchain-clang() {
|
||||
export GRPC_PYTHON_CFLAGS='-fvisibility=hidden -fno-wrapv -fno-exceptions'
|
||||
}
|
||||
|
||||
CLEANBROKEN = "1"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
Reference in New Issue
Block a user