On Mon, Feb 26, 2024 at 2:32 PM Martin Jansa via
lists.openembedded.org <[email protected]>
wrote:
>
> * on some hosts (e.g. on my gentoo after recent update) it detects OpenMP in 
> do_configure:
>   Run-time dependency OpenMP found: YES 4.5
>   but then fails in do_compile as shown in:
>   http://errors.yoctoproject.org/Errors/Details/754632/
>
>   gcc  -o test/fetch-test test/fetch-test.p/fetch-test.c.o 
> -LTOPDIR/tmp-glibc/work/x86_64-linux/pixman-native/0.42.2/recipe-sysroot-native/usr/lib
>  
> -LTOPDIR/tmp-glibc/work/x86_64-linux/pixman-native/0.42.2/recipe-sysroot-native/lib
>  -Wl,--as-needed -Wl,--no-undefined -Wl,--enable-new-dtags 
> -Wl,-rpath-link,TOPDIR/tmp-glibc/work/x86_64-linux/pixman-native/0.42.2/recipe-sysroot-native/usr/lib
>  
> -Wl,-rpath-link,TOPDIR/tmp-glibc/work/x86_64-linux/pixman-native/0.42.2/recipe-sysroot-native/lib
>  
> -Wl,-rpath,TOPDIR/tmp-glibc/work/x86_64-linux/pixman-native/0.42.2/recipe-sysroot-native/usr/lib
>  
> -Wl,-rpath,TOPDIR/tmp-glibc/work/x86_64-linux/pixman-native/0.42.2/recipe-sysroot-native/lib
>  -Wl,-O1 '-Wl,-rpath,$ORIGIN/../pixman' 
> -Wl,-rpath-link,TOPDIR/tmp-glibc/work/x86_64-linux/pixman-native/0.42.2/build/pixman
>  -Wl,--start-group test/libtestutils.a pixman/libpixman-1.so.0.42.2 -pthread 
> -fopenmp -fopenmp -lm -Wl,--end-group
>   gcc: fatal error: cannot read spec file ‘libgomp.spec’: No such file or 
> directory
>   compilation terminated.
>
>   it's only used in tests, so should be safe to disable for native builds
>
> * the check in meson uses /usr/include/omp.h which is provided by libomp
>   even when openmp support is disabled in native gcc in gentoo this happned
>   after switching from 17.1 profile to 23.0 which doesn't include openmp
>   USE flag by default, if you later run depclean it will uninstall libomp
>   as well which will fix this conflict in meson's OpenMP autodetection

Just FYI, even after uninstalling libomp you will get do_package failures like:
recipe-sysroot-native/usr/lib/rpm/rpmdeps: error while loading shared
libraries: libgomp.so.1: cannot open shared object file: No such file
or directory

until you manually cleansstate rpm-native to rebuild it without openmp
support (and you need to make sure not to re-use rpm-native from
sstate built on some other host with openmp enabled).

And rebuilding rpm-native without openmp support on host will
currently fail with:
| CMake Error at
/OE/build/tmp-glibc/work/x86_64-linux/rpm-native/4.19.1/recipe-sysroot-native/usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230
(message):
|   Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
|   (Required is at least version "4.5")

I'm not sure why openmp ended disabled in 23.0 gentoo profile, looks
like it should still be enabled through make.defaults even for 23.0:
/usr/portage/profiles/releases/17.0/make.defaults:USE="${USE} fortran openmp"
/usr/portage/profiles/use.desc:openmp - Build support for the OpenMP
(support parallel computing), requires >=sys-devel/gcc-4.2 built with
USE="openmp"
/usr/portage/profiles/prefix/linux/make.defaults:USE="${USE} openmp"

might be temporary issue as 23.0 profile is experimental and not for production:
https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_profile_transition

Regards,

> Signed-off-by: Martin Jansa <[email protected]>
> ---
>  meta/recipes-graphics/xorg-lib/pixman_0.42.2.bb | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-graphics/xorg-lib/pixman_0.42.2.bb 
> b/meta/recipes-graphics/xorg-lib/pixman_0.42.2.bb
> index 8a93f8c0fe..23ae0cbb27 100644
> --- a/meta/recipes-graphics/xorg-lib/pixman_0.42.2.bb
> +++ b/meta/recipes-graphics/xorg-lib/pixman_0.42.2.bb
> @@ -40,6 +40,8 @@ EXTRA_OEMESON:append:class-target:powerpc64le = " 
> ${@bb.utils.contains("TUNE_FEA
>  EXTRA_OEMESON:append:armv7a = 
> "${@bb.utils.contains("TUNE_FEATURES","neon",""," -Dneon=disabled",d)}"
>  EXTRA_OEMESON:append:armv7ve = 
> "${@bb.utils.contains("TUNE_FEATURES","neon",""," -Dneon=disabled",d)}"
>
> +EXTRA_OEMESON:append:class-native = " -Dopenmp=disabled"
> +
>  BBCLASSEXTEND = "native nativesdk"
>
>  CVE_STATUS[CVE-2023-37769] = "not-applicable-config: stress-test is an 
> uninstalled test"
> --
> 2.44.0
>
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196203): 
https://lists.openembedded.org/g/openembedded-core/message/196203
Mute This Topic: https://lists.openembedded.org/mt/104581651/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to