summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlper Ak <alperyasinak1@gmail.com>2025-07-08 01:54:00 +0300
committerKhem Raj <raj.khem@gmail.com>2025-07-08 23:40:32 -0700
commit4edf81ab1ca15ea0f11c54400cecbccda89bf8ee (patch)
treec516637e091f55279998480f23e10dcb0028e4bf
parent1857f6b50a5133411eb4070b4be17f2f9ae05a49 (diff)
downloadmeta-openembedded-4edf81ab1ca15ea0f11c54400cecbccda89bf8ee.tar.gz
avro-c++: Upgrade 1.11.3 -> 1.12 to allow CMake 4+ compatibility
- Drop workaround flag for dangling reference - Refresh patches and drop 0003-Update-CXX-standard-to-CXX14.patch because already assigned to C++17 - Drop xz and zlib because they aren't shown as build dependency and without them the build completes without errors - Fetch the fmt in SRC_URI and put it in the right place so the CMake doesn't need to run FetchContent - The LICENSE file has changed so updated LIC_FILES_CHKSUM to match the new md5sum Changelog: https://github.com/apache/avro/releases/tag/release-1.12.0 Fix: | CMake Error at CMakeLists.txt:19 (cmake_minimum_required): | Compatibility with CMake < 3.5 has been removed from CMake. | | Update the VERSION argument <min> value. Or, use the <min>...<max> syntax | to tell CMake that the project requires at least <min> but has been updated | to work with policies introduced by <max> or earlier. | | Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. ---- | CMake Warning at /opt/yocto-masternext-contribute/sources/build/tmp/work/core2-64-poky-linux/avro-c++/1.12/recipe-sysroot-native/usr/share/cmake-4.0/Modules/FetchContent.cmake:2111 (message): | FETCHCONTENT_FULLY_DISCONNECTED is set to true, which requires the source | directory for dependency fmt to already be populated. This generally means | it must not be set to true the first time CMake is run in a build | directory. The following source directory should already be populated, but | it doesn't exist: | | /opt/yocto-masternext-contribute/sources/build/tmp/work/core2-64-poky-linux/avro-c++/1.12/build/_deps/fmt-src | | Policy CMP0170 controls enforcement of this requirement. | Call Stack (most recent call first): | /opt/yocto-masternext-contribute/sources/build/tmp/work/core2-64-poky-linux/avro-c++/1.12/recipe-sysroot-native/usr/share/cmake-4.0/Modules/FetchContent.cmake:2384 (__FetchContent_Populate) | CMakeLists.txt:93 (FetchContent_MakeAvailable) | | | -- Could NOT find Snappy (missing: SNAPPY_LIBRARIES SNAPPY_INCLUDE_DIR) | Disabled snappy codec. libsnappy not found. | -- Configuring done (0.4s) | CMake Error at CMakeLists.txt:149 (target_link_libraries): | Target "avrocpp" links to: | | fmt::fmt-header-only | | but the target was not found. Possible reasons include: | | * There is a typo in the target name. | * A find_package call is missing for an IMPORTED target. | * An ALIAS target is missing. | | | | CMake Error at CMakeLists.txt:138 (target_link_libraries): | Target "avrocpp_s" links to: | | fmt::fmt-header-only | | but the target was not found. Possible reasons include: | | * There is a typo in the target name. | * A find_package call is missing for an IMPORTED target. | * An ALIAS target is missing. Signed-off-by: Alper Ak <alperyasinak1@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/avro/avro-c++/0001-Remove-cpp-unittest-compilation.patch35
-rw-r--r--meta-oe/recipes-support/avro/avro-c++/0002-Add-package-configuration-files.patch32
-rw-r--r--meta-oe/recipes-support/avro/avro-c++/0003-Update-CXX-standard-to-CXX14.patch24
-rw-r--r--meta-oe/recipes-support/avro/avro-c++_1.11.3.bb27
-rw-r--r--meta-oe/recipes-support/avro/avro-c++_1.12.bb29
5 files changed, 72 insertions, 75 deletions
diff --git a/meta-oe/recipes-support/avro/avro-c++/0001-Remove-cpp-unittest-compilation.patch b/meta-oe/recipes-support/avro/avro-c++/0001-Remove-cpp-unittest-compilation.patch
index bcfafdda55..f33c653069 100644
--- a/meta-oe/recipes-support/avro/avro-c++/0001-Remove-cpp-unittest-compilation.patch
+++ b/meta-oe/recipes-support/avro/avro-c++/0001-Remove-cpp-unittest-compilation.patch
@@ -1,32 +1,34 @@
1From 6be1c45e1f7ee78499bdca76c25ec23a61317134 Mon Sep 17 00:00:00 2001 1From d75f0c5e7a51c9874edad0ea60957e006fb6def5 Mon Sep 17 00:00:00 2001
2From: Rui Costa <rui.ms.costa@ctw.bmwgroup.com> 2From: Rui Costa <rui.ms.costa@ctw.bmwgroup.com>
3Date: Wed, 20 Mar 2024 14:58:27 +0000 3Date: Mon, 7 Jul 2025 16:58:30 +0300
4Subject: [PATCH] Remove cpp unittest compilation 4Subject: [PATCH] Remove cpp unittest compilation
5 5
6Upstream-Status: Inappropriate [oe-specific] 6Upstream-Status: Inappropriate [oe-specific]
7 7
8Signed-off-by: Rui Costa <rui.ms.costa@ctw.bmwgroup.com>
9Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
8--- 10---
9 lang/c++/CMakeLists.txt | 61 ----------------------------------------- 11 lang/c++/CMakeLists.txt | 65 -----------------------------------------
10 1 file changed, 61 deletions(-) 12 1 file changed, 65 deletions(-)
11 13
12diff --git a/CMakeLists.txt b/CMakeLists.txt 14diff --git a/CMakeLists.txt b/CMakeLists.txt
13index 4a3793152..d94ba42d3 100644 15index 19059a41b..1f5f98c83 100644
14--- a/CMakeLists.txt 16--- a/CMakeLists.txt
15+++ b/CMakeLists.txt 17+++ b/CMakeLists.txt
16@@ -131,70 +131,9 @@ set_target_properties (avrocpp_s PROPERTIES 18@@ -149,39 +149,6 @@ set_target_properties (avrocpp_s PROPERTIES
17 target_link_libraries (avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES}) 19 target_link_libraries (avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES} fmt::fmt-header-only)
18 target_include_directories(avrocpp PRIVATE ${SNAPPY_INCLUDE_DIR}) 20 target_include_directories(avrocpp PRIVATE ${SNAPPY_INCLUDE_DIR})
19 21
20-add_executable (precompile test/precompile.cc) 22-add_executable (precompile test/precompile.cc)
21- 23-
22-target_link_libraries (precompile avrocpp_s ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES}) 24-target_link_libraries (precompile avrocpp_s)
23- 25-
24-macro (gen file ns) 26-macro (gen file ns)
25- add_custom_command (OUTPUT ${file}.hh 27- add_custom_command (OUTPUT ${file}.hh
26- COMMAND avrogencpp 28- COMMAND avrogencpp
27- -p - 29- -p -
28- -i ${CMAKE_CURRENT_SOURCE_DIR}/jsonschemas/${file} 30- -i ${CMAKE_CURRENT_SOURCE_DIR}/jsonschemas/${file}
29- -o ${file}.hh -n ${ns} -U 31- -o ${file}.hh -n ${ns}
30- DEPENDS avrogencpp ${CMAKE_CURRENT_SOURCE_DIR}/jsonschemas/${file}) 32- DEPENDS avrogencpp ${CMAKE_CURRENT_SOURCE_DIR}/jsonschemas/${file})
31- add_custom_target (${file}_hh DEPENDS ${file}.hh) 33- add_custom_target (${file}_hh DEPENDS ${file}.hh)
32-endmacro (gen) 34-endmacro (gen)
@@ -39,6 +41,7 @@ index 4a3793152..d94ba42d3 100644
39-gen (union_array_union uau) 41-gen (union_array_union uau)
40-gen (union_map_union umu) 42-gen (union_map_union umu)
41-gen (union_conflict uc) 43-gen (union_conflict uc)
44-gen (union_empty_record uer)
42-gen (recursive rec) 45-gen (recursive rec)
43-gen (reuse ru) 46-gen (reuse ru)
44-gen (circulardep cd) 47-gen (circulardep cd)
@@ -47,9 +50,14 @@ index 4a3793152..d94ba42d3 100644
47-gen (crossref cr) 50-gen (crossref cr)
48-gen (primitivetypes pt) 51-gen (primitivetypes pt)
49-gen (cpp_reserved_words cppres) 52-gen (cpp_reserved_words cppres)
53-gen (cpp_reserved_words_union_typedef cppres_union)
50- 54-
51 add_executable (avrogencpp impl/avrogencpp.cc) 55 add_executable (avrogencpp impl/avrogencpp.cc)
52 target_link_libraries (avrogencpp avrocpp_s ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES}) 56 target_link_libraries (avrogencpp avrocpp_s)
57
58@@ -194,38 +161,6 @@ target_include_directories(avrocpp PUBLIC
59 $<INSTALL_INTERFACE:include>
60 )
53 61
54-enable_testing() 62-enable_testing()
55- 63-
@@ -72,6 +80,7 @@ index 4a3793152..d94ba42d3 100644
72-unittest (AvrogencppTests) 80-unittest (AvrogencppTests)
73-unittest (CompilerTests) 81-unittest (CompilerTests)
74-unittest (AvrogencppTestReservedWords) 82-unittest (AvrogencppTestReservedWords)
83-unittest (CommonsSchemasTests)
75- 84-
76-add_dependencies (AvrogencppTestReservedWords cpp_reserved_words_hh) 85-add_dependencies (AvrogencppTestReservedWords cpp_reserved_words_hh)
77- 86-
@@ -79,8 +88,12 @@ index 4a3793152..d94ba42d3 100644
79- tweet_hh 88- tweet_hh
80- union_array_union_hh union_map_union_hh union_conflict_hh 89- union_array_union_hh union_map_union_hh union_conflict_hh
81- recursive_hh reuse_hh circulardep_hh tree1_hh tree2_hh crossref_hh 90- recursive_hh reuse_hh circulardep_hh tree1_hh tree2_hh crossref_hh
82- primitivetypes_hh empty_record_hh) 91- primitivetypes_hh empty_record_hh cpp_reserved_words_union_typedef_hh
92- union_empty_record_hh)
83- 93-
84 include (InstallRequiredSystemLibraries) 94 include (InstallRequiredSystemLibraries)
85 95
86 set (CPACK_PACKAGE_FILE_NAME "avrocpp-${AVRO_VERSION_MAJOR}") 96 set (CPACK_PACKAGE_FILE_NAME "avrocpp-${AVRO_VERSION_MAJOR}")
97--
982.43.0
99
diff --git a/meta-oe/recipes-support/avro/avro-c++/0002-Add-package-configuration-files.patch b/meta-oe/recipes-support/avro/avro-c++/0002-Add-package-configuration-files.patch
index 437a3fa138..982e37d5b8 100644
--- a/meta-oe/recipes-support/avro/avro-c++/0002-Add-package-configuration-files.patch
+++ b/meta-oe/recipes-support/avro/avro-c++/0002-Add-package-configuration-files.patch
@@ -1,21 +1,23 @@
1From 86aa3f2333a9b8e6f1c631e6d5cb7296b6e8380b Mon Sep 17 00:00:00 2001 1From 01a29c294c898cf6e13fb500b8514e9982982e1f Mon Sep 17 00:00:00 2001
2From: Rui Costa <rui.ms.costa@ctw.bmwgroup.com> 2From: Rui Costa <rui.ms.costa@ctw.bmwgroup.com>
3Date: Fri, 22 Mar 2024 13:27:38 +0000 3Date: Mon, 7 Jul 2025 18:16:35 +0300
4Subject: [PATCH] Add package configuration files 4Subject: [PATCH] Add package configuration files
5 5
6Upstream-Status: Pending 6Upstream-Status: Pending
7 7
8Signed-off-by: Rui Costa <rui.ms.costa@ctw.bmwgroup.com>
9Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
8--- 10---
9 lang/c++/CMakeLists.txt | 45 ++++++++++++++++++++++++------ 11 lang/c++/CMakeLists.txt | 46 ++++++++++++++++++++++++------
10 lang/c++/cmake/AvroCppConfig.cmake | 5 ++++ 12 lang/c++/cmake/AvroCppConfig.cmake | 5 ++++
11 2 files changed, 42 insertions(+), 8 deletions(-) 13 2 files changed, 43 insertions(+), 8 deletions(-)
12 create mode 100644 lang/c++/cmake/AvroCppConfig.cmake 14 create mode 100644 lang/c++/cmake/AvroCppConfig.cmake
13 15
14diff --git a/CMakeLists.txt b/CMakeLists.txt 16diff --git a/CMakeLists.txt b/CMakeLists.txt
15index d94ba42d3..4748b111d 100644 17index 1f5f98c83..73596a6cf 100644
16--- a/CMakeLists.txt 18--- a/CMakeLists.txt
17+++ b/CMakeLists.txt 19+++ b/CMakeLists.txt
18@@ -140,14 +140,18 @@ set (CPACK_PACKAGE_FILE_NAME "avrocpp-${AVRO_VERSION_MAJOR}") 20@@ -167,18 +167,48 @@ set (CPACK_PACKAGE_FILE_NAME "avrocpp-${AVRO_VERSION_MAJOR}")
19 21
20 include (CPack) 22 include (CPack)
21 23
@@ -26,23 +28,24 @@ index d94ba42d3..4748b111d 100644
26- 28-
27-install (TARGETS avrogencpp RUNTIME DESTINATION bin) 29-install (TARGETS avrogencpp RUNTIME DESTINATION bin)
28- 30-
29-install (DIRECTORY api/ DESTINATION include/avro 31-install (DIRECTORY include/avro DESTINATION include
30+install (TARGETS avrocpp 32+install(TARGETS avrocpp
31+ EXPORT AvroCppTargets 33+ EXPORT AvroCppTargets
32+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} 34+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
33+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} 35+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
34+ RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} 36+ RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
35+ INCLUDES DESTINATION include) 37+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
36+ 38+
37+install (TARGETS avrogencpp 39+install(TARGETS avrogencpp
38+ EXPORT AvroCppTargets 40+ EXPORT AvroCppTargets
39+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 41+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
40+ 42+
41+install (DIRECTORY api/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/avro 43+install(DIRECTORY include/avro DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
42 FILES_MATCHING PATTERN *.hh) 44 FILES_MATCHING PATTERN *.hh)
43 45
46+
44 if (NOT CMAKE_BUILD_TYPE) 47 if (NOT CMAKE_BUILD_TYPE)
45@@ -155,3 +159,28 @@ if (NOT CMAKE_BUILD_TYPE) 48 set (CMAKE_BUILD_TYPE Release CACHE STRING
46 "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." 49 "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
47 FORCE) 50 FORCE)
48 endif (NOT CMAKE_BUILD_TYPE) 51 endif (NOT CMAKE_BUILD_TYPE)
@@ -71,7 +74,7 @@ index d94ba42d3..4748b111d 100644
71+ "${CMAKE_CURRENT_BINARY_DIR}/AvroCppConfigVersion.cmake" 74+ "${CMAKE_CURRENT_BINARY_DIR}/AvroCppConfigVersion.cmake"
72+ DESTINATION ${ConfigPackageLocation} 75+ DESTINATION ${ConfigPackageLocation}
73+ COMPONENT Devel) 76+ COMPONENT Devel)
74diff --git a/cmake/AvroCppConfig.cmake b/cmake/AvroCppConfig.cmake 77diff --git a/lang/c++/cmake/AvroCppConfig.cmake b/lang/c++/cmake/AvroCppConfig.cmake
75new file mode 100644 78new file mode 100644
76index 000000000..deb8aaa31 79index 000000000..deb8aaa31
77--- /dev/null 80--- /dev/null
@@ -82,3 +85,6 @@ index 000000000..deb8aaa31
82+ COMPONENTS filesystem iostreams program_options regex system) 85+ COMPONENTS filesystem iostreams program_options regex system)
83+ 86+
84+include("${CMAKE_CURRENT_LIST_DIR}/AvroCppTargets.cmake") 87+include("${CMAKE_CURRENT_LIST_DIR}/AvroCppTargets.cmake")
88--
892.43.0
90
diff --git a/meta-oe/recipes-support/avro/avro-c++/0003-Update-CXX-standard-to-CXX14.patch b/meta-oe/recipes-support/avro/avro-c++/0003-Update-CXX-standard-to-CXX14.patch
deleted file mode 100644
index 3e65cb7a72..0000000000
--- a/meta-oe/recipes-support/avro/avro-c++/0003-Update-CXX-standard-to-CXX14.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1From 66c08ade24e4472b5af5dca48097ed9a2ec035ec Mon Sep 17 00:00:00 2001
2From: Rui Costa <rui.ms.costa@ctw.bmwgroup.com>
3Date: Fri, 5 Apr 2024 11:33:51 +0000
4Subject: [PATCH] Update CXX standard to CXX14
5
6Upstream-Status: Inappropriate [oe-specific]
7
8---
9 lang/c++/CMakeLists.txt | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/CMakeLists.txt b/CMakeLists.txt
13index 4748b111d..1e45c13d5 100644
14--- a/CMakeLists.txt
15+++ b/CMakeLists.txt
16@@ -21,7 +21,7 @@ cmake_minimum_required (VERSION 3.1)
17 set (CMAKE_LEGACY_CYGWIN_WIN32 0)
18
19 if (NOT DEFINED CMAKE_CXX_STANDARD)
20- set(CMAKE_CXX_STANDARD 11)
21+ set(CMAKE_CXX_STANDARD 14)
22 endif()
23
24 set(CMAKE_CXX_STANDARD_REQUIRED ON)
diff --git a/meta-oe/recipes-support/avro/avro-c++_1.11.3.bb b/meta-oe/recipes-support/avro/avro-c++_1.11.3.bb
deleted file mode 100644
index c1e8863fb3..0000000000
--- a/meta-oe/recipes-support/avro/avro-c++_1.11.3.bb
+++ /dev/null
@@ -1,27 +0,0 @@
1SUMMARY = "Apache Avro data serialization system."
2HOMEPAGE = "https://avro.apache.org/"
3SECTION = "libs"
4
5LICENSE = "Apache-2.0"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=43abf34d8b9908494f83c55d213a7f89"
7
8DEPENDS = "boost zlib xz"
9
10BRANCH = "branch-1.11"
11SRCREV = "35ff8b997738e4d983871902d47bfb67b3250734"
12SRC_URI = "git://github.com/apache/avro;branch=${BRANCH};protocol=https \
13 file://0001-Remove-cpp-unittest-compilation.patch \
14 file://0002-Add-package-configuration-files.patch \
15 file://0003-Update-CXX-standard-to-CXX14.patch \
16 "
17
18S = "${UNPACKDIR}/${BP}/lang/c++"
19
20inherit cmake pkgconfig
21
22BBCLASSEXTEND = "native nativesdk"
23
24# http://errors.yoctoproject.org/Errors/Details/766913/
25# avro-c++/1.11.3/git/lang/c++/impl/Compiler.cc:304:18: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
26# avro-c++/1.11.3/git/lang/c++/impl/Compiler.cc:370:18: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
27CXXFLAGS += "-Wno-error=dangling-reference"
diff --git a/meta-oe/recipes-support/avro/avro-c++_1.12.bb b/meta-oe/recipes-support/avro/avro-c++_1.12.bb
new file mode 100644
index 0000000000..726a861bc9
--- /dev/null
+++ b/meta-oe/recipes-support/avro/avro-c++_1.12.bb
@@ -0,0 +1,29 @@
1SUMMARY = "Apache Avro data serialization system."
2HOMEPAGE = "https://avro.apache.org/"
3SECTION = "libs"
4
5LICENSE = "Apache-2.0"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=34cb96edab958a981837bf6f44bf654d"
7
8DEPENDS = "boost"
9
10SRC_URI = "git://github.com/apache/avro.git;branch=branch-1.12;protocol=https;name=avro-c++ \
11 git://github.com/fmtlib/fmt.git;branch=10.x;protocol=https;name=fmt;destsuffix=_deps/fmt-src \
12 file://0001-Remove-cpp-unittest-compilation.patch \
13 file://0002-Add-package-configuration-files.patch"
14
15SRCREV_FORMAT = "avro-c++ fmt"
16SRCREV_avro-c++ = "8c27801dc8d42ccc00997f25c0b8f45f8d4a233e"
17# Tag 10.2.1
18SRCREV_fmt = "e69e5f977d458f2650bb346dadf2ad30c5320281"
19
20S = "${UNPACKDIR}/${BP}/lang/c++"
21
22inherit cmake pkgconfig
23
24do_configure:prepend() {
25 install -d ${B}/_deps
26 cp -r ${UNPACKDIR}/_deps/fmt-src ${B}/_deps/
27}
28
29BBCLASSEXTEND = "native nativesdk"