Something seems wrong with this change which was merged today, now with:
MACHINE=qemuarm64
FORTRAN:forcevariable = ",fortran"

I'm seeing:
build/oe-core $ bitbake -g nativesdk-libgfortran
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'gcc-cross-x86_64' (but
virtual:nativesdk:/OE/build/oe-core/openembedded-core/meta/recipes-devtools/gcc/libgfortran_14.1.bb
DEPENDS on or otherwise requires it). Close matches:
  gcc-cross-aarch64
...

This might have been broken even before this change, but now it got
included in dependency tree of nativesdk-gcc (as shown in bitbake -g
nativesdk-gcc now failing when host and target arch don't match):

"nativesdk-gcc.do_package_qa" -> "nativesdk-libgfortran.do_packagedata"
nativesdk-gcc.do_package_write_ipk" -> "nativesdk-libgfortran.do_packagedata"

Missing or unbuildable dependency chain was: ['image',
'nativesdk-packagegroup-sdk-host', 'nativesdk-lcov',
'nativesdk-gcov-symlinks', 'nativesdk-libgfortran-dev',
'gcc-cross-x86_64']

I guess the easiest fix would be in:
meta/recipes-devtools/gcc/libgfortran.inc:DEPENDS = "gcc-runtime
gcc-cross-${TARGET_ARCH}"
but I'm not very familiar with fortran (we've enabled it long time ago
to build lapack(blas) for snowboy, but wasn't actively used for couple
years).

Regards,



On Sun, Jun 16, 2024 at 5:32 PM Kai Kang via lists.openembedded.org
<kai.kang=windriver....@lists.openembedded.org> wrote:
>
> From: Kai Kang <kai.k...@windriver.com>
>
> It fails to run both `gcc` and `gfortran` with errors:
>
> | root@qemux86-64:~# x86_64-poky-linux-gcc a.c
> | x86_64-poky-linux-gcc: fatal error: cannot execute 'as': posix_spawnp: No 
> such file or directory
>
> then add binutils which provides `as` to RDEPENDS of gcc.
>
> libgfortran-dev provides libgfortran.spec which required by gfortran:
>
> | root@qemux86-64:~# gfortran hello.f95
> | gfortran: fatal error: cannot read spec file 'libgfortran.spec': No such 
> file or directory
>
> And gcc provides liblto_plugin.so:
>
> | root@qemux86-64:~# gfortran hello.f95
> | gfortran: fatal error: '-fuse-linker-plugin', but liblto_plugin.so not found
>
> Signed-off-by: Kai Kang <kai.k...@windriver.com>
> ---
>  meta/recipes-devtools/gcc/gcc-target.inc | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/gcc/gcc-target.inc 
> b/meta/recipes-devtools/gcc/gcc-target.inc
> index 8e9693b4cb..e9187fc444 100644
> --- a/meta/recipes-devtools/gcc/gcc-target.inc
> +++ b/meta/recipes-devtools/gcc/gcc-target.inc
> @@ -33,7 +33,7 @@ PACKAGES = "\
>      ${PN} ${PN}-plugins ${PN}-symlinks \
>      g++ g++-symlinks \
>      cpp cpp-symlinks \
> -    gfortran gfortran-symlinks \
> +    ${@bb.utils.contains('FORTRAN', ',fortran', 'gfortran 
> gfortran-symlinks', '', d)} \
>      gcov gcov-symlinks \
>      ${PN}-doc \
>      ${PN}-dev \
> @@ -60,7 +60,7 @@ RRECOMMENDS:${PN} += "\
>      libssp \
>      libssp-dev \
>  "
> -RDEPENDS:${PN} += "cpp"
> +RDEPENDS:${PN} += "binutils cpp"
>
>  FILES:${PN}-dev = "\
>      ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
> @@ -80,10 +80,15 @@ FILES:${PN}-plugins = "\
>  "
>  ALLOW_EMPTY:${PN}-plugins = "1"
>
> +INSANE_SKIP:${MLPREFIX}gfortran += "dev-deps"
>  FILES:gfortran = "\
>      ${bindir}/${TARGET_PREFIX}gfortran \
>      ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \
>  "
> +RDEPENDS:gfortran = "\
> +    gcc \
> +    libgfortran-dev \
> +"
>  RRECOMMENDS:gfortran = "\
>      libquadmath \
>      libquadmath-dev \
> --
> 2.34.1
>
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#200913): 
https://lists.openembedded.org/g/openembedded-core/message/200913
Mute This Topic: https://lists.openembedded.org/mt/106704990/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to