All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH v2 1/2] minifi-cpp: Fix build with llvm C++ runtime
@ 2021-05-28  0:39 Khem Raj
  2021-05-28  0:39 ` [meta-oe][PATCH v2 2/2] sdbus-cpp: Do not fetch googletest on the fly Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2021-05-28  0:39 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
v2: Earlier patch did not work on 32bit systems

 .../files/0001-Fix-build-with-libc.patch      | 36 +++++++++++++++++++
 .../minifi-cpp/minifi-cpp_0.7.0.bb            |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 meta-oe/recipes-extended/minifi-cpp/files/0001-Fix-build-with-libc.patch

diff --git a/meta-oe/recipes-extended/minifi-cpp/files/0001-Fix-build-with-libc.patch b/meta-oe/recipes-extended/minifi-cpp/files/0001-Fix-build-with-libc.patch
new file mode 100644
index 0000000000..c1c118196a
--- /dev/null
+++ b/meta-oe/recipes-extended/minifi-cpp/files/0001-Fix-build-with-libc.patch
@@ -0,0 +1,36 @@
+From 72e0fe484444169007e481c9b33d8f78ebe03674 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 27 May 2021 15:44:10 -0700
+Subject: [PATCH] Fix build with libc++
+
+In libc++ on 32-bit platforms, int64_t is defined as alias of long long. On 64-bit platforms: long.
+
+On the other hand in definition of std::chrono::duration aliases, that you can find here long long is used
+
+Therefore create custom unit to avoid incompatibility between libstdc++
+and libc++
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ extensions/expression-language/Expression.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/extensions/expression-language/Expression.cpp b/extensions/expression-language/Expression.cpp
+index a25e1d3f..68d6320c 100644
+--- a/extensions/expression-language/Expression.cpp
++++ b/extensions/expression-language/Expression.cpp
+@@ -629,7 +629,8 @@ Value expr_toDate(const std::vector<Value> &args) {
+ #endif  // EXPRESSION_LANGUAGE_USE_DATE
+ 
+ Value expr_now(const std::vector<Value> &args) {
+-  return Value(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
++  using Milliseconds = std::chrono::duration<std::int64_t, std::chrono::milliseconds::period>;
++  return Value(std::chrono::duration_cast<Milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
+ }
+ 
+ Value expr_unescapeCsv(const std::vector<Value> &args) {
+-- 
+2.31.1
+
diff --git a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
index 322b58477d..86c149ba5b 100644
--- a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
+++ b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
@@ -29,6 +29,7 @@ SRC_URI = "git://github.com/apache/nifi-minifi-cpp.git \
             file://0003-cmake-BundledOSSPUUID.cmake-use-ossp-uuid-local-sour.patch \
             file://0001-civetweb-CMakeLists.txt-do-not-search-gcc-ar-and-gcc.patch \
             file://0001-cxxopts-Add-limits-header.patch \
+            file://0001-Fix-build-with-libc.patch \
             file://minifi.service \
             file://systemd-volatile.conf \
             file://sysvinit-volatile.conf \
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [meta-oe][PATCH v2 2/2] sdbus-cpp: Do not fetch googletest on the fly
  2021-05-28  0:39 [meta-oe][PATCH v2 1/2] minifi-cpp: Fix build with llvm C++ runtime Khem Raj
@ 2021-05-28  0:39 ` Khem Raj
  2021-05-28  8:29   ` [oe] " Martin Jansa
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2021-05-28  0:39 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

This package downloads code ( gtest ) post do_fetch task

Now this is checked out by bitbake fetcher into decided source directory,
this ensures reproducibility

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
v2: Fetch googletest via bitbake

 ...-Do-not-download-gtest-automatically.patch | 44 +++++++++++++++++++
 .../recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb | 10 ++++-
 2 files changed, 52 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.8.3/0001-Do-not-download-gtest-automatically.patch

diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.8.3/0001-Do-not-download-gtest-automatically.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.8.3/0001-Do-not-download-gtest-automatically.patch
new file mode 100644
index 0000000000..5bd3801f38
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.8.3/0001-Do-not-download-gtest-automatically.patch
@@ -0,0 +1,44 @@
+From af91a20ee201f13e56f225df536a56e5d8d259e8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 27 May 2021 09:56:49 -0700
+Subject: [PATCH] Do not download gtest automatically
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tests/CMakeLists.txt                        | 9 +--------
+ tests/googletest-download/CMakeLists.txt.in | 3 ---
+ 2 files changed, 1 insertion(+), 11 deletions(-)
+
+--- a/tests/googletest-download/CMakeLists.txt.in
++++ b/tests/googletest-download/CMakeLists.txt.in
+@@ -7,10 +7,7 @@ project(googletest-download NONE)
+ include(ExternalProject)
+ 
+ ExternalProject_Add(googletest
+-    GIT_REPOSITORY    https://github.com/google/googletest.git
+-    GIT_TAG           master
+-    GIT_SHALLOW       1
+-    SOURCE_DIR        "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
++    SOURCE_DIR        "${CMAKE_CURRENT_SOURCE_DIR}/googletest-src"
+     BINARY_DIR        "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"
+     UPDATE_COMMAND    ""
+     CONFIGURE_COMMAND ""
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -6,9 +6,7 @@ include(FetchContent)
+ 
+ message("Fetching googletest...")
+ FetchContent_Declare(googletest
+-                     GIT_REPOSITORY https://github.com/google/googletest.git
+-                     GIT_TAG        master
+-                     GIT_SHALLOW    1
++                     SOURCE_DIR    ${CMAKE_CURRENT_SOURCE_DIR}/googletest-src
+                      UPDATE_COMMAND "")
+ 
+ #FetchContent_MakeAvailable(googletest) # Not available in CMake 3.13 :-( Let's do it manually:
+@@ -144,4 +142,4 @@ endif()
+ if(NOT CMAKE_CROSSCOMPILING)
+     add_test(NAME sdbus-c++-unit-tests COMMAND sdbus-c++-unit-tests)
+     add_test(NAME sdbus-c++-integration-tests COMMAND sdbus-c++-integration-tests)
+-endif() 
++endif()
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb
index 98829765c2..91cf70c911 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1803fa9c2c3ce8cb06b4861d75310742"
 inherit cmake pkgconfig systemd ptest
 
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'with-external-libsystemd', 'with-builtin-libsystemd', d)} \
-                   ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)}"
+                   ${@bb.utils.contains('PTEST_ENABLED', '0', 'with-tests', '', d)}"
 PACKAGECONFIG[with-builtin-libsystemd] = ",,sdbus-c++-libsystemd,libcap"
 PACKAGECONFIG[with-external-libsystemd] = ",,systemd,libsystemd"
 PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${libdir}/${BPN}/tests,-DBUILD_TESTS=OFF"
@@ -17,7 +17,13 @@ PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${libdir}/${B
 DEPENDS += "expat"
 
 SRCREV = "6e8e5aadb674cccea5bdd55141db5dad887fbacd"
-SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;branch=master"
+SRCREV_gtest = "a3460d1aeeaa43fdf137a6adefef10ba0b59fe4b"
+SRCREV_FORMAT = "default_gtest"
+
+SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;branch=master \
+           git://github.com/google/googletest.git;protocol=https;branch=master;name=gtest;destsuffix=git/tests/googletest-src \
+           file://0001-Do-not-download-gtest-automatically.patch \
+"
 SRC_URI += "file://run-ptest"
 
 EXTRA_OECMAKE = "-DBUILD_CODE_GEN=ON \
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [oe] [meta-oe][PATCH v2 2/2] sdbus-cpp: Do not fetch googletest on the fly
  2021-05-28  0:39 ` [meta-oe][PATCH v2 2/2] sdbus-cpp: Do not fetch googletest on the fly Khem Raj
@ 2021-05-28  8:29   ` Martin Jansa
  2021-05-28 13:39     ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Jansa @ 2021-05-28  8:29 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1663 bytes --]

On Thu, May 27, 2021 at 05:39:36PM -0700, Khem Raj wrote:
> This package downloads code ( gtest ) post do_fetch task
> 
> Now this is checked out by bitbake fetcher into decided source directory,
> this ensures reproducibility
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> v2: Fetch googletest via bitbake
> 
>  ...-Do-not-download-gtest-automatically.patch | 44 +++++++++++++++++++
>  .../recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb | 10 ++++-
>  2 files changed, 52 insertions(+), 2 deletions(-)
>  create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.8.3/0001-Do-not-download-gtest-automatically.patch
> 
> diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb
> index 98829765c2..91cf70c911 100644
> --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb
> +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb
> @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1803fa9c2c3ce8cb06b4861d75310742"
>  inherit cmake pkgconfig systemd ptest
>  
>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'with-external-libsystemd', 'with-builtin-libsystemd', d)} \
> -                   ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)}"
> +                   ${@bb.utils.contains('PTEST_ENABLED', '0', 'with-tests', '', d)}"

^ is this change intentional?

>  PACKAGECONFIG[with-builtin-libsystemd] = ",,sdbus-c++-libsystemd,libcap"
>  PACKAGECONFIG[with-external-libsystemd] = ",,systemd,libsystemd"
>  PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${libdir}/${BPN}/tests,-DBUILD_TESTS=OFF"

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [oe] [meta-oe][PATCH v2 2/2] sdbus-cpp: Do not fetch googletest on the fly
  2021-05-28  8:29   ` [oe] " Martin Jansa
@ 2021-05-28 13:39     ` Khem Raj
  0 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2021-05-28 13:39 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembeded-devel

On Fri, May 28, 2021 at 1:29 AM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> On Thu, May 27, 2021 at 05:39:36PM -0700, Khem Raj wrote:
> > This package downloads code ( gtest ) post do_fetch task
> >
> > Now this is checked out by bitbake fetcher into decided source directory,
> > this ensures reproducibility
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> > v2: Fetch googletest via bitbake
> >
> >  ...-Do-not-download-gtest-automatically.patch | 44 +++++++++++++++++++
> >  .../recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb | 10 ++++-
> >  2 files changed, 52 insertions(+), 2 deletions(-)
> >  create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.8.3/0001-Do-not-download-gtest-automatically.patch
> >
> > diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb
> > index 98829765c2..91cf70c911 100644
> > --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb
> > +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.8.3.bb
> > @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1803fa9c2c3ce8cb06b4861d75310742"
> >  inherit cmake pkgconfig systemd ptest
> >
> >  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'with-external-libsystemd', 'with-builtin-libsystemd', d)} \
> > -                   ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)}"
> > +                   ${@bb.utils.contains('PTEST_ENABLED', '0', 'with-tests', '', d)}"
>
> ^ is this change intentional?
>

Good catch !!

> >  PACKAGECONFIG[with-builtin-libsystemd] = ",,sdbus-c++-libsystemd,libcap"
> >  PACKAGECONFIG[with-external-libsystemd] = ",,systemd,libsystemd"
> >  PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${libdir}/${BPN}/tests,-DBUILD_TESTS=OFF"

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-28 13:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28  0:39 [meta-oe][PATCH v2 1/2] minifi-cpp: Fix build with llvm C++ runtime Khem Raj
2021-05-28  0:39 ` [meta-oe][PATCH v2 2/2] sdbus-cpp: Do not fetch googletest on the fly Khem Raj
2021-05-28  8:29   ` [oe] " Martin Jansa
2021-05-28 13:39     ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.