Skip to contentSkip to conversation

capnproto: remove binaries from target-build, add bbclass

PATCH Gyorgy Sarvari 2 participants 5 messages Feb 3, 2025 – Feb 25, 2025 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

While looking into Ross' feedback about the first version, I realized that my sed regex didn't only have superficial problems (namely being an eyesore, and likely brittle), but it also only solved a part of the problem - it allowed to link to the cross-compiled libs, but code-generation during class-target compilation from capnproto definitions was still broken.

This patch supposed to remediate this too.

If you think that having a new class is overcomplicating the issue, I can be easily convinced about it (but please leave an alternative suggestion also).

There is 1 known caveat however: if someone would want to install the binaries from ${bindir} on the target machine, that won't work after this change. (Can't really think of any reasons however, why would one do that - this is not a user-application.)

Let me know if there's anything you'd like to change in this patch.

#2 lore raw

Hi,

we actually stumbled upon this issue because the patch also removes the binaries from the native package. As a result, our software—which requires the native binaries for compilation—no longer builds. I had to add

SRC_URI:remove = "file://0001-Don-t-check-usr-bin-content-from-cmake.patch"

to a capnproto_%.bbappend in our layer to get it working again.

One could also imagine use cases where having the capnp tools available on the target system would be beneficial. Therefore, I believe that not installing the binaries in the target package should be configurable.

Best regards,
Thomas

Quoted 26 lines · Gyorgy Sarvari via lists.openembedded.org

While looking into Ross' feedback about the first version, I realized that my sed regex didn't only have superficial problems (namely being an eyesore, and likely brittle), but it also only solved a part of the problem - it allowed to link to the cross-compiled libs, but code-generation during class-target compilation from capnproto definitions was still broken.

This patch supposed to remediate this too.

If you think that having a new class is overcomplicating the issue, I can be easily convinced about it (but please leave an alternative suggestion also).

There is 1 known caveat however: if someone would want to install the binaries from ${bindir} on the target machine, that won't work after this change. (Can't really think of any reasons however, why would one do that - this is not a user-application.)

Let me know if there's anything you'd like to change in this patch.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#115239): https://lists.openembedded.org/g/openembedded-devel/message/115239
Mute This Topic: https://lists.openembedded.org/mt/110969312/8357607
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 11 lines
Dr.-Ing. Thomas Schlien
Ferncast GmbH
Gallierstr. 41a, 52074 Aachen
Germany

Phone: +49 241 99034567
Web:   www.ferncast.de
--
CEO: Detlef Wiese
Court of Registration: Amtsgericht Aachen
Commercial Register: HRB 22350
#3 lore raw

Hmmm, the native part wasn't supposed to be touched... but now that you mention, I think I see where my error is.

Thanks for the feedback, will try to look into this later today (unless someone else is faster). Not sure about the class-target part, but will try to check on that too, if I can find a more graceful solution.

Quoted 51 lines · Thomas Schlien

Hi,

we actually stumbled upon this issue because the patch also removes the binaries from the native package. As a result, our software—which requires the native binaries for compilation—no longer builds. I had to add

SRC_URI:remove = "file://0001-Don-t-check-usr-bin-content-from-cmake.patch"

to a capnproto_%.bbappend in our layer to get it working again.

One could also imagine use cases where having the capnp tools available on the target system would be beneficial. Therefore, I believe that not installing the binaries in the target package should be configurable.

Best regards,
Thomas

Quoted 33 lines · Gyorgy Sarvari via lists.openembedded.org

While looking into Ross' feedback about the first version, I realized that my
sed regex didn't only have superficial problems (namely being an eyesore, and
likely brittle), but it also only solved a part of the problem - it allowed to
link to the cross-compiled libs, but code-generation during class-target compilation from capnproto definitions was still broken.

This patch supposed to remediate this too.

If you think that having a new class is overcomplicating the issue, I can be easily
convinced about it (but please leave an alternative suggestion also).

There is 1 known caveat however: if someone would want to install the binaries
from ${bindir} on the target machine, that won't work after this change. (Can't
really think of any reasons however, why would one do that - this is not a user-application.)

Let me know if there's anything you'd like to change in this patch.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#115239): https://lists.openembedded.org/g/openembedded-devel/message/115239
Mute This Topic: https://lists.openembedded.org/mt/110969312/8357607
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#4 lore raw

I like the idea of the class-target, but we were not able to get it running in our environment for now, even when removing the patch file. Everything looks correct, but the "find_package..." in cmake is not able to find the capnp binaries. It would be nice to have this working since when then could remove our ugly hack. ;-)

Quoted 63 lines · Gyorgy Sarvari via lists.openembedded.org

Hmmm, the native part wasn't supposed to be touched... but now that you mention, I think I see where my error is.

Thanks for the feedback, will try to look into this later today (unless someone else is faster). Not sure about the class-target part, but will try to check on that too, if I can find a more graceful solution.

Quoted 54 lines · Thomas Schlien

Hi,

we actually stumbled upon this issue because the patch also removes the binaries from the native package. As a result, our software—which requires the native binaries for compilation—no longer builds. I had to add

SRC_URI:remove = "file://0001-Don-t-check-usr-bin-content-from-cmake.patch"

to a capnproto_%.bbappend in our layer to get it working again.

One could also imagine use cases where having the capnp tools available on the target system would be beneficial. Therefore, I believe that not installing the binaries in the target package should be configurable.

Best regards,
Thomas

Quoted 36 lines · Gyorgy Sarvari via lists.openembedded.org

While looking into Ross' feedback about the first version, I realized that my
sed regex didn't only have superficial problems (namely being an eyesore, and
likely brittle), but it also only solved a part of the problem - it allowed to
link to the cross-compiled libs, but code-generation during class-target compilation from capnproto definitions was still broken.

This patch supposed to remediate this too.

If you think that having a new class is overcomplicating the issue, I can be easily
convinced about it (but please leave an alternative suggestion also).

There is 1 known caveat however: if someone would want to install the binaries
from ${bindir} on the target machine, that won't work after this change. (Can't
really think of any reasons however, why would one do that - this is not a user-application.)

Let me know if there's anything you'd like to change in this patch.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#115566): https://lists.openembedded.org/g/openembedded-devel/message/115566
Mute This Topic: https://lists.openembedded.org/mt/110969312/8357607
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 11 lines
Dr.-Ing. Thomas Schlien
Ferncast GmbH
Gallierstr. 41a, 52074 Aachen
Germany

Phone: +49 241 99034567
Web:   www.ferncast.de
--
CEO: Detlef Wiese
Court of Registration: Amtsgericht Aachen
Commercial Register: HRB 22350
#5 lore raw
Quoted 6 lines · Thomas Schlien

I like the idea of the class-target, but we were not able to get it running in our environment for now, even when removing the patch file. Everything looks correct, but the "find_package..." in cmake is not able to find the capnp binaries. It would be nice to have this working since when then could remove our ugly hack. ;-)

I have submitted a new version, please feel free to give it a go. The relevant capnproto binaries should be installed now for both class-native and class-target also (but only on the actual target-machine of course, not in RECIPE_SYSROOT).

Though I couldn't try to use the generated cmake files on a target machine, I think it will need the same cmake arguments (with the correct value) that you can find specified in capnproto.bbclass also.