Skip to contentSkip to conversation

nanbield: grpc_1.56.2 fails nativesdk build

OE-core Joakim Tjernlund 2 participants 7 messages Feb 13, 2024 – Feb 14, 2024 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 28 lines · Joakim Tjernlund via lists.openembedded.org

Whatever I try I always get:

Quoted 8 lines

The imported target "protobuf::protoc" references the file

     "/home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/bin/protoc-23.4.0"

but this file does not exist. Possible reasons include:

* The file was deleted, renamed, or moved to another location.

Quoted 7 lines

* An install or uninstall procedure did not complete successfully.

* The installation package was faulty and contained

     "/home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/lib/cmake/protobuf/protobuf-targets.cmake"

but not all the files it references.

Looking at failing path:
s /home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/ ./ ../ include/ lib/ share/

There in no bin dir at all. In lib there are lots of libs, including libprotobuf-c.so To me it feels like bitbake somehow failed to install required bin/protoc-23.4.0 files but misses the bin files as these are normally not needed when building.

or perhaps it is rewriting the passed path? What is passed to cmake is:
"/home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot-native/usr/bin/protoc"

Quoted 7 lines

but bitbake somehow rewrite this to:

"/home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/bin/protoc-23.4.0"

Notice the change to "recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/" in the middle.

Joakim

FYI, this works around the problem:
cat ./meta-xr/recipes-devtools/grpc/grpc_%.bbappend
#Hack the nativesdk-grpc, copy protobuf's protoc* from sysroot to ${SDKPATHNATIVE} #For some reason nativesdk-grpc will not find it and build fails otherwise. #Unclear what the bug is but suspect upstream bug

do_configure:prepend:class-nativesdk () {
    MY_PREFIX="${TOPDIR}/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/${PV}"
    MY_FROM="/recipe-sysroot-native/usr/bin/"
    MY_TO="/recipe-sysroot/${SDKPATHNATIVE}/usr/bin/"
    mkdir -p "${MY_PREFIX}${MY_TO}" # Create missing DEST dir
    cp -ap "${MY_PREFIX}${MY_FROM}"protoc* "${MY_PREFIX}${MY_TO}"
}

CCing you Steve should you have missed this report.

Joakim

#2 lore raw

Joakim,
I answered you last week on the this topic. Quoting it again:

Could this https://git.openembedded.org/meta-openembedded/commit/meta-oe/recipes-devtools/protobuf?id=b1deec0de476d8f0a0c6427919f57ee5f681ea0e fix your failure?

Note, oe-core is a wrong list for this discussion, I changed the CC accordingly.

Slava

Quoted 52 lines · Joakim Tjernlund via lists.openembedded.org
Quoted 27 lines · Joakim Tjernlund via lists.openembedded.org

Whatever I try I always get:

Quoted 8 lines

The imported target "protobuf::protoc" references the file

      "/home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/bin/protoc-23.4.0"

but this file does not exist. Possible reasons include:

* The file was deleted, renamed, or moved to another location.

Quoted 7 lines

* An install or uninstall procedure did not complete successfully.

* The installation package was faulty and contained

      "/home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/lib/cmake/protobuf/protobuf-targets.cmake"

but not all the files it references.

Looking at failing path:
s /home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/ ./ ../ include/ lib/ share/

There in no bin dir at all. In lib there are lots of libs, including libprotobuf-c.so To me it feels like bitbake somehow failed to install required bin/protoc-23.4.0 files but misses the bin files as these are normally not needed when building.

or perhaps it is rewriting the passed path? What is passed to cmake is:
"/home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot-native/usr/bin/protoc"

Quoted 7 lines

but bitbake somehow rewrite this to:

"/home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/bin/protoc-23.4.0"

Notice the change to "recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/" in the middle.

Joakim

FYI, this works around the problem:
cat ./meta-xr/recipes-devtools/grpc/grpc_%.bbappend
#Hack the nativesdk-grpc, copy protobuf's protoc* from sysroot to ${SDKPATHNATIVE} #For some reason nativesdk-grpc will not find it and build fails otherwise. #Unclear what the bug is but suspect upstream bug

do_configure:prepend:class-nativesdk () {
     MY_PREFIX="${TOPDIR}/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/${PV}"
     MY_FROM="/recipe-sysroot-native/usr/bin/"
     MY_TO="/recipe-sysroot/${SDKPATHNATIVE}/usr/bin/"
     mkdir -p "${MY_PREFIX}${MY_TO}" # Create missing DEST dir
     cp -ap "${MY_PREFIX}${MY_FROM}"protoc* "${MY_PREFIX}${MY_TO}"
}

CCing you Steve should you have missed this report.

Joakim

#3 lore raw
Quoted 2 lines · Vyacheslav Yurkov

Joakim,
I answered you last week on the this topic. Quoting it again:

ahh, somehow I missed that, sorry. I will check and report

Joakim

Quoted 64 lines

Could this
https://git.openembedded.org/meta-openembedded/commit/meta-oe/recipes-devtools/protobuf?id=b1deec0de476d8f0a0c6427919f57ee5f681ea0e
fix your failure?

Note, oe-core is a wrong list for this discussion, I changed the CC accordingly.

Slava

Quoted 52 lines · Joakim Tjernlund via lists.openembedded.org
Quoted 27 lines · Joakim Tjernlund via lists.openembedded.org

Whatever I try I always get:

Quoted 8 lines

The imported target "protobuf::protoc" references the file

      "/home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/bin/protoc-23.4.0"

but this file does not exist. Possible reasons include:

* The file was deleted, renamed, or moved to another location.

Quoted 7 lines

* An install or uninstall procedure did not complete successfully.

* The installation package was faulty and contained

      "/home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/lib/cmake/protobuf/protobuf-targets.cmake"

but not all the files it references.

Looking at failing path:
s /home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/ ./ ../ include/ lib/ share/

There in no bin dir at all. In lib there are lots of libs, including libprotobuf-c.so To me it feels like bitbake somehow failed to install required bin/protoc-23.4.0 files but misses the bin files as these are normally not needed when building.

or perhaps it is rewriting the passed path? What is passed to cmake is:
"/home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot-native/usr/bin/protoc"

Quoted 7 lines

but bitbake somehow rewrite this to:

"/home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/bin/protoc-23.4.0"

Notice the change to "recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/" in the middle.

Joakim

FYI, this works around the problem:
cat ./meta-xr/recipes-devtools/grpc/grpc_%.bbappend
#Hack the nativesdk-grpc, copy protobuf's protoc* from sysroot to ${SDKPATHNATIVE} #For some reason nativesdk-grpc will not find it and build fails otherwise. #Unclear what the bug is but suspect upstream bug

do_configure:prepend:class-nativesdk () {
     MY_PREFIX="${TOPDIR}/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/${PV}"
     MY_FROM="/recipe-sysroot-native/usr/bin/"
     MY_TO="/recipe-sysroot/${SDKPATHNATIVE}/usr/bin/"
     mkdir -p "${MY_PREFIX}${MY_TO}" # Create missing DEST dir
     cp -ap "${MY_PREFIX}${MY_FROM}"protoc* "${MY_PREFIX}${MY_TO}"
}

CCing you Steve should you have missed this report.

Joakim

#4 lore raw
Quoted 5 lines · Joakim Tjernlund
Quoted 2 lines · Vyacheslav Yurkov

Joakim,
I answered you last week on the this topic. Quoting it again:

ahh, somehow I missed that, sorry. I will check and report

Tested and works too, but I see this patch was reverted:

Revert "protobuf: stage protoc binary to sysroot"

This reverts commit a0557fe5433620717eeb00d3b16801711337b1a4.

As said by Ross[Ø]:
"Putting the _target_ protoc into the sysroot for executation at _build_ time isn't useful because even if it has the right architecture, the tune might be incompatible. Recipes which want protoc should just depend on protobuf-native."

This has been reverted recently by Samuli[1]:
"If protoc is enabled for the build, recipes using protobuf will fail when protoc is not available in the recipe sysroot"

Be the revert is incorret as This is an issue coming from qtgrpc other recipes that use protobuf or gRPC compiler, proplery looks for the binary in the correct sysroot folder.

Qtgrpc recipe should fix this issue at the recipe level, for example this is what I've done for "etcd-cpp-apiv3" recipe[2] that doesn't need this patch to properly compile.

So keeping this hack doesn't seems to be a correct fix.

Note that qtgrpc recipe isn't available on meta-oe nor any other public layers.

0: https://patchwork.yoctoproject.org/project/oe/patch/[email protected]/
1: https://patchwork.yoctoproject.org/project/oe/patch/[email protected]/
2: https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3/commit/47f0d9e0326f3cc31c801a0ecf7312d1049ece3e

CC Samuli Piippo <[email protected]>
CC Ross Burton <[email protected]>
(cherry picked from commit bfb626a23022d871ce3c0c64cb9e5d1cc17c737e)

So then what is the correct fix for grpc ?

Joakim

Quoted 68 lines

Joakim

Quoted 64 lines

Could this
https://git.openembedded.org/meta-openembedded/commit/meta-oe/recipes-devtools/protobuf?id=b1deec0de476d8f0a0c6427919f57ee5f681ea0e
fix your failure?

Note, oe-core is a wrong list for this discussion, I changed the CC accordingly.

Slava

Quoted 52 lines · Joakim Tjernlund via lists.openembedded.org
Quoted 27 lines · Joakim Tjernlund via lists.openembedded.org

Whatever I try I always get:

Quoted 8 lines

The imported target "protobuf::protoc" references the file

      "/home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/bin/protoc-23.4.0"

but this file does not exist. Possible reasons include:

* The file was deleted, renamed, or moved to another location.

Quoted 7 lines

* An install or uninstall procedure did not complete successfully.

* The installation package was faulty and contained

      "/home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/lib/cmake/protobuf/protobuf-targets.cmake"

but not all the files it references.

Looking at failing path:
s /home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/ ./ ../ include/ lib/ share/

There in no bin dir at all. In lib there are lots of libs, including libprotobuf-c.so To me it feels like bitbake somehow failed to install required bin/protoc-23.4.0 files but misses the bin files as these are normally not needed when building.

or perhaps it is rewriting the passed path? What is passed to cmake is:
"/home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot-native/usr/bin/protoc"

Quoted 7 lines

but bitbake somehow rewrite this to:

"/home/jocke/yocto-xr/build/infn-xr/gmcu/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/1.56.2/recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/bin/protoc-23.4.0"

Notice the change to "recipe-sysroot/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/" in the middle.

Joakim

FYI, this works around the problem:
cat ./meta-xr/recipes-devtools/grpc/grpc_%.bbappend
#Hack the nativesdk-grpc, copy protobuf's protoc* from sysroot to ${SDKPATHNATIVE} #For some reason nativesdk-grpc will not find it and build fails otherwise. #Unclear what the bug is but suspect upstream bug

do_configure:prepend:class-nativesdk () {
     MY_PREFIX="${TOPDIR}/tmp/work/x86_64-nativesdk-xrsdk-linux/nativesdk-grpc/${PV}"
     MY_FROM="/recipe-sysroot-native/usr/bin/"
     MY_TO="/recipe-sysroot/${SDKPATHNATIVE}/usr/bin/"
     mkdir -p "${MY_PREFIX}${MY_TO}" # Create missing DEST dir
     cp -ap "${MY_PREFIX}${MY_FROM}"protoc* "${MY_PREFIX}${MY_TO}"
}

CCing you Steve should you have missed this report.

Joakim

#5 lore raw
Quoted 41 lines · Joakim Tjernlund

Tested and works too, but I see this patch was reverted:

Revert "protobuf: stage protoc binary to sysroot"

This reverts commit a0557fe5433620717eeb00d3b16801711337b1a4.

As said by Ross[Ø]:
"Putting the _target_ protoc into the sysroot for executation at _build_ time isn't useful because even if it has the right architecture, the tune might be incompatible. Recipes which want protoc should just depend on protobuf-native."

This has been reverted recently by Samuli[1]:
"If protoc is enabled for the build, recipes using protobuf will fail when protoc is not available in the recipe sysroot"

Be the revert is incorret as This is an issue coming from qtgrpc other recipes that use protobuf or gRPC compiler, proplery looks for the binary in the correct sysroot folder.

Qtgrpc recipe should fix this issue at the recipe level, for example this is what I've done for "etcd-cpp-apiv3" recipe[2] that doesn't need this patch to properly compile.

So keeping this hack doesn't seems to be a correct fix.

Note that qtgrpc recipe isn't available on meta-oe nor any other public layers.

0:https://patchwork.yoctoproject.org/project/oe/patch/[email protected]/ 1:https://patchwork.yoctoproject.org/project/oe/patch/[email protected]/ 2:https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3/commit/47f0d9e0326f3cc31c801a0ecf7312d1049ece3e

CC Samuli Piippo<[email protected]>
CC Ross Burton<[email protected]>
(cherry picked from commit bfb626a23022d871ce3c0c64cb9e5d1cc17c737e)
Quoted 4 lines

So then what is the correct fix for grpc ?

Joakim

Reverted and then applied again :)

If you are interested, see the full discussion here https://lists.openembedded.org/g/openembedded-devel/topic/101679410#105284

Slava

#6 lore raw

On Tue, 2024-02-13 at 19:40 +0100, Vyacheslav Yurkov via lists.openembedded.org wrote:
On 13.02.2024 16:19, Joakim Tjernlund wrote:

Tested and works too, but I see this patch was reverted:

Revert "protobuf: stage protoc binary to sysroot"

This reverts commit a0557fe5433620717eeb00d3b16801711337b1a4.

As said by Ross[Ø]:

"Putting the _target_ protoc into the sysroot for executation at _build_

time isn't useful because even if it has the right architecture, the

tune might be incompatible. Recipes which want protoc should just depend

on protobuf-native."

This has been reverted recently by Samuli[1]:

"If protoc is enabled for the build, recipes using protobuf will

fail when protoc is not available in the recipe sysroot"

Be the revert is incorret as This is an issue coming from qtgrpc

other recipes that use protobuf or gRPC compiler, proplery looks for

the binary in the correct sysroot folder.

Qtgrpc recipe should fix this issue at the recipe level, for example this

is what I've done for "etcd-cpp-apiv3" recipe[2] that doesn't need this

patch to properly compile.

So keeping this hack doesn't seems to be a correct fix.

Note that qtgrpc recipe isn't available on meta-oe nor any other public

layers.

0: https://patchwork.yoctoproject.org/project/oe/patch/[email protected]/

1: https://patchwork.yoctoproject.org/project/oe/patch/[email protected]/

2: https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3/commit/47f0d9e0326f3cc31c801a0ecf7312d1049ece3e

CC Samuli Piippo <[email protected]><mailto:[email protected]>
CC Ross Burton <[email protected]><mailto:[email protected]>

(cherry picked from commit bfb626a23022d871ce3c0c64cb9e5d1cc17c737e)

So then what is the correct fix for grpc ?

Joakim

Reverted and then applied again :)

If you are interested, see the full discussion herehttps://lists.openembedded.org/g/openembedded-devel/topic/101679410#105284

Read the thread, seems to be some consensus but I cannot see it reapplied again and that is why my nativesdk is failing. Steve?

Joakim

Slava

-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.

View/Reply Online (#195426): https://lists.openembedded.org/g/openembedded-core/message/195426

Mute This Topic: https://lists.openembedded.org/mt/104260010/7472049

Group Owner: [email protected]<mailto:[email protected]>

Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]<mailto:[email protected]>]

-=-=-=-=-=-=-=-=-=-=-=-

#7 lore raw
Quoted 9 lines · Joakim Tjernlund
Quoted 4 lines

Reverted and then applied again :)

If you are interested, see the full discussion herehttps://lists.openembedded.org/g/openembedded-devel/topic/101679410#105284

Read the thread, seems to be some consensus but I cannot see it reapplied again and that is why my nativesdk is failing. Steve?

 Joakim

It's in master, but not in nanbield.

FTR, I removed oe-core from the recipient list, because it's a topic for openembedded-devel.

Slava