All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] Introduce recipes for sdbus-c++ library and its tools
@ 2019-07-22 21:18 Khem Raj
  2019-07-22 21:18 ` [meta-oe][PATCH] log4cplus: Fix build with gold linker Khem Raj
  2019-07-23 19:25 ` [meta-oe][PATCH] Introduce recipes for sdbus-c++ library and its tools Stefan Herbrechtsmeier
  0 siblings, 2 replies; 8+ messages in thread
From: Khem Raj @ 2019-07-22 21:18 UTC (permalink / raw)
  To: openembedded-devel; +Cc: sangelovic

From: sangelovic <angelovic.s@gmail.com>

---
 .../sdbus-c++/sdbus-c++-0.7.2/run-ptest       | 15 ++++++
 .../sdbus-c++/sdbus-c++-tools-native_0.7.2.bb | 14 ++++++
 .../recipes-core/sdbus-c++/sdbus-c++_0.7.2.bb | 49 +++++++++++++++++++
 3 files changed, 78 insertions(+)
 create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.7.2/run-ptest
 create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools-native_0.7.2.bb
 create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.7.2.bb

diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.7.2/run-ptest b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.7.2/run-ptest
new file mode 100644
index 0000000000..8fa9453e39
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.7.2/run-ptest
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+set -o pipefail
+
+logger "** Starting sdbus-c++-unit-tests"
+/opt/test/bin/sdbus-c++-unit-tests --gtest_output=xml:/data/ptest/sdbus-c++/sdbus-c++-unit-tests.xml |& \
+sed -r 's/^\[\s+OK\s+\] (.*) \([0-9]+\sms\)$/OK: \1 /' | \
+sed -r 's/^\[\s+FAILED\s+\] (.*) \([0-9]+\sms\)$/FAILED: \1 /' | \
+awk '{if ($1 == "OK:" || $1 == "FAILED:") {print $0}}'
+
+logger "** Starting sdbus-c++-integration-tests"
+/opt/test/bin/sdbus-c++-integration-tests --gtest_output=xml:/data/ptest/sdbus-c++/sdbus-c++-integration-tests.xml |& \
+sed -r 's/^\[\s+OK\s+\] (.*) \([0-9]+\sms\)$/OK: \1 /' | \
+sed -r 's/^\[\s+FAILED\s+\] (.*) \([0-9]+\sms\)$/FAILED: \1 /' | \
+awk '{if ($1 == "OK:" || $1 == "FAILED:") {print $0}}' 
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools-native_0.7.2.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools-native_0.7.2.bb
new file mode 100644
index 0000000000..e319404f49
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools-native_0.7.2.bb
@@ -0,0 +1,14 @@
+SUMMARY = "sdbus-c++ native tools"
+DESCRIPTION = "Native interface code generator for development with sdbus-c++"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/git-tools/COPYING;md5=1803fa9c2c3ce8cb06b4861d75310742"
+
+inherit cmake native
+
+DEPENDS += "expat"
+
+SRCREV = "750dab39270f338181db8d841cd4b1a9a50ae4d7"
+SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;destsuffix=git-tools;branch=master;subpath=tools"
+
+S = "${WORKDIR}/git-tools"
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.7.2.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.7.2.bb
new file mode 100644
index 0000000000..457f5d676a
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.7.2.bb
@@ -0,0 +1,49 @@
+SUMMARY = "sdbus-c++"
+DESCRIPTION = "High-level C++ D-Bus library designed to provide easy-to-use yet powerful API in modern C++"
+
+SECTION = "libs"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1803fa9c2c3ce8cb06b4861d75310742"
+
+inherit cmake pkgconfig systemd ptest python3native
+
+TEST_BIN_DIR = "/opt/test/bin"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'with-external-libsystemd', 'with-builtin-libsystemd', d)} \
+                   ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)}"
+PACKAGECONFIG[with-builtin-libsystemd] = "-DBUILD_LIBSYSTEMD=ON,-DBUILD_LIBSYSTEMD=OFF,meson-native ninja-native git-native gperf-native gettext-native util-linux libcap,libcap"
+PACKAGECONFIG[with-external-libsystemd] = "-DBUILD_LIBSYSTEMD=OFF,-DBUILD_LIBSYSTEMD=ON,systemd,libsystemd"
+PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${TEST_BIN_DIR},-DBUILD_TESTS=OFF"
+
+DEPENDS += "expat"
+
+SRCREV = "750dab39270f338181db8d841cd4b1a9a50ae4d7"
+SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;destsuffix=sdbus-cpp-${PV};branch=master"
+SRC_URI += "file://run-ptest"
+
+# Allow CMake to use git on the host machine
+OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "BOTH"
+# Ninja is the default CMake generator in Yocto now, so let's set Unix Makefiles explicitly
+OECMAKE_GENERATOR = "Unix Makefiles"
+
+EXTRA_OECMAKE = "-DBUILD_CODE_GEN=ON \
+                 -DBUILD_DOC=ON \
+                 -DBUILD_DOXYGEN_DOC=OFF"
+
+S = "${WORKDIR}/sdbus-cpp-${PV}"
+
+PACKAGES += "${PN}-test"
+ALLOW_EMPTY_${PN}-test = "1"
+RDEPENDS_${PN}-test = "${PN}"
+RDEPENDS_${PN}-ptest = "${PN}-test"
+
+# Don't take org.sdbuscpp.integrationtests.conf file into the base package
+FILES_${PN} = "${libdir}/"
+
+FILES_${PN}-test += "${sysconfdir}/dbus-1/system.d/"
+FILES_${PN}-test += "${TEST_BIN_DIR}/"
+
+FILES_${PN}-dev += "${bindir}/sdbus-c++-xml2cpp"
+FILES_${PN}-dev += "${libdir}/cmake/sdbus-c++/sdbus-c++-config.cmake"
+FILES_${PN}-dev += "${libdir}/cmake/sdbus-c++/sdbus-c++-config-version.cmake"
-- 
2.22.0



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

* [meta-oe][PATCH] log4cplus: Fix build with gold linker
  2019-07-22 21:18 [meta-oe][PATCH] Introduce recipes for sdbus-c++ library and its tools Khem Raj
@ 2019-07-22 21:18 ` Khem Raj
  2019-07-23  7:53   ` Adrian Bunk
  2019-07-31  6:37   ` Yu, Mingli
  2019-07-23 19:25 ` [meta-oe][PATCH] Introduce recipes for sdbus-c++ library and its tools Stefan Herbrechtsmeier
  1 sibling, 2 replies; 8+ messages in thread
From: Khem Raj @ 2019-07-22 21:18 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Adrian Bunk

Fixes a potential linker error and eventual linker crash when using gold
linker [1]

[1] https://errors.yoctoproject.org/Errors/Details/253440/

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Adrian Bunk <bunk@stusta.de>
Cc: Mingli Yu <mingli.yu@windriver.com>
---
 ...-version-entry-from-ELF-.comment-sec.patch | 40 +++++++++++++++++++
 .../log4cplus/log4cplus_2.0.4.bb              |  6 ++-
 2 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch

diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
new file mode 100644
index 0000000000..44a835c35f
--- /dev/null
+++ b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
@@ -0,0 +1,40 @@
+From da5338e68f146efadab7c221291ba4c949d8f12f Mon Sep 17 00:00:00 2001
+From: Vaclav Haisman <vhaisman@gmail.com>
+Date: Sun, 21 Jul 2019 23:23:16 -0700
+Subject: [PATCH] Remove log4cplus version entry from ELF .comment section
+
+Reverts
+https://github.com/log4cplus/log4cplus/commit/9cb0d4ade619da4e40628c9b95ff51de3df29f1b
+
+Upstream-Status: Backport [https://github.com/log4cplus/log4cplus/commit/7e6addc70dffd2e30e902efd18eb845c5d5dd7bb]
+
+Suggested-by: Adrian Bunk <bunk@stusta.de>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/version.cxx | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/src/version.cxx b/src/version.cxx
+index ce18212..e002de9 100644
+--- a/src/version.cxx
++++ b/src/version.cxx
+@@ -34,16 +34,4 @@ namespace log4cplus
+ unsigned const version = LOG4CPLUS_VERSION;
+ char const versionStr[] = LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX;
+ 
+-namespace
+-{
+-
+-#if defined (__ELF__) && (defined (__GNUC__) || defined (__clang__))
+-char const versionStrComment[]
+-    __attribute__ ((__used__, __section__ ((".comment"))))
+-    = "log4cplus " LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX;
+-#endif
+-
+-
+-} // namespace
+-
+ } // namespace log4cplus
+-- 
+2.22.0
+
diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
index d86521aba3..b396cabf3f 100644
--- a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
+++ b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
@@ -6,7 +6,9 @@ BUGTRACKER = "http://sourceforge.net/p/log4cplus/bugs/"
 LICENSE = "Apache-2.0 & BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=41e8e060c26822886b592ab4765c756b"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz \
+           file://0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch \
+          "
 SRC_URI[md5sum] = "2b5b7bc294698bf30a315a259ef9eec2"
 SRC_URI[sha256sum] = "196eedbc7f2dd792dae721b1159c7ac132255bb368226353c24d4d5fa7c7797a"
 
@@ -16,3 +18,5 @@ UPSTREAM_CHECK_REGEX = "log4cplus-stable/(?P<pver>\d+(\.\d+)+)/"
 inherit autotools pkgconfig
 
 BBCLASSEXTEND = "native"
+
+CXXFLAGS += "-fuse-ld=gold"
-- 
2.22.0



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

* Re: [meta-oe][PATCH] log4cplus: Fix build with gold linker
  2019-07-22 21:18 ` [meta-oe][PATCH] log4cplus: Fix build with gold linker Khem Raj
@ 2019-07-23  7:53   ` Adrian Bunk
  2019-07-23 13:58     ` Khem Raj
  2019-07-31  6:37   ` Yu, Mingli
  1 sibling, 1 reply; 8+ messages in thread
From: Adrian Bunk @ 2019-07-23  7:53 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-devel

On Mon, Jul 22, 2019 at 02:18:14PM -0700, Khem Raj wrote:
> Fixes a potential linker error and eventual linker crash when using gold
> linker [1]
> 
> [1] https://errors.yoctoproject.org/Errors/Details/253440/
>...

AFAIR these build logs are not permanently stored, so quoting the error 
message might be more useful than a soon defunct URL in the git history.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



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

* Re: [meta-oe][PATCH] log4cplus: Fix build with gold linker
  2019-07-23  7:53   ` Adrian Bunk
@ 2019-07-23 13:58     ` Khem Raj
  0 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2019-07-23 13:58 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: openembeded-devel

On Tue, Jul 23, 2019 at 12:53 AM Adrian Bunk <bunk@stusta.de> wrote:
>
> On Mon, Jul 22, 2019 at 02:18:14PM -0700, Khem Raj wrote:
> > Fixes a potential linker error and eventual linker crash when using gold
> > linker [1]
> >
> > [1] https://errors.yoctoproject.org/Errors/Details/253440/
> >...
>
> AFAIR these build logs are not permanently stored, so quoting the error
> message might be more useful than a soon defunct URL in the git history.
>

thats a good point

> cu
> Adrian
>
> --
>
>        "Is there not promise of rain?" Ling Tan asked suddenly out
>         of the darkness. There had been need of rain for many days.
>        "Only a promise," Lao Er said.
>                                        Pearl S. Buck - Dragon Seed
>


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

* Re: [meta-oe][PATCH] Introduce recipes for sdbus-c++ library and its tools
  2019-07-22 21:18 [meta-oe][PATCH] Introduce recipes for sdbus-c++ library and its tools Khem Raj
  2019-07-22 21:18 ` [meta-oe][PATCH] log4cplus: Fix build with gold linker Khem Raj
@ 2019-07-23 19:25 ` Stefan Herbrechtsmeier
  1 sibling, 0 replies; 8+ messages in thread
From: Stefan Herbrechtsmeier @ 2019-07-23 19:25 UTC (permalink / raw)
  To: Khem Raj, openembedded-devel; +Cc: sangelovic

Hi Khem,

Am 22.07.19 um 23:18 schrieb Khem Raj:
> From: sangelovic <angelovic.s@gmail.com>
> 
> ---
>   .../sdbus-c++/sdbus-c++-0.7.2/run-ptest       | 15 ++++++
>   .../sdbus-c++/sdbus-c++-tools-native_0.7.2.bb | 14 ++++++
>   .../recipes-core/sdbus-c++/sdbus-c++_0.7.2.bb | 49 +++++++++++++++++++
>   3 files changed, 78 insertions(+)
>   create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.7.2/run-ptest
>   create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools-native_0.7.2.bb
>   create mode 100644 meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.7.2.bb
> 
> diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.7.2/run-ptest b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.7.2/run-ptest
> new file mode 100644
> index 0000000000..8fa9453e39
> --- /dev/null
> +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-0.7.2/run-ptest
> @@ -0,0 +1,15 @@
> +#!/bin/sh
> +set -e
> +set -o pipefail
> +
> +logger "** Starting sdbus-c++-unit-tests"
> +/opt/test/bin/sdbus-c++-unit-tests --gtest_output=xml:/data/ptest/sdbus-c++/sdbus-c++-unit-tests.xml |& \
> +sed -r 's/^\[\s+OK\s+\] (.*) \([0-9]+\sms\)$/OK: \1 /' | \
> +sed -r 's/^\[\s+FAILED\s+\] (.*) \([0-9]+\sms\)$/FAILED: \1 /' | \
> +awk '{if ($1 == "OK:" || $1 == "FAILED:") {print $0}}'
> +
> +logger "** Starting sdbus-c++-integration-tests"
> +/opt/test/bin/sdbus-c++-integration-tests --gtest_output=xml:/data/ptest/sdbus-c++/sdbus-c++-integration-tests.xml |& \
> +sed -r 's/^\[\s+OK\s+\] (.*) \([0-9]+\sms\)$/OK: \1 /' | \
> +sed -r 's/^\[\s+FAILED\s+\] (.*) \([0-9]+\sms\)$/FAILED: \1 /' | \
> +awk '{if ($1 == "OK:" || $1 == "FAILED:") {print $0}}'
> diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools-native_0.7.2.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools-native_0.7.2.bb
> new file mode 100644
> index 0000000000..e319404f49
> --- /dev/null
> +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-tools-native_0.7.2.bb
> @@ -0,0 +1,14 @@
> +SUMMARY = "sdbus-c++ native tools"
> +DESCRIPTION = "Native interface code generator for development with sdbus-c++"
> +
> +LICENSE = "LGPLv2.1"
> +LIC_FILES_CHKSUM = "file://${WORKDIR}/git-tools/COPYING;md5=1803fa9c2c3ce8cb06b4861d75310742"
Why you need the "${WORKDIR}/git-tools"?

> +
> +inherit cmake native
> +
> +DEPENDS += "expat"
> +
> +SRCREV = "750dab39270f338181db8d841cd4b1a9a50ae4d7"
> +SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;destsuffix=git-tools;branch=master;subpath=tools"
> +
> +S = "${WORKDIR}/git-tools"
Why don't you use "${WORKDIR}/git" and skip the destsuffix in SRC_URI?

> diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.7.2.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.7.2.bb
> new file mode 100644
> index 0000000000..457f5d676a
> --- /dev/null
> +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++_0.7.2.bb
> @@ -0,0 +1,49 @@
> +SUMMARY = "sdbus-c++"
> +DESCRIPTION = "High-level C++ D-Bus library designed to provide easy-to-use yet powerful API in modern C++"
> +
> +SECTION = "libs"
> +
> +LICENSE = "LGPLv2.1"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=1803fa9c2c3ce8cb06b4861d75310742"
> +
> +inherit cmake pkgconfig systemd ptest python3native
> +
> +TEST_BIN_DIR = "/opt/test/bin"
Is this a correct path for a test? Shouldn't we set TESTS_INSTALL_PATH 
to a correct path.

> +
> +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'with-external-libsystemd', 'with-builtin-libsystemd', d)} \
> +                   ${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)}"
> +PACKAGECONFIG[with-builtin-libsystemd] = "-DBUILD_LIBSYSTEMD=ON,-DBUILD_LIBSYSTEMD=OFF,meson-native ninja-native git-native gperf-native gettext-native util-linux libcap,libcap"
Should we really support an embedded systemd build? Furthermore this 
will build systemd with a hidden version and bypass the bitbake fetcher. 
Is there a real use case for this and isn't the correct solution to 
create a systemd library only recipe?

> +PACKAGECONFIG[with-external-libsystemd] = "-DBUILD_LIBSYSTEMD=OFF,-DBUILD_LIBSYSTEMD=ON,systemd,libsystemd"
> +PACKAGECONFIG[with-tests] = "-DBUILD_TESTS=ON -DTESTS_INSTALL_PATH=${TEST_BIN_DIR},-DBUILD_TESTS=OFF"
> +
> +DEPENDS += "expat"
> +
> +SRCREV = "750dab39270f338181db8d841cd4b1a9a50ae4d7"
> +SRC_URI = "git://github.com/Kistler-Group/sdbus-cpp.git;protocol=https;destsuffix=sdbus-cpp-${PV};branch=master"
> +SRC_URI += "file://run-ptest"
> +
> +# Allow CMake to use git on the host machine
> +OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "BOTH"
> +# Ninja is the default CMake generator in Yocto now, so let's set Unix Makefiles explicitly
> +OECMAKE_GENERATOR = "Unix Makefiles"
> +
> +EXTRA_OECMAKE = "-DBUILD_CODE_GEN=ON \
> +                 -DBUILD_DOC=ON \
> +                 -DBUILD_DOXYGEN_DOC=OFF"
> +
> +S = "${WORKDIR}/sdbus-cpp-${PV}"
Why don't you use "${WORKDIR}/git" and remove the destsuffix from the 
SRC_URI?

> +
> +PACKAGES += "${PN}-test"
> +ALLOW_EMPTY_${PN}-test = "1"
> +RDEPENDS_${PN}-test = "${PN}"
It is common to create an additional test package?

> +RDEPENDS_${PN}-ptest = "${PN}-test"
> +
> +# Don't take org.sdbuscpp.integrationtests.conf file into the base package
> +FILES_${PN} = "${libdir}/"
Why don't you use PACKAGE_BEFORE_PN or PACKAGES =+ ?

> +
> +FILES_${PN}-test += "${sysconfdir}/dbus-1/system.d/"
> +FILES_${PN}-test += "${TEST_BIN_DIR}/"
> +
> +FILES_${PN}-dev += "${bindir}/sdbus-c++-xml2cpp"
> +FILES_${PN}-dev += "${libdir}/cmake/sdbus-c++/sdbus-c++-config.cmake"
> +FILES_${PN}-dev += "${libdir}/cmake/sdbus-c++/sdbus-c++-config-version.cmake"
You don't need to add the two cmake paths any longer.

Regards
   Stefan


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

* Re: [meta-oe][PATCH] log4cplus: Fix build with gold linker
  2019-07-22 21:18 ` [meta-oe][PATCH] log4cplus: Fix build with gold linker Khem Raj
  2019-07-23  7:53   ` Adrian Bunk
@ 2019-07-31  6:37   ` Yu, Mingli
  2019-07-31  6:46     ` Khem Raj
  1 sibling, 1 reply; 8+ messages in thread
From: Yu, Mingli @ 2019-07-31  6:37 UTC (permalink / raw)
  To: Khem Raj, openembedded-devel; +Cc: Adrian Bunk

Hi Khem,

On 2019年07月23日 05:18, Khem Raj wrote:
> Fixes a potential linker error and eventual linker crash when using gold
> linker [1]
>
> [1] https://errors.yoctoproject.org/Errors/Details/253440/
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Adrian Bunk <bunk@stusta.de>
> Cc: Mingli Yu <mingli.yu@windriver.com>
> ---
>   ...-version-entry-from-ELF-.comment-sec.patch | 40 +++++++++++++++++++
>   .../log4cplus/log4cplus_2.0.4.bb              |  6 ++-
>   2 files changed, 45 insertions(+), 1 deletion(-)
>   create mode 100644 meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
>
> diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
> new file mode 100644
> index 0000000000..44a835c35f
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
> @@ -0,0 +1,40 @@
> +From da5338e68f146efadab7c221291ba4c949d8f12f Mon Sep 17 00:00:00 2001
> +From: Vaclav Haisman <vhaisman@gmail.com>
> +Date: Sun, 21 Jul 2019 23:23:16 -0700
> +Subject: [PATCH] Remove log4cplus version entry from ELF .comment section
> +
> +Reverts
> +https://github.com/log4cplus/log4cplus/commit/9cb0d4ade619da4e40628c9b95ff51de3df29f1b
> +
> +Upstream-Status: Backport [https://github.com/log4cplus/log4cplus/commit/7e6addc70dffd2e30e902efd18eb845c5d5dd7bb]
> +
> +Suggested-by: Adrian Bunk <bunk@stusta.de>
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + src/version.cxx | 12 ------------
> + 1 file changed, 12 deletions(-)
> +
> +diff --git a/src/version.cxx b/src/version.cxx
> +index ce18212..e002de9 100644
> +--- a/src/version.cxx
> ++++ b/src/version.cxx
> +@@ -34,16 +34,4 @@ namespace log4cplus
> + unsigned const version = LOG4CPLUS_VERSION;
> + char const versionStr[] = LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX;
> +
> +-namespace
> +-{
> +-
> +-#if defined (__ELF__) && (defined (__GNUC__) || defined (__clang__))
> +-char const versionStrComment[]
> +-    __attribute__ ((__used__, __section__ ((".comment"))))
> +-    = "log4cplus " LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX;
> +-#endif
> +-
> +-
> +-} // namespace
> +-
> + } // namespace log4cplus
> +--
> +2.22.0
> +
> diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
> index d86521aba3..b396cabf3f 100644
> --- a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
> +++ b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
> @@ -6,7 +6,9 @@ BUGTRACKER = "http://sourceforge.net/p/log4cplus/bugs/"
>   LICENSE = "Apache-2.0 & BSD-2-Clause"
>   LIC_FILES_CHKSUM = "file://LICENSE;md5=41e8e060c26822886b592ab4765c756b"
>
> -SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz"
> +SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz \
> +           file://0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch \
> +          "
>   SRC_URI[md5sum] = "2b5b7bc294698bf30a315a259ef9eec2"
>   SRC_URI[sha256sum] = "196eedbc7f2dd792dae721b1159c7ac132255bb368226353c24d4d5fa7c7797a"
>
> @@ -16,3 +18,5 @@ UPSTREAM_CHECK_REGEX = "log4cplus-stable/(?P<pver>\d+(\.\d+)+)/"
>   inherit autotools pkgconfig
>
>   BBCLASSEXTEND = "native"
> +
> +CXXFLAGS += "-fuse-ld=gold"

The logic [CXXFLAGS += "-fuse-ld=gold"] you added is used to fix the 
linker crash on arm though I didn't encounter.

BTW, after you add [CXXFLAGS += "-fuse-ld=gold"], it fails the build for 
"bitbake libn32-log4cplus" with below logic in local.conf
MACHINE ??= "qemumips64"
MULTILIB_GLOBAL_VARIANTS_append = " libn32"
MULTILIBS ?= "multilib:lib32 multilib:libn32"
DEFAULTTUNE_virtclass-multilib-lib32 ?= "mips"
DEFAULTTUNE_virtclass-multilib-libn32 ?= "mips64-n32"
require conf/multilib.conf

Thanks,

>


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

* Re: [meta-oe][PATCH] log4cplus: Fix build with gold linker
  2019-07-31  6:37   ` Yu, Mingli
@ 2019-07-31  6:46     ` Khem Raj
  2019-07-31  6:52       ` Yu, Mingli
  0 siblings, 1 reply; 8+ messages in thread
From: Khem Raj @ 2019-07-31  6:46 UTC (permalink / raw)
  To: Yu, Mingli; +Cc: openembeded-devel, Adrian Bunk

On Tue, Jul 30, 2019 at 11:36 PM Yu, Mingli <mingli.yu@windriver.com> wrote:
>
> Hi Khem,
>
> On 2019年07月23日 05:18, Khem Raj wrote:
> > Fixes a potential linker error and eventual linker crash when using gold
> > linker [1]
> >
> > [1] https://errors.yoctoproject.org/Errors/Details/253440/
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > Cc: Adrian Bunk <bunk@stusta.de>
> > Cc: Mingli Yu <mingli.yu@windriver.com>
> > ---
> >   ...-version-entry-from-ELF-.comment-sec.patch | 40 +++++++++++++++++++
> >   .../log4cplus/log4cplus_2.0.4.bb              |  6 ++-
> >   2 files changed, 45 insertions(+), 1 deletion(-)
> >   create mode 100644 meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
> >
> > diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
> > new file mode 100644
> > index 0000000000..44a835c35f
> > --- /dev/null
> > +++ b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
> > @@ -0,0 +1,40 @@
> > +From da5338e68f146efadab7c221291ba4c949d8f12f Mon Sep 17 00:00:00 2001
> > +From: Vaclav Haisman <vhaisman@gmail.com>
> > +Date: Sun, 21 Jul 2019 23:23:16 -0700
> > +Subject: [PATCH] Remove log4cplus version entry from ELF .comment section
> > +
> > +Reverts
> > +https://github.com/log4cplus/log4cplus/commit/9cb0d4ade619da4e40628c9b95ff51de3df29f1b
> > +
> > +Upstream-Status: Backport [https://github.com/log4cplus/log4cplus/commit/7e6addc70dffd2e30e902efd18eb845c5d5dd7bb]
> > +
> > +Suggested-by: Adrian Bunk <bunk@stusta.de>
> > +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > +---
> > + src/version.cxx | 12 ------------
> > + 1 file changed, 12 deletions(-)
> > +
> > +diff --git a/src/version.cxx b/src/version.cxx
> > +index ce18212..e002de9 100644
> > +--- a/src/version.cxx
> > ++++ b/src/version.cxx
> > +@@ -34,16 +34,4 @@ namespace log4cplus
> > + unsigned const version = LOG4CPLUS_VERSION;
> > + char const versionStr[] = LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX;
> > +
> > +-namespace
> > +-{
> > +-
> > +-#if defined (__ELF__) && (defined (__GNUC__) || defined (__clang__))
> > +-char const versionStrComment[]
> > +-    __attribute__ ((__used__, __section__ ((".comment"))))
> > +-    = "log4cplus " LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX;
> > +-#endif
> > +-
> > +-
> > +-} // namespace
> > +-
> > + } // namespace log4cplus
> > +--
> > +2.22.0
> > +
> > diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
> > index d86521aba3..b396cabf3f 100644
> > --- a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
> > +++ b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
> > @@ -6,7 +6,9 @@ BUGTRACKER = "http://sourceforge.net/p/log4cplus/bugs/"
> >   LICENSE = "Apache-2.0 & BSD-2-Clause"
> >   LIC_FILES_CHKSUM = "file://LICENSE;md5=41e8e060c26822886b592ab4765c756b"
> >
> > -SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz"
> > +SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz \
> > +           file://0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch \
> > +          "
> >   SRC_URI[md5sum] = "2b5b7bc294698bf30a315a259ef9eec2"
> >   SRC_URI[sha256sum] = "196eedbc7f2dd792dae721b1159c7ac132255bb368226353c24d4d5fa7c7797a"
> >
> > @@ -16,3 +18,5 @@ UPSTREAM_CHECK_REGEX = "log4cplus-stable/(?P<pver>\d+(\.\d+)+)/"
> >   inherit autotools pkgconfig
> >
> >   BBCLASSEXTEND = "native"
> > +
> > +CXXFLAGS += "-fuse-ld=gold"
>
> The logic [CXXFLAGS += "-fuse-ld=gold"] you added is used to fix the
> linker crash on arm though I didn't encounter.

this was not needed infact. It was for testing only please send a
patch to remove
 CXXFLAGS += "-fuse-ld=gold"
>
> BTW, after you add [CXXFLAGS += "-fuse-ld=gold"], it fails the build for
> "bitbake libn32-log4cplus" with below logic in local.conf
> MACHINE ??= "qemumips64"
> MULTILIB_GLOBAL_VARIANTS_append = " libn32"
> MULTILIBS ?= "multilib:lib32 multilib:libn32"
> DEFAULTTUNE_virtclass-multilib-lib32 ?= "mips"
> DEFAULTTUNE_virtclass-multilib-libn32 ?= "mips64-n32"
> require conf/multilib.conf
>
> Thanks,
>
> >


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

* Re: [meta-oe][PATCH] log4cplus: Fix build with gold linker
  2019-07-31  6:46     ` Khem Raj
@ 2019-07-31  6:52       ` Yu, Mingli
  0 siblings, 0 replies; 8+ messages in thread
From: Yu, Mingli @ 2019-07-31  6:52 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel, Adrian Bunk



On 2019年07月31日 14:46, Khem Raj wrote:
> On Tue, Jul 30, 2019 at 11:36 PM Yu, Mingli <mingli.yu@windriver.com> wrote:
>>
>> Hi Khem,
>>
>> On 2019年07月23日 05:18, Khem Raj wrote:
>>> Fixes a potential linker error and eventual linker crash when using gold
>>> linker [1]
>>>
>>> [1] https://errors.yoctoproject.org/Errors/Details/253440/
>>>
>>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>>> Cc: Adrian Bunk <bunk@stusta.de>
>>> Cc: Mingli Yu <mingli.yu@windriver.com>
>>> ---
>>>    ...-version-entry-from-ELF-.comment-sec.patch | 40 +++++++++++++++++++
>>>    .../log4cplus/log4cplus_2.0.4.bb              |  6 ++-
>>>    2 files changed, 45 insertions(+), 1 deletion(-)
>>>    create mode 100644 meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
>>>
>>> diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
>>> new file mode 100644
>>> index 0000000000..44a835c35f
>>> --- /dev/null
>>> +++ b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
>>> @@ -0,0 +1,40 @@
>>> +From da5338e68f146efadab7c221291ba4c949d8f12f Mon Sep 17 00:00:00 2001
>>> +From: Vaclav Haisman <vhaisman@gmail.com>
>>> +Date: Sun, 21 Jul 2019 23:23:16 -0700
>>> +Subject: [PATCH] Remove log4cplus version entry from ELF .comment section
>>> +
>>> +Reverts
>>> +https://github.com/log4cplus/log4cplus/commit/9cb0d4ade619da4e40628c9b95ff51de3df29f1b
>>> +
>>> +Upstream-Status: Backport [https://github.com/log4cplus/log4cplus/commit/7e6addc70dffd2e30e902efd18eb845c5d5dd7bb]
>>> +
>>> +Suggested-by: Adrian Bunk <bunk@stusta.de>
>>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>>> +---
>>> + src/version.cxx | 12 ------------
>>> + 1 file changed, 12 deletions(-)
>>> +
>>> +diff --git a/src/version.cxx b/src/version.cxx
>>> +index ce18212..e002de9 100644
>>> +--- a/src/version.cxx
>>> ++++ b/src/version.cxx
>>> +@@ -34,16 +34,4 @@ namespace log4cplus
>>> + unsigned const version = LOG4CPLUS_VERSION;
>>> + char const versionStr[] = LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX;
>>> +
>>> +-namespace
>>> +-{
>>> +-
>>> +-#if defined (__ELF__) && (defined (__GNUC__) || defined (__clang__))
>>> +-char const versionStrComment[]
>>> +-    __attribute__ ((__used__, __section__ ((".comment"))))
>>> +-    = "log4cplus " LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX;
>>> +-#endif
>>> +-
>>> +-
>>> +-} // namespace
>>> +-
>>> + } // namespace log4cplus
>>> +--
>>> +2.22.0
>>> +
>>> diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
>>> index d86521aba3..b396cabf3f 100644
>>> --- a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
>>> +++ b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
>>> @@ -6,7 +6,9 @@ BUGTRACKER = "http://sourceforge.net/p/log4cplus/bugs/"
>>>    LICENSE = "Apache-2.0 & BSD-2-Clause"
>>>    LIC_FILES_CHKSUM = "file://LICENSE;md5=41e8e060c26822886b592ab4765c756b"
>>>
>>> -SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz"
>>> +SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz \
>>> +           file://0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch \
>>> +          "
>>>    SRC_URI[md5sum] = "2b5b7bc294698bf30a315a259ef9eec2"
>>>    SRC_URI[sha256sum] = "196eedbc7f2dd792dae721b1159c7ac132255bb368226353c24d4d5fa7c7797a"
>>>
>>> @@ -16,3 +18,5 @@ UPSTREAM_CHECK_REGEX = "log4cplus-stable/(?P<pver>\d+(\.\d+)+)/"
>>>    inherit autotools pkgconfig
>>>
>>>    BBCLASSEXTEND = "native"
>>> +
>>> +CXXFLAGS += "-fuse-ld=gold"
>>
>> The logic [CXXFLAGS += "-fuse-ld=gold"] you added is used to fix the
>> linker crash on arm though I didn't encounter.
>
> this was not needed infact. It was for testing only please send a
> patch to remove
>   CXXFLAGS += "-fuse-ld=gold"

Okay, thanks Khem!

Thanks,

>>
>> BTW, after you add [CXXFLAGS += "-fuse-ld=gold"], it fails the build for
>> "bitbake libn32-log4cplus" with below logic in local.conf
>> MACHINE ??= "qemumips64"
>> MULTILIB_GLOBAL_VARIANTS_append = " libn32"
>> MULTILIBS ?= "multilib:lib32 multilib:libn32"
>> DEFAULTTUNE_virtclass-multilib-lib32 ?= "mips"
>> DEFAULTTUNE_virtclass-multilib-libn32 ?= "mips64-n32"
>> require conf/multilib.conf
>>
>> Thanks,
>>
>>>
>


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

end of thread, other threads:[~2019-07-31  6:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-22 21:18 [meta-oe][PATCH] Introduce recipes for sdbus-c++ library and its tools Khem Raj
2019-07-22 21:18 ` [meta-oe][PATCH] log4cplus: Fix build with gold linker Khem Raj
2019-07-23  7:53   ` Adrian Bunk
2019-07-23 13:58     ` Khem Raj
2019-07-31  6:37   ` Yu, Mingli
2019-07-31  6:46     ` Khem Raj
2019-07-31  6:52       ` Yu, Mingli
2019-07-23 19:25 ` [meta-oe][PATCH] Introduce recipes for sdbus-c++ library and its tools Stefan Herbrechtsmeier

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.