1. Delete the build_package PACKAGECONFIG - it is used to build a deb/rpm 
package,
which is handled by Yocto.
2. Add the required build time dependencies for the other PACKAGECONFIG options,
as many of them were broken, and the build failed when they were enabled. 
(otlp_grpc,
otlp_http, otlp_prometheus, testing).
3. Switch to gitsm:// protocol in SRC_URI, as some of the PACKAGECONFIG options
do use some of the submodules included in the main repository.
4. Add EXTRA_OECMAKE arguments: OTELCPP_VERSIONED_LIBS and BUILD_SHARED_LIBS are
required to generated versioned libraries, and avoid triggering the dev-elf qa 
check
with the PACKAGECONFIG options that generate a SO file.
PROTOBUF_PROTOC_EXECUTABLE is used by otlp_grpc and otlp_http PACKAGECONFIGs 
only,
however this long option makes PACKAGECONFIG very hard to read - so added here.

Signed-off-by: Gyorgy Sarvari <[email protected]>
---
 .../opentelemetry/opentelemetry-cpp_1.17.0.bb | 25 +++++++++++--------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/meta-oe/recipes-support/opentelemetry/opentelemetry-cpp_1.17.0.bb 
b/meta-oe/recipes-support/opentelemetry/opentelemetry-cpp_1.17.0.bb
index 04e43d99c..50e6bbeba 100644
--- a/meta-oe/recipes-support/opentelemetry/opentelemetry-cpp_1.17.0.bb
+++ b/meta-oe/recipes-support/opentelemetry/opentelemetry-cpp_1.17.0.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = 
"file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
 
 DEPENDS = "nlohmann-json"
 
-SRC_URI = 
"git://github.com/open-telemetry/opentelemetry-cpp.git;protocol=https;branch=main
 \
+SRC_URI = 
"gitsm://github.com/open-telemetry/opentelemetry-cpp.git;protocol=https;branch=main
 \
            file://0001-Fix-build-with-clang-19.patch"
 SRCREV = "fa0a5200ddbe9ae6f487a228e658aedc102dab56"
 
@@ -17,13 +17,18 @@ inherit cmake pkgconfig lib_package
 
 LDFLAGS:append:riscv32 = " -latomic"
 
-PACKAGECONFIG ?= "opentelemety_install otlp_api"
 
-PACKAGECONFIG[opentelemety_install]="-DOPENTELEMETRY_INSTALL=ON,-DOPENTELEMETRY_INSTALL=OFF"
-PACKAGECONFIG[build_package]="-DBUILD_PACKAGE=ON,-DBUILD_PACKAGE=OFF"
-PACKAGECONFIG[otlp_api]="-DWITH_OTLP_API=ON,-DWITH_OTLP_API=OFF"
-PACKAGECONFIG[otlp_grpc]="-DWITH_OTLP_GRPC=ON,-DWITH_OTLP_GRPC=OFF"
-PACKAGECONFIG[otlp_http]="-DWITH_OTLP_HTTP=ON,-DWITH_OTLP_HTTP=OFF"
-PACKAGECONFIG[otlp_prometheus]="-DWITH_PROMETHEUS=ON,-DWITH_PROMETHEUS=OFF"
-PACKAGECONFIG[benchmark]="-DWITH_BENCHMARK=ON,-DWITH_BENCHMARK=OFF"
-PACKAGECONFIG[testing]="-DBUILD_TESTING=ON,-DBUILD_TESTING=OFF"
+EXTRA_OECMAKE:append = " 
-DPROTOBUF_PROTOC_EXECUTABLE=${RECIPE_SYSROOT_NATIVE}${bindir}/protoc \
+                         -DOTELCPP_VERSIONED_LIBS=ON \
+                         -DBUILD_SHARED_LIBS=ON "
+
+PACKAGECONFIG ?= "opentelemetry_install otlp_api"
+
+PACKAGECONFIG[opentelemetry_install]="-DOPENTELEMETRY_INSTALL=ON, 
-DOPENTELEMETRY_INSTALL=OFF"
+PACKAGECONFIG[otlp_api]="-DWITH_OTLP_API=ON, -DWITH_OTLP_API=OFF"
+PACKAGECONFIG[otlp_grpc]="-DWITH_OTLP_GRPC=ON -DWITH_ABSEIL=ON, 
-DWITH_OTLP_GRPC=OFF, grpc grpc-native protobuf-native"
+PACKAGECONFIG[otlp_http]="-DWITH_OTLP_HTTP=ON -DWITH_ABSEIL=ON, 
-DWITH_OTLP_HTTP=OFF, protobuf protobuf-native curl"
+PACKAGECONFIG[otlp_prometheus]="-DWITH_PROMETHEUS=ON 
-DUSE_THIRDPARTY_LIBRARIES=OFF, \
+                                -DWITH_PROMETHEUS=OFF, civetweb curl"
+PACKAGECONFIG[benchmark]="-DWITH_BENCHMARK=ON, -DWITH_BENCHMARK=OFF"
+PACKAGECONFIG[testing]="-DBUILD_TESTING=ON, -DBUILD_TESTING=OFF, gtest"
-- 
2.48.1

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

Reply via email to