glibc: fix multilib headers conflict for arm
PATCH v2 1/1 glibc: fix multilib headers conflict for arm
From: Kai Kang <[email protected]>
The header files conflic when multilib enabled for arm:
| Error: Transaction test error:
| file /usr/include/finclude/math-vector-fortran.h conflicts between attempted installs of
lib32-libc6-dev-2.39+git0+312e159626-r0.armv7at2hf_neon and libc6-dev-2.39+git0+312e159626-r0.cortexa72
Invoke function oe_multilib_header to resolve it.
But gfortran-cross can NOT recognize macros such as #ifdef as expected, so pass option -nostdinc to gfortran-cross-aarch64 that not preinclude multilib specific math-vector-fortran.h [1].
--- meta/conf/bitbake.conf | 5 ++++- meta/recipes-core/glibc/glibc-package.inc | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-)
meta/conf/bitbake.conf +4 -1
@@ -555,11 +555,14 @@ HOSTTOOLS_NONFATAL += "git-lfs" CCACHE ??= "" +FC_OPTIONS ??= "" +FC_OPTIONS:append:aarch64 = " -nostdinc" + TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" -export FC = "${HOST_PREFIX}gfortran ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" +export FC = "${HOST_PREFIX}gfortran ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}${FC_OPTIONS}" export CPP = "${HOST_PREFIX}gcc -E${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}" export LD = "${HOST_PREFIX}ld${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}" export CCLD = "${CC}"
meta/recipes-core/glibc/glibc-package.inc +2 -0
@@ -167,6 +167,8 @@ do_install_armmultilib () { oe_multilib_header fpu_control.h gnu/lib-names.h gnu/stubs.h ieee754.h oe_multilib_header sys/elf.h sys/procfs.h sys/ptrace.h sys/ucontext.h sys/user.h + + oe_multilib_header finclude/math-vector-fortran.h }
Signature · 1 line
2.34.1
Quoted 33 lines · Kai Kang via lists.openembedded.org
From: Kai Kang <[email protected]>
The header files conflic when multilib enabled for arm:
Quoted 2 lines
Error: Transaction test error:
file/usr/include/finclude/math-vector-fortran.hconflicts between attempted installs oflib32-libc6-dev-2.39+git0+312e159626-r0.armv7at2hf_neon and libc6-dev-2.39+git0+312e159626-r0.cortexa72
Invoke function
oe_multilib_headerto resolve it.But gfortran-cross can NOT recognize macros such as
#ifdefas expected, so pass option-nostdincto gfortran-cross-aarch64 that not preinclude multilib specificmath-vector-fortran.h[1].Signed-off-by Kai Kang <[email protected]>---
meta/conf/bitbake.conf | 5 ++++- meta/recipes-core/glibc/glibc-package.inc | 2 ++2 files changed, 6 insertions(+), 1 deletion(-)meta/conf/bitbake.conf +0
-0@@ -555,11 +555,14 @@ HOSTTOOLS_NONFATAL += "git-lfs"
CCACHE ??= ""meta/conf/bitbake.conf +3
-0+FC_OPTIONS ??= "" +FC_OPTIONS:append:aarch64 = " -nostdinc" +
Quoted 2 lines
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
Does nostdinc not have other fairly nasty side effects such as requiring application level changes to ensure headers are included?
A lot of these fixes feel like the solution is worse and more risky than the original problem :(.
Cheers,
Richard