Opentracing-cpp package
Hi,
this patch add opentracing-cpp as a logging library, only dep I know about is C++11
[PATCH] Opentracing: add opentracing-cpp v1.2.0 package
br,
Jan
PATCH 1/1 Opentracing: add opentracing-cpp v1.2.0 package
From: Jan Heylen <[email protected]>
--- package/Config.in | 1 + package/opentracing-cpp/Config.in | 11 +++++++++++ package/opentracing-cpp/opentracing-cpp.hash | 2 ++ package/opentracing-cpp/opentracing-cpp.mk | 15 +++++++++++++++ 4 files changed, 29 insertions(+) create mode 100644 package/opentracing-cpp/Config.in create mode 100644 package/opentracing-cpp/opentracing-cpp.hash create mode 100644 package/opentracing-cpp/opentracing-cpp.mk
package/Config.in +1 -0
@@ -1288,6 +1288,7 @@ menu "Logging" source "package/log4cplus/Config.in" source "package/log4cpp/Config.in" source "package/log4cxx/Config.in" + source "package/opentracing-cpp/Config.in" source "package/zlog/Config.in" endmenu
package/opentracing-cpp/Config.in new file +11 -0
@@ -0,0 +1,11 @@ +config BR2_PACKAGE_OPENTRACING_CPP + bool "opentracing-cpp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + help + OpenTracing API for C++ + + http://opentracing.io + +comment "opentracing-cpp needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP
package/opentracing-cpp/opentracing-cpp.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally calculated +sha256 c77041cb2f147ac81b2b0702abfced5565a9cebc318d045c060a4c3e074009ee opentracing-cpp-v1.2.0.tar.gz
package/opentracing-cpp/opentracing-cpp.mk new file +15 -0
@@ -0,0 +1,15 @@ +################################################################################ +# +# opentracing-cpp +# +################################################################################ + +OPENTRACING_CPP_VERSION = v1.2.0 +OPENTRACING_CPP_SITE = $(call github,opentracing,opentracing-cpp,$(OPENTRACING_CPP_VERSION)) +OPENTRACING_CPP_LICENSE = MIT +OPENTRACING_CPP_LICENSE_FILES = COPYING + +OPENTRACING_CPP_INSTALL_STAGING = YES +OPENTRACING_CPP_INSTALL_TARGET = YES + +$(eval $(cmake-package))
Signature · 1 line
2.7.4
PATCH 1/1 Opentracing: add opentracing-cpp v1.2.0 package
Hi Jan,
Thanks for this contribution.
Quoted 17 lines · On Thu, Dec 21, 2017 at 10:41 AM, <[email protected]> wrote:
From: Jan Heylen <[email protected]>
--- package/Config.in | 1 + package/opentracing-cpp/Config.in | 11 +++++++++++ package/opentracing-cpp/opentracing-cpp.hash | 2 ++ package/opentracing-cpp/opentracing-cpp.mk | 15 +++++++++++++++ 4 files changed, 29 insertions(+) create mode 100644 package/opentracing-cpp/Config.in create mode 100644 package/opentracing-cpp/opentracing-cpp.hash create mode 100644 package/opentracing-cpp/opentracing-cpp.mkpackage/Config.in +0
-0
package/Config.in menu "Logging" · line 1291
Quoted 4 lines
package/Config.in +1
-0@@ -1288,6 +1288,7 @@ menu "Logging" source "package/log4cplus/Config.in" source "package/log4cpp/Config.in" source "package/log4cxx/Config.in" + source "package/opentracing-cpp/Config.in"
Here it should be indented with 1 tab instead of 4 spaces.
Quoted 26 lines
package/Config.in +0
-0source "package/zlog/Config.in" endmenupackage/opentracing-cpp/Config.in new file +11
-0@@ -0,0 +1,11 @@ +config BR2_PACKAGE_OPENTRACING_CPP + bool "opentracing-cpp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + help + OpenTracing API for C++ + + http://opentracing.io + +comment "opentracing-cpp needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPPpackage/opentracing-cpp/opentracing-cpp.hash new file +0
-0
package/opentracing-cpp/opentracing-cpp.hash line 2
Quoted 2 lines
package/opentracing-cpp/opentracing-cpp.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally calculated +sha256 c77041cb2f147ac81b2b0702abfced5565a9cebc318d045c060a4c3e074009ee opentracing-cpp-v1.2.0.tar.gz
Could you add the hash of the license files as well, please?
Quoted 9 lines
package/opentracing-cpp/opentracing-cpp.mk new file +3
-0@@ -0,0 +1,15 @@ +################################################################################ +# +# opentracing-cpp
package/opentracing-cpp/opentracing-cpp.mk line 13
Quoted 10 lines
package/opentracing-cpp/opentracing-cpp.mk new file +10
-0+# +################################################################################ + +OPENTRACING_CPP_VERSION = v1.2.0 +OPENTRACING_CPP_SITE = $(call github,opentracing,opentracing-cpp,$(OPENTRACING_CPP_VERSION)) +OPENTRACING_CPP_LICENSE = MIT +OPENTRACING_CPP_LICENSE_FILES = COPYING + +OPENTRACING_CPP_INSTALL_STAGING = YES +OPENTRACING_CPP_INSTALL_TARGET = YES
*_INSTALL_TARGET default is YES, so this line is unnecessary.
Looking at the opentracing-cpp CMakeLists.txt, it seems both shared and static libraries are built and installed.
Maybe, this should be cleaned up for proper static-only (or shared only) support.
Quoted 9 lines
package/opentracing-cpp/opentracing-cpp.mk new file +2
-1+ +$(eval $(cmake-package)) --2.7.4
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Regards,
Signature · 1 line
Samuel
PATCH 1/1 Opentracing: add opentracing-cpp v1.2.0 package
HI Samuel,
thx for the quick feedback, I'll have a look and come back with a V2,
br,
Jan
Quoted 101 lines · Samuel Martin
Hi Jan,
Thanks for this contribution.
Quoted 17 lines · On Thu, Dec 21, 2017 at 10:41 AM, <[email protected]> wrote:
From: Jan Heylen <[email protected]>
--- package/Config.in | 1 + package/opentracing-cpp/Config.in | 11 +++++++++++ package/opentracing-cpp/opentracing-cpp.hash | 2 ++ package/opentracing-cpp/opentracing-cpp.mk | 15 +++++++++++++++ 4 files changed, 29 insertions(+) create mode 100644 package/opentracing-cpp/Config.in create mode 100644 package/opentracing-cpp/opentracing-cpp.hash create mode 100644 package/opentracing-cpp/opentracing-cpp.mkpackage/Config.in +0
-0package/Config.in menu "Logging" · line 1291
Quoted 4 lines
package/Config.in +1
-0@@ -1288,6 +1288,7 @@ menu "Logging" source "package/log4cplus/Config.in" source "package/log4cpp/Config.in" source "package/log4cxx/Config.in" + source "package/opentracing-cpp/Config.in"Here it should be indented with 1 tab instead of 4 spaces.
Quoted 26 lines
package/Config.in +0
-0source "package/zlog/Config.in" endmenupackage/opentracing-cpp/Config.in new file +11
-0@@ -0,0 +1,11 @@ +config BR2_PACKAGE_OPENTRACING_CPP + bool "opentracing-cpp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + help + OpenTracing API for C++ + + http://opentracing.io + +comment "opentracing-cpp needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPPpackage/opentracing-cpp/opentracing-cpp.hash new file +0
-0package/opentracing-cpp/opentracing-cpp.hash line 2
Quoted 2 lines
package/opentracing-cpp/opentracing-cpp.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally calculated +sha256 c77041cb2f147ac81b2b0702abfced5565a9cebc318d045c060a4c3e074009ee opentracing-cpp-v1.2.0.tar.gzCould you add the hash of the license files as well, please?
Quoted 9 lines
package/opentracing-cpp/opentracing-cpp.mk new file +3
-0@@ -0,0 +1,15 @@ +################################################################################ +# +# opentracing-cpppackage/opentracing-cpp/opentracing-cpp.mk line 13
Quoted 10 lines
package/opentracing-cpp/opentracing-cpp.mk new file +10
-0+# +################################################################################ + +OPENTRACING_CPP_VERSION = v1.2.0 +OPENTRACING_CPP_SITE = $(call github,opentracing,opentracing-cpp,$(OPENTRACING_CPP_VERSION)) +OPENTRACING_CPP_LICENSE = MIT +OPENTRACING_CPP_LICENSE_FILES = COPYING + +OPENTRACING_CPP_INSTALL_STAGING = YES +OPENTRACING_CPP_INSTALL_TARGET = YES
*_INSTALL_TARGETdefault is YES, so this line is unnecessary.Looking at the opentracing-cpp CMakeLists.txt, it seems both shared and static libraries are built and installed.
Maybe, this should be cleaned up for proper static-only (or shared only) support.Quoted 9 lines
package/opentracing-cpp/opentracing-cpp.mk new file +2
-1+ +$(eval $(cmake-package)) --2.7.4
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildrootRegards,
--
Samuel
v2 cover Opentracing-cpp: new package
In reply to heyleke at gmail.comFrom: Jan Heylen <[email protected]>
Hi,
this adds opentracing-cpp package as a logging library package.
Extra patch included to make shared/static target configurable.
Upstream of that patch is ongoing:
https://github.com/opentracing/opentracing-cpp/pull/46
br,
Jan
Jan Heylen (2):
Opentracing: add opentracing-cpp v1.2.0 package
opentracing-cpp: make shared/static target a configurable option
package/Config.in | 1 + ...shared-static-target-a-configurable-optio.patch | 73 ++++++++++++++++++++++ package/opentracing-cpp/Config.in | 11 ++++ package/opentracing-cpp/opentracing-cpp.hash | 3 + package/opentracing-cpp/opentracing-cpp.mk | 22 +++++++ 5 files changed, 110 insertions(+) create mode 100644 package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch create mode 100644 package/opentracing-cpp/Config.in create mode 100644 package/opentracing-cpp/opentracing-cpp.hash create mode 100644 package/opentracing-cpp/opentracing-cpp.mk
Signature · 1 line
2.7.4
PATCH v2 1/2 Opentracing: add opentracing-cpp v1.2.0 package
From: Jan Heylen <[email protected]>
---
Changes v1 -> v2:
- Fix indendation typo
- Add licence hash
- remove INTALL_TARGET=yes as that is default
--- package/Config.in | 1 + package/opentracing-cpp/Config.in | 11 +++++++++++ package/opentracing-cpp/opentracing-cpp.hash | 3 +++ package/opentracing-cpp/opentracing-cpp.mk | 14 ++++++++++++++ 4 files changed, 29 insertions(+) create mode 100644 package/opentracing-cpp/Config.in create mode 100644 package/opentracing-cpp/opentracing-cpp.hash create mode 100644 package/opentracing-cpp/opentracing-cpp.mk
package/Config.in +1 -0
@@ -1288,6 +1288,7 @@ menu "Logging" source "package/log4cplus/Config.in" source "package/log4cpp/Config.in" source "package/log4cxx/Config.in" + source "package/opentracing-cpp/Config.in" source "package/zlog/Config.in" endmenu
package/opentracing-cpp/Config.in new file +11 -0
@@ -0,0 +1,11 @@ +config BR2_PACKAGE_OPENTRACING_CPP + bool "opentracing-cpp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + help + OpenTracing API for C++ + + http://opentracing.io + +comment "opentracing-cpp needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP
package/opentracing-cpp/opentracing-cpp.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 c77041cb2f147ac81b2b0702abfced5565a9cebc318d045c060a4c3e074009ee opentracing-cpp-v1.2.0.tar.gz +sha256 b80bffcfee825a69645f7ca97ddba48714031ea5c845198d184714d5490798b6 COPYING
package/opentracing-cpp/opentracing-cpp.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# opentracing-cpp +# +################################################################################ + +OPENTRACING_CPP_VERSION = v1.2.0 +OPENTRACING_CPP_SITE = $(call github,opentracing,opentracing-cpp,$(OPENTRACING_CPP_VERSION)) +OPENTRACING_CPP_LICENSE = MIT +OPENTRACING_CPP_LICENSE_FILES = COPYING + +OPENTRACING_CPP_INSTALL_STAGING = YES + +$(eval $(cmake-package))
Signature · 1 line
2.7.4
PATCH v2 1/2 Opentracing: add opentracing-cpp v1.2.0 package
Hello,
Quoted 3 lines · Jan Heylen
From: Jan Heylen <[email protected]>
Signed-off-by Jan Heylen <[email protected]>
The commit title should be:
opentracing-cpp: new package
Quoted 4 lines
package/Config.in | 1 + package/opentracing-cpp/Config.in | 11 +++++++++++ package/opentracing-cpp/opentracing-cpp.hash | 3 +++ package/opentracing-cpp/opentracing-cpp.mk | 14 ++++++++++++++
Please add an entry in the DEVELOPERS file for this package.
Quoted 7 lines
package/opentracing-cpp/Config.in new file +1
-0@@ -0,0 +1,11 @@ +config BR2_PACKAGE_OPENTRACING_CPP
package/opentracing-cpp/Config.in line 11
Quoted 10 lines
package/opentracing-cpp/Config.in new file +10
-0+ bool "opentracing-cpp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + help + OpenTracing API for C++ + + http://opentracing.io + +comment "opentracing-cpp needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP
You forgot to include in the comment the gcc >= 4.8 dependency.
Also, this package doesn't build with the following defconfig:
BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2017.11-rc1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_OPENTRACING_CPP=y
# BR2_TARGET_ROOTFS_TAR is not set
It fails with:
Quoted 1 line
Quoted 1 line
Quoted 1 line
opentracing-cpp v1.2.0 Building
PATH="/home/thomas/projets/buildroot/output/host/bin:/home/thomas/projets/buildroot/output/host/sbin:/usr/local/bin:/usr/bin:/bin:/home/thomas/.rvm/bin:/usr/local/sbin:/usr/sbin:/home/thomas/.rvm/bin:/home/thomas/sys/bin:/home/thomas/.gem/ruby/2.1.0/bin:/home/thomas/.rvm/bin" /usr/bin/make -j5 -C /home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/ Scanning dependencies of target opentracing
[ 25%] Building CXX object CMakeFiles/opentracing.dir/src/tracer.cpp.o
[ 75%] Building CXX object CMakeFiles/opentracing.dir/src/propagation.cpp.o
[ 75%] Building CXX object CMakeFiles/opentracing.dir/src/noop.cpp.o
In file included from /home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/util.h:13:0,
from /home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/propagation.h:5,
from /home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/tracer.h:4,
from /home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/noop.h:4,
from /home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/src/noop.cpp:1:/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/3rd_party/include/opentracing/expected/expected.hpp:230:24: error: ?exception_ptr? is not a member of ?std?
class unexpected_type< std::exception_ptr >
^
/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/3rd_party/include/opentracing/expected/expected.hpp:230:24: error: ?exception_ptr? is not a member of ?std?
/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/3rd_party/include/opentracing/expected/expected.hpp:230:43: error: template argument 1 is invalid
class unexpected_type< std::exception_ptr >
^and many more of such errors.
Could you verify with ./utils/test-pkg that your package builds properly?
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v2 1/2 Opentracing: add opentracing-cpp v1.2.0 package
Thanks, I'll check it out.
Quoted 102 lines · Thomas Petazzoni
Hello,
Quoted 3 lines · Jan Heylen
From: Jan Heylen <[email protected]>
Signed-off-by Jan Heylen <[email protected]>The commit title should be:
opentracing-cpp: new package
Quoted 4 lines
package/Config.in | 1 + package/opentracing-cpp/Config.in | 11 +++++++++++ package/opentracing-cpp/opentracing-cpp.hash | 3 +++ package/opentracing-cpp/opentracing-cpp.mk | 14 ++++++++++++++Please add an entry in the DEVELOPERS file for this package.
Review
Quoted 1 line
(quoted diff) +0
-0b/package/opentracing-cpp/Config.in
Quoted 6 lines
new file mode 100644
index 0000000..3f6f1adpackage/opentracing-cpp/Config.in new file +1
-0@@ -0,0 +1,11 @@ +config BR2_PACKAGE_OPENTRACING_CPPpackage/opentracing-cpp/Config.in line 11
Quoted 10 lines
package/opentracing-cpp/Config.in new file +10
-0+ bool "opentracing-cpp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + help + OpenTracing API for C++ + + http://opentracing.io + +comment "opentracing-cpp needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPPYou forgot to include in the comment the gcc >= 4.8 dependency.
Also, this package doesn't build with the following defconfig:
BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/ toolchains/tarballs/br-arm-full-2017.11-rc1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
#BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUGis not set BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
#BR2_PACKAGE_BUSYBOXis not set BR2_PACKAGE_OPENTRACING_CPP=y
#BR2_TARGET_ROOTFS_TARis not setIt fails with:
Quoted 1 line
Quoted 1 line
Quoted 1 line
opentracing-cpp v1.2.0 Building
PATH="/home/thomas/projets/buildroot/output/host/bin:/ home/thomas/projets/buildroot/output/host/sbin:/usr/local/ bin:/usr/bin:/bin:/home/thomas/.rvm/bin:/usr/local/ sbin:/usr/sbin:/home/thomas/.rvm/bin:/home/thomas/sys/bin:/ home/thomas/.gem/ruby/2.1.0/bin:/home/thomas/.rvm/bin"
/usr/bin/make-j5 -C/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/
Scanning dependencies of target opentracing
[ 25%] Building CXX objectCMakeFiles/opentracing.dir/src/tracer.cpp.o[ 75%] Building CXX object CMakeFiles/opentracing.dir/src/propagation.cpp.o
[ 75%] Building CXX objectCMakeFiles/opentracing.dir/src/noop.cpp.oIn file included from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/util.h:13:0,
from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/propagation.h:5,
from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/tracer.h:4,
from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/noop.h:4,
from/home/thomas/projets/buildroot/output/build/
opentracing-cpp-v1.2.0/src/noop.cpp:1:/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/3rd_party/include/opentracing/expected/expected.hpp:230:24: error:
?exception_ptr? is not a member of ?std?
class unexpected_type<std::exception_ptr>^
/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/3rd_party/include/opentracing/expected/expected.hpp:230:24: error:
?exception_ptr? is not a member of ?std?/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/3rd_party/include/opentracing/expected/expected.hpp:230:43: error: template argument 1 is invalid
class unexpected_type<std::exception_ptr>^and many more of such errors.
Could you verify with ./utils/test-pkg that your package builds properly?
Quoted 8 lines
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20171230/3b2b0ed3/attachment.html>
PATCH v2 1/2 Opentracing: add opentracing-cpp v1.2.0 package
Thomas, all,
The issue it a bit more complex than I anticipated,
it looks like for armv5 architecture(s), opentracing-cpp hits the following issue:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58938
"std::exception_ptr is missing on architectures with incomplete atomic int support"
which comes down to:
#if (__cplusplus >= 201103L) && (ATOMIC_INT_LOCK_FREE > 1) #include <bits/exception_ptr.h>
#include <bits/nested_exception.h>
#endif
Also related to ATOMIC_INT_LOCK_FREE ==1 for armv5, is the following:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727621
"
According the debian bug report [1], it is not possible to use std::future on armv5 targetting toolchains. This is because libstdc++ will only enable std::future if ATOMIC_INT_LOCK_FREE > 1. There is no LDREX for armv5 and older, so this definition is set to ATOMIC_INT_LOCK_FREE when compiling for ARMv4t or ARMv5.
"
Now, for std::exception_ptr, it got fixed to work withouth atomic support in libstdc++ begin of 2017, so I currently assume only gcc 6.4 (and maybe 5.5) includes that fix.
So now: I wonder what the best options are:
* remembering the libatomic story from a while ago: is there a chance I can get it fixed by some dependency on libatomic or so? I don't think so, but I could be wrong.
* Do I need to remove support for armv5 architectures
* or a construction that armv5 requires a very recent gcc version (seems fixed in gcc 6.4).
any comment?
br,
Jan
Quoted 111 lines · Jan Heylen
Thanks, I'll check it out.
Quoted 107 lines · Thomas Petazzoni
Hello,
Quoted 3 lines · Jan Heylen
From: Jan Heylen <[email protected]>
Signed-off-by Jan Heylen <[email protected]>The commit title should be:
opentracing-cpp: new package
Quoted 4 lines
package/Config.in | 1 + package/opentracing-cpp/Config.in | 11 +++++++++++ package/opentracing-cpp/opentracing-cpp.hash | 3 +++ package/opentracing-cpp/opentracing-cpp.mk | 14 ++++++++++++++Please add an entry in the DEVELOPERS file for this package.
Quoted 8 lines
package/opentracing-cpp/Config.in new file +1
-0@@ -0,0 +1,11 @@ +config BR2_PACKAGE_OPENTRACING_CPPpackage/opentracing-cpp/Config.in line 11
Quoted 10 lines
package/opentracing-cpp/Config.in new file +10
-0+ bool "opentracing-cpp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + help + OpenTracing API for C++ + + http://opentracing.io + +comment "opentracing-cpp needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPPYou forgot to include in the comment the gcc >= 4.8 dependency.
Also, this package doesn't build with the following defconfig:
BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=yBR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2017.11-rc1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
#BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUGis not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
#BR2_PACKAGE_BUSYBOXis not set
BR2_PACKAGE_OPENTRACING_CPP=y
#BR2_TARGET_ROOTFS_TARis not setIt fails with:
Quoted 1 line
Quoted 1 line
Quoted 1 line
opentracing-cpp v1.2.0 Building
PATH="/home/thomas/projets/buildroot/output/host/bin:/home/thomas/projets/buildroot/output/host/sbin:/usr/local/bin:/usr/bin:/bin:/home/thomas/.rvm/bin:/usr/local/sbin:/usr/sbin:/home/thomas/.rvm/bin:/home/thomas/sys/bin:/home/thomas/.gem/ruby/2.1.0/bin:/home/thomas/.rvm/bin"
/usr/bin/make-j5 -C/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/
Scanning dependencies of target opentracing
[ 25%] Building CXX objectCMakeFiles/opentracing.dir/src/tracer.cpp.o
[ 75%] Building CXX objectCMakeFiles/opentracing.dir/src/propagation.cpp.o
[ 75%] Building CXX objectCMakeFiles/opentracing.dir/src/noop.cpp.o
In file included from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/util.h:13:0,
from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/propagation.h:5,
from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/tracer.h:4,
from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/noop.h:4,
from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/src/noop.cpp:1:
/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/3rd_party/include/opentracing/expected/expected.hpp:230:24:
error: ?exception_ptr? is not a member of ?std?
class unexpected_type<std::exception_ptr>^
/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/3rd_party/include/opentracing/expected/expected.hpp:230:24:
error: ?exception_ptr? is not a member of ?std?
/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/3rd_party/include/opentracing/expected/expected.hpp:230:43:
error: template argument 1 is invalid
class unexpected_type<std::exception_ptr>^and many more of such errors.
Could you verify with ./utils/test-pkg that your package builds properly?
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
PATCH v2 1/2 Opentracing: add opentracing-cpp v1.2.0 package
I assume it is this one: (package/mongodb/Config.in)
config BR2_PACKAGE_MONGODB_ARCH_SUPPORTS
bool
# ARM needs LDREX/STREX, so ARMv6+
default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5
# ARM needs LDREX/STREX:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dht0008a/ch01s02s01.html
only question remains if we need to add an OR for gcc 6.4 in case of std::execption_ptr usage.
br,
Jan
Quoted 159 lines · Jan Heylen
Thomas, all,
The issue it a bit more complex than I anticipated,
it looks like for armv5 architecture(s), opentracing-cpp hits the following issue:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58938"
std::exception_ptris missing on architectures with incomplete atomic int support"which comes down to:
#if (
__cplusplus>= 201103L) && (ATOMIC_INT_LOCK_FREE> 1) #include <bits/exception_ptr.h>
#include <bits/nested_exception.h>
#endifAlso related to
ATOMIC_INT_LOCK_FREE==1 for armv5, is the following:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727621"
According the debian bug report [1], it is not possible to usestd::futureon armv5 targetting toolchains. This is because libstdc++ will only enablestd::futureifATOMIC_INT_LOCK_FREE> 1. There is no LDREX for armv5 and older, so this definition is set toATOMIC_INT_LOCK_FREEwhen compiling for ARMv4t or ARMv5.
"Now, for
std::exception_ptr, it got fixed to work withouth atomic support in libstdc++ begin of 2017, so I currently assume only gcc 6.4 (and maybe 5.5) includes that fix.So now: I wonder what the best options are:
* remembering the libatomic story from a while ago: is there a chance I can get it fixed by some dependency on libatomic or so? I don't think so, but I could be wrong.
* Do I need to remove support for armv5 architectures
* or a construction that armv5 requires a very recent gcc version (seems fixed in gcc 6.4).any comment?
br,
Jan
Quoted 111 lines · Jan Heylen
Thanks, I'll check it out.
Quoted 107 lines · Thomas Petazzoni
Hello,
Quoted 3 lines · Jan Heylen
From: Jan Heylen <[email protected]>
Signed-off-by Jan Heylen <[email protected]>The commit title should be:
opentracing-cpp: new package
Quoted 4 lines
package/Config.in | 1 + package/opentracing-cpp/Config.in | 11 +++++++++++ package/opentracing-cpp/opentracing-cpp.hash | 3 +++ package/opentracing-cpp/opentracing-cpp.mk | 14 ++++++++++++++Please add an entry in the DEVELOPERS file for this package.
Quoted 8 lines
package/opentracing-cpp/Config.in new file +1
-0@@ -0,0 +1,11 @@ +config BR2_PACKAGE_OPENTRACING_CPPpackage/opentracing-cpp/Config.in line 11
Quoted 10 lines
package/opentracing-cpp/Config.in new file +10
-0+ bool "opentracing-cpp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + help + OpenTracing API for C++ + + http://opentracing.io + +comment "opentracing-cpp needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPPYou forgot to include in the comment the gcc >= 4.8 dependency.
Also, this package doesn't build with the following defconfig:
BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=yBR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2017.11-rc1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
#BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUGis not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
#BR2_PACKAGE_BUSYBOXis not set
BR2_PACKAGE_OPENTRACING_CPP=y
#BR2_TARGET_ROOTFS_TARis not setIt fails with:
Quoted 1 line
Quoted 1 line
Quoted 1 line
opentracing-cpp v1.2.0 Building
PATH="/home/thomas/projets/buildroot/output/host/bin:/home/thomas/projets/buildroot/output/host/sbin:/usr/local/bin:/usr/bin:/bin:/home/thomas/.rvm/bin:/usr/local/sbin:/usr/sbin:/home/thomas/.rvm/bin:/home/thomas/sys/bin:/home/thomas/.gem/ruby/2.1.0/bin:/home/thomas/.rvm/bin"
/usr/bin/make-j5 -C/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/
Scanning dependencies of target opentracing
[ 25%] Building CXX objectCMakeFiles/opentracing.dir/src/tracer.cpp.o
[ 75%] Building CXX objectCMakeFiles/opentracing.dir/src/propagation.cpp.o
[ 75%] Building CXX objectCMakeFiles/opentracing.dir/src/noop.cpp.o
In file included from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/util.h:13:0,
from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/propagation.h:5,
from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/tracer.h:4,
from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/noop.h:4,
from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/src/noop.cpp:1:
/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/3rd_party/include/opentracing/expected/expected.hpp:230:24:
error: ?exception_ptr? is not a member of ?std?
class unexpected_type<std::exception_ptr>^
/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/3rd_party/include/opentracing/expected/expected.hpp:230:24:
error: ?exception_ptr? is not a member of ?std?
/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/3rd_party/include/opentracing/expected/expected.hpp:230:43:
error: template argument 1 is invalid
class unexpected_type<std::exception_ptr>^and many more of such errors.
Could you verify with ./utils/test-pkg that your package builds properly?
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
PATCH v2 1/2 Opentracing: add opentracing-cpp v1.2.0 package
I found that this issue has actually a feature in buildroot:
BR2_TOOLCHAIN_HAS_GCC_BUG_64735
I'll dig some deeper into that and propose a new version of the patch.
br,
Jan
Quoted 177 lines · Jan Heylen
I assume it is this one: (package/mongodb/Config.in)
config
BR2_PACKAGE_MONGODB_ARCH_SUPPORTS
bool
# ARM needs LDREX/STREX, so ARMv6+
default y ifBR2_arm&& !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5# ARM needs LDREX/STREX:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dht0008a/ch01s02s01.htmlonly question remains if we need to add an OR for gcc 6.4 in case of
std::execption_ptrusage.br,
Jan
Quoted 159 lines · Jan Heylen
Thomas, all,
The issue it a bit more complex than I anticipated,
it looks like for armv5 architecture(s), opentracing-cpp hits the following issue:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58938"
std::exception_ptris missing on architectures with incomplete atomic int support"which comes down to:
#if (
__cplusplus>= 201103L) && (ATOMIC_INT_LOCK_FREE> 1) #include <bits/exception_ptr.h>
#include <bits/nested_exception.h>
#endifAlso related to
ATOMIC_INT_LOCK_FREE==1 for armv5, is the following:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727621"
According the debian bug report [1], it is not possible to usestd::futureon armv5 targetting toolchains. This is because libstdc++ will only enablestd::futureifATOMIC_INT_LOCK_FREE> 1. There is no LDREX for armv5 and older, so this definition is set toATOMIC_INT_LOCK_FREEwhen compiling for ARMv4t or ARMv5.
"Now, for
std::exception_ptr, it got fixed to work withouth atomic support in libstdc++ begin of 2017, so I currently assume only gcc 6.4 (and maybe 5.5) includes that fix.So now: I wonder what the best options are:
* remembering the libatomic story from a while ago: is there a chance I can get it fixed by some dependency on libatomic or so? I don't think so, but I could be wrong.
* Do I need to remove support for armv5 architectures
* or a construction that armv5 requires a very recent gcc version (seems fixed in gcc 6.4).any comment?
br,
Jan
Quoted 111 lines · Jan Heylen
Thanks, I'll check it out.
Quoted 107 lines · Thomas Petazzoni
Hello,
Quoted 3 lines · Jan Heylen
From: Jan Heylen <[email protected]>
Signed-off-by Jan Heylen <[email protected]>The commit title should be:
opentracing-cpp: new package
Quoted 4 lines
package/Config.in | 1 + package/opentracing-cpp/Config.in | 11 +++++++++++ package/opentracing-cpp/opentracing-cpp.hash | 3 +++ package/opentracing-cpp/opentracing-cpp.mk | 14 ++++++++++++++Please add an entry in the DEVELOPERS file for this package.
Quoted 8 lines
package/opentracing-cpp/Config.in new file +1
-0@@ -0,0 +1,11 @@ +config BR2_PACKAGE_OPENTRACING_CPPpackage/opentracing-cpp/Config.in line 11
Quoted 10 lines
package/opentracing-cpp/Config.in new file +10
-0+ bool "opentracing-cpp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + help + OpenTracing API for C++ + + http://opentracing.io + +comment "opentracing-cpp needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPPYou forgot to include in the comment the gcc >= 4.8 dependency.
Also, this package doesn't build with the following defconfig:
BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=yBR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2017.11-rc1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
#BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUGis not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
#BR2_PACKAGE_BUSYBOXis not set
BR2_PACKAGE_OPENTRACING_CPP=y
#BR2_TARGET_ROOTFS_TARis not setIt fails with:
Quoted 1 line
Quoted 1 line
Quoted 1 line
opentracing-cpp v1.2.0 Building
PATH="/home/thomas/projets/buildroot/output/host/bin:/home/thomas/projets/buildroot/output/host/sbin:/usr/local/bin:/usr/bin:/bin:/home/thomas/.rvm/bin:/usr/local/sbin:/usr/sbin:/home/thomas/.rvm/bin:/home/thomas/sys/bin:/home/thomas/.gem/ruby/2.1.0/bin:/home/thomas/.rvm/bin"
/usr/bin/make-j5 -C/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/
Scanning dependencies of target opentracing
[ 25%] Building CXX objectCMakeFiles/opentracing.dir/src/tracer.cpp.o
[ 75%] Building CXX objectCMakeFiles/opentracing.dir/src/propagation.cpp.o
[ 75%] Building CXX objectCMakeFiles/opentracing.dir/src/noop.cpp.o
In file included from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/util.h:13:0,
from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/propagation.h:5,
from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/tracer.h:4,
from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/include/opentracing/noop.h:4,
from/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/src/noop.cpp:1:
/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/3rd_party/include/opentracing/expected/expected.hpp:230:24:
error: ?exception_ptr? is not a member of ?std?
class unexpected_type<std::exception_ptr>^
/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/3rd_party/include/opentracing/expected/expected.hpp:230:24:
error: ?exception_ptr? is not a member of ?std?
/home/thomas/projets/buildroot/output/build/opentracing-cpp-v1.2.0/3rd_party/include/opentracing/expected/expected.hpp:230:43:
error: template argument 1 is invalid
class unexpected_type<std::exception_ptr>^and many more of such errors.
Could you verify with ./utils/test-pkg that your package builds properly?
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
PATCH v2 1/2 Opentracing: add opentracing-cpp v1.2.0 package
Hello,
Quoted 5 lines · Jan Heylen
I found that this issue has actually a feature in buildroot:
BR2_TOOLCHAIN_HAS_GCC_BUG_64735I'll dig some deeper into that and propose a new version of the patch.
Indeed! I forgot about this one. So just make your package depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735.
Could you resubmit, taking into account this issue, and the few other comments that I made ?
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v2 1/2 Opentracing: add opentracing-cpp v1.2.0 package
Will do, thanks! I tested it already. Need to squash the commits and resubmit. But first some festivities to handle. So my best wishes and you'll see the patch in 2018 ;-)
Also m68k coldfire doesn't seem to handle it correctly. So I'll depend on that one too.
Br,
Jan
On 31 Dec 2017 5:10 pm, "Thomas Petazzoni" <
[email protected]> wrote:
Hello,
Quoted 5 lines · Jan Heylen
I found that this issue has actually a feature in buildroot:
BR2_TOOLCHAIN_HAS_GCC_BUG_64735I'll dig some deeper into that and propose a new version of the patch.
Indeed! I forgot about this one. So just make your package depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735.
Could you resubmit, taking into account this issue, and the few other comments that I made ?
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20171231/ab830141/attachment.html>
v3 cover Opentracing-cpp: new package
In reply to Jan HeylenFrom: Jan Heylen <[email protected]>
Hi,
V3 of "this adds opentracing-cpp package as a logging library package."
The included patch is already upstreamed and merged, but no new opentracing-cpp release was created yet.
br,
Jan
Jan Heylen (1):
opentracing-cpp: new package
DEVELOPERS | 3 + package/Config.in | 1 + ...shared-static-target-a-configurable-optio.patch | 74 ++++++++++++++++++++++ package/opentracing-cpp/Config.in | 16 +++++ package/opentracing-cpp/opentracing-cpp.hash | 3 + package/opentracing-cpp/opentracing-cpp.mk | 22 +++++++ 6 files changed, 119 insertions(+) create mode 100644 package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch create mode 100644 package/opentracing-cpp/Config.in create mode 100644 package/opentracing-cpp/opentracing-cpp.hash create mode 100644 package/opentracing-cpp/opentracing-cpp.mk
Signature · 1 line
2.7.4
PATCH v3 1/1 opentracing-cpp: new package
From: Jan Heylen <[email protected]>
---
test-pkg passes
Changes v2 -> v3:
- Fix another indendation typo
- Add DEVELOPERS file change
- Signoff opetracing-cpp patch
- run test-pkg and include various dependencies (toolchain bug & m68k cf)
- add comments in Config.in on the dependencies
Changes v1 -> v2:
- Fix indendation typo
- Add licence hash
- remove INTALL_TARGET=yes as that is default
---
DEVELOPERS | 3 + package/Config.in | 1 + ...shared-static-target-a-configurable-optio.patch | 74 ++++++++++++++++++++++ package/opentracing-cpp/Config.in | 16 +++++ package/opentracing-cpp/opentracing-cpp.hash | 3 + package/opentracing-cpp/opentracing-cpp.mk | 22 +++++++ 6 files changed, 119 insertions(+) create mode 100644 package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch create mode 100644 package/opentracing-cpp/Config.in create mode 100644 package/opentracing-cpp/opentracing-cpp.hash create mode 100644 package/opentracing-cpp/opentracing-cpp.mk
DEVELOPERS +3 -0
@@ -790,6 +790,9 @@ F: package/pangomm/ F: package/rpm/ F: package/yad/ +N: Jan Heylen <[email protected]> +F: package/opentracing-cpp/ + N: Jan Kraval <[email protected]> F: board/orangepi/orangepi-lite F: configs/orangepi_lite_defconfig
package/Config.in +1 -0
@@ -1288,6 +1288,7 @@ menu "Logging" source "package/log4cplus/Config.in" source "package/log4cpp/Config.in" source "package/log4cxx/Config.in" + source "package/opentracing-cpp/Config.in" source "package/zlog/Config.in" endmenu
package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch new file +74 -0
74 lines not on this page · raw message
package/opentracing-cpp/Config.in new file +16 -0
@@ -0,0 +1,16 @@ +config BR2_PACKAGE_OPENTRACING_CPP + bool "opentracing-cpp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr + depends on !BR2_m68k_cf # exception_ptr + help + OpenTracing API for C++ + + http://opentracing.io + +comment "opentracing-cpp needs a toolchain w/ C++11" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + +comment "opentracing-cpp needs exception_ptr" + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735 || BR2_m68k_cf
package/opentracing-cpp/opentracing-cpp.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 c77041cb2f147ac81b2b0702abfced5565a9cebc318d045c060a4c3e074009ee opentracing-cpp-v1.2.0.tar.gz +sha256 b80bffcfee825a69645f7ca97ddba48714031ea5c845198d184714d5490798b6 COPYING
package/opentracing-cpp/opentracing-cpp.mk new file +22 -0
@@ -0,0 +1,22 @@ +################################################################################ +# +# opentracing-cpp +# +################################################################################ + +OPENTRACING_CPP_VERSION = v1.2.0 +OPENTRACING_CPP_SITE = $(call github,opentracing,opentracing-cpp,$(OPENTRACING_CPP_VERSION)) +OPENTRACING_CPP_LICENSE = MIT +OPENTRACING_CPP_LICENSE_FILES = COPYING + +OPENTRACING_CPP_INSTALL_STAGING = YES + +ifeq ($(BR2_STATIC_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF +endif + +$(eval $(cmake-package))
Signature · 1 line
2.7.4
PATCH v3 1/1 opentracing-cpp: new package
Hi Jan,
Quoted 4 lines · Jan Heylen
From: Jan Heylen <[email protected]>
Signed-off-by Jan Heylen <[email protected]>---
[...]
Quoted 16 lines
package/opentracing-cpp/opentracing-cpp.mk new file +10
-0@@ -0,0 +1,22 @@ +################################################################################ +# +# opentracing-cpp +# +################################################################################ + +OPENTRACING_CPP_VERSION = v1.2.0 +OPENTRACING_CPP_SITE = $(call github,opentracing,opentracing-cpp,$(OPENTRACING_CPP_VERSION)) +OPENTRACING_CPP_LICENSE = MIT +OPENTRACING_CPP_LICENSE_FILES = COPYING
package/opentracing-cpp/opentracing-cpp.mk line 20
Quoted 10 lines
package/opentracing-cpp/opentracing-cpp.mk new file +10
-0+ +OPENTRACING_CPP_INSTALL_STAGING = YES + +ifeq ($(BR2_STATIC_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF +endif
The -DBUILD_SHARED_LIBS setting should be handled correctly by the Buildroot cmake infrastructure at package/pkg-cmake.mk. Doesn't that work for you?
baruch
Quoted 2 lines
package/opentracing-cpp/opentracing-cpp.mk new file +2
-0+ +$(eval $(cmake-package))
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -PATCH v3 1/1 opentracing-cpp: new package
I copied that infra from another package. Thomas also indicated already that there is something already generalised but not fully yet. So he adviced to keep it like this for the time being. If this is not nok, please advice differently.
Br,
Jan
Quoted 53 lines · Baruch Siach
Hi Jan,
Quoted 4 lines · Jan Heylen
From: Jan Heylen <[email protected]>
Signed-off-by Jan Heylen <[email protected]>---
[...]
Review
Quoted 1 line
(quoted diff) +0
-0
b/package/opentracing-cpp/opentracing-cpp.mkpackage/opentracing-cpp/opentracing-cpp.mk line 1
Quoted 6 lines
new file mode 100644
index 0000000..9b2d473package/opentracing-cpp/opentracing-cpp.mk new file +1
-0@@ -0,0 +1,22 @@ +################################################################################
package/opentracing-cpp/opentracing-cpp.mk
Quoted 4 lines
package/opentracing-cpp/opentracing-cpp.mk new file +4
-0+# +# opentracing-cpp +# +################################################################################
package/opentracing-cpp/opentracing-cpp.mk
Quoted 3 lines
package/opentracing-cpp/opentracing-cpp.mk new file +3
-0+ +OPENTRACING_CPP_VERSION = v1.2.0 +OPENTRACING_CPP_SITE = $(call github,opentracing,opentracing-cpp,$(OPENTRACING_CPP_VERSION))
package/opentracing-cpp/opentracing-cpp.mk
Quoted 7 lines
package/opentracing-cpp/opentracing-cpp.mk new file +7
-0+OPENTRACING_CPP_LICENSE = MIT +OPENTRACING_CPP_LICENSE_FILES = COPYING + +OPENTRACING_CPP_INSTALL_STAGING = YES + +ifeq ($(BR2_STATIC_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF-DBUILD_STATIC_LIBS=ON
package/opentracing-cpp/opentracing-cpp.mk line 17
Quoted 2 lines
package/opentracing-cpp/opentracing-cpp.mk new file +2
-0+else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=ON-DBUILD_STATIC_LIBS=ON
package/opentracing-cpp/opentracing-cpp.mk line 19
Quoted 2 lines
package/opentracing-cpp/opentracing-cpp.mk new file +2
-0+else ifeq ($(BR2_SHARED_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=ON-DBUILD_STATIC_LIBS=OFF
package/opentracing-cpp/opentracing-cpp.mk line 20
Quoted 1 line
package/opentracing-cpp/opentracing-cpp.mk new file +1
-0+endifThe -DBUILD_SHARED_LIBS setting should be handled correctly by the Buildroot
cmake infrastructure atpackage/pkg-cmake.mk. Doesn't that work for you?baruch
package/opentracing-cpp/opentracing-cpp.mk line 22
Quoted 2 lines
package/opentracing-cpp/opentracing-cpp.mk new file +2
-0+ +$(eval $(cmake-package))
Quoted 7 lines
--
http://baruch.siach.name/blog/ ~. .~ Tk Open
Systems =}------------------------------------------------ooO--U-- Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180103/56d2169c/attachment.html>
PATCH v3 1/1 opentracing-cpp: new package
Hi Jan,
Quoted 4 lines · Jan Heylen
I copied that infra from another package. Thomas also indicated already that there is something already generalised but not fully yet. So he adviced to keep it like this for the time being. If this is not nok, please advice differently.
I see that rabbitmq-c is also doing that. I think that the -DBUILD_SHARED_LIBS part is redundant. But the -DBUILD_STATIC_LIBS part might be needed, since the generic code does not handle that.
baruch
Quoted 51 lines · Baruch Siach
Quoted 50 lines · Jan Heylen
Quoted 4 lines
From: Jan Heylen <[email protected]>
Signed-off-by Jan Heylen <[email protected]>---
[...]
Review
Quoted 1 line
(quoted diff) +0
-0
b/package/opentracing-cpp/opentracing-cpp.mkpackage/opentracing-cpp/opentracing-cpp.mk line 1
Quoted 6 lines
new file mode 100644
index 0000000..9b2d473package/opentracing-cpp/opentracing-cpp.mk new file +1
-0@@ -0,0 +1,22 @@ +################################################################################
package/opentracing-cpp/opentracing-cpp.mk
Quoted 4 lines
package/opentracing-cpp/opentracing-cpp.mk new file +4
-0+# +# opentracing-cpp +# +################################################################################
package/opentracing-cpp/opentracing-cpp.mk
Quoted 3 lines
package/opentracing-cpp/opentracing-cpp.mk new file +3
-0+ +OPENTRACING_CPP_VERSION = v1.2.0 +OPENTRACING_CPP_SITE = $(call github,opentracing,opentracing-cpp,$(OPENTRACING_CPP_VERSION))
package/opentracing-cpp/opentracing-cpp.mk
Quoted 7 lines
package/opentracing-cpp/opentracing-cpp.mk new file +7
-0+OPENTRACING_CPP_LICENSE = MIT +OPENTRACING_CPP_LICENSE_FILES = COPYING + +OPENTRACING_CPP_INSTALL_STAGING = YES + +ifeq ($(BR2_STATIC_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF-DBUILD_STATIC_LIBS=ON
package/opentracing-cpp/opentracing-cpp.mk line 17
Quoted 2 lines
package/opentracing-cpp/opentracing-cpp.mk new file +2
-0+else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=ON-DBUILD_STATIC_LIBS=ON
package/opentracing-cpp/opentracing-cpp.mk line 19
Quoted 2 lines
package/opentracing-cpp/opentracing-cpp.mk new file +2
-0+else ifeq ($(BR2_SHARED_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=ON-DBUILD_STATIC_LIBS=OFF
package/opentracing-cpp/opentracing-cpp.mk line 20
Quoted 1 line
package/opentracing-cpp/opentracing-cpp.mk new file +1
-0+endifThe -DBUILD_SHARED_LIBS setting should be handled correctly by the Buildroot
cmake infrastructure atpackage/pkg-cmake.mk. Doesn't that work for you?baruch
Quoted 2 lines
package/opentracing-cpp/opentracing-cpp.mk new file +2
-0+ +$(eval $(cmake-package))
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -PATCH v3 1/1 opentracing-cpp: new package
Hello,
Quoted 11 lines · Baruch Siach
Hi Jan,
Quoted 4 lines · Jan Heylen
I copied that infra from another package. Thomas also indicated already that there is something already generalised but not fully yet. So he adviced to keep it like this for the time being. If this is not nok, please advice differently.
I see that rabbitmq-c is also doing that. I think that the -DBUILD_SHARED_LIBS part is redundant. But the -DBUILD_STATIC_LIBS part might be needed, since the generic code does not handle that.
The generic code in pkg-cmake.mk is indeed not very consistent. It is strange to pass BUILD_SHARED_LIBS, but not BUILD_STATIC_LIBS.
On the other hand, there doesn't seem to be a real standardization of such options in the CMake world. I.e it's really up to each individual package to obey to BUILD_SHARED_LIBS/BUILD_STATIC_LIBS, and many CMake packages have their own custom options to enable/disable shared/static library build.
But I guess for the sake of consistency pkg-cmake.mk should also pass BUILD_STATIC_LIBS, and we should accordingly cleanup the CMake packages that rely on BUILD_SHARED_LIBS/BUILD_STATIC_LIBS to not pass them explicitly, and rely on what the pkg-cmake infra is doing.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v3 1/1 opentracing-cpp: new package
Hi all,
Apologies for being late back in this thread :-/
Quoted 11 lines · Thomas Petazzoni
Hello,
Quoted 8 lines · Baruch Siach
Hi Jan,
Quoted 4 lines · Jan Heylen
I copied that infra from another package. Thomas also indicated already that there is something already generalised but not fully yet. So he adviced to keep it like this for the time being. If this is not nok, please advice differently.
Quoted 6 lines
Quoted 3 lines
I see that rabbitmq-c is also doing that. I think that the -DBUILD_SHARED_LIBS part is redundant. But the -DBUILD_STATIC_LIBS part might be needed, since the generic code does not handle that.
The generic code in pkg-cmake.mk is indeed not very consistent. It is strange to pass
BUILD_SHARED_LIBS, but notBUILD_STATIC_LIBS.
Well, I think the code in pkg-cmake.mk has been done to stick as close as possible to what is the default behavior of CMake.
But, it is true its default behavior is not really consistent since CMake only offers a boolean variable driving the way the libraries are built (see [1])
Quoted 11 lines
On the other hand, there doesn't seem to be a real standardization of such options in the CMake world. I.e it's really up to each individual package to obey to BUILD_SHARED_LIBS/BUILD_STATIC_LIBS, and many CMake packages have their own custom options to enable/disable shared/static library build.
But I guess for the sake of consistency pkg-cmake.mk should also pass
BUILD_STATIC_LIBS, and we should accordingly cleanup the CMake packages that rely on BUILD_SHARED_LIBS/BUILD_STATIC_LIBS to not pass them explicitly, and rely on what the pkg-cmake infra is doing.
Adding BUILD_STATIC_LIBS will make thing a bit nicer (at least symetric), though it is not standard in any way, which means some projects may choose another name for a similar option and there is not much we can do about this.
BTW, some projects still seems ignoring the existence of the BUILD_SHARED_LIBS variable since they add a similar option with a different name.
[1] https://cmake.org/cmake/help/v3.8/manual/cmake-variables.7.html#variables-that-change-behavior
Regards,
Signature · 1 line
Samuel
PATCH v3 1/1 opentracing-cpp: new package
Hello,
Quoted 16 lines · Samuel Martin
Quoted 10 lines
On the other hand, there doesn't seem to be a real standardization of such options in the CMake world. I.e it's really up to each individual package to obey to BUILD_SHARED_LIBS/BUILD_STATIC_LIBS, and many CMake packages have their own custom options to enable/disable shared/static library build.
But I guess for the sake of consistency pkg-cmake.mk should also pass
BUILD_STATIC_LIBS, and we should accordingly cleanup the CMake packages that rely on BUILD_SHARED_LIBS/BUILD_STATIC_LIBS to not pass them explicitly, and rely on what the pkg-cmake infra is doing.Adding
BUILD_STATIC_LIBSwill make thing a bit nicer (at least symetric), though it is not standard in any way, which means some projects may choose another name for a similar option and there is not much we can do about this.
Quoted 6 lines
BTW, some projects still seems ignoring the existence of the
BUILD_SHARED_LIBSvariable since they add a similar option with a different name.[1] https://cmake.org/cmake/help/v3.8/manual/cmake-variables.7.html#variables-that-change-behavior
So BUILD_SHARED_LIBS is somewhat standardized by CMake, but not BUILD_STATIC_LIBS.
If that's the case, then we should not handle BUILD_STATIC_LIBS in pkg-cmake.mk, contrary to what I said previously. And we should add a comment explaining this in pkg-cmake.mk.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v2 2/2 opentracing-cpp: make shared/static target a configurable option
In reply to Jan HeylenFrom: Jan Heylen <[email protected]>
---
Changes v1 -> v2:
- v1: no patch include, v2: include extra patch to make shared/static configurable
--- ...shared-static-target-a-configurable-optio.patch | 73 ++++++++++++++++++++++ package/opentracing-cpp/opentracing-cpp.mk | 8 +++ 2 files changed, 81 insertions(+) create mode 100644 package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch
package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch new file +73 -0
@@ -0,0 +1,73 @@ +From 9462847f23a25524fdc2112cbc8de3f2c02a1669 Mon Sep 17 00:00:00 2001 +From: Jan Heylen <[email protected]> +Date: Fri, 22 Dec 2017 22:04:29 +0100 +Subject: [PATCH] CMake: make shared/static target a configurable option + +--- + CMakeLists.txt | 40 ++++++++++++++++++++++++++++------------ + 1 file changed, 28 insertions(+), 12 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aadf2f9..d03bd00 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -70,18 +70,36 @@ endif() + include_directories(include) + include_directories(SYSTEM 3rd_party/include) + ++option(BUILD_SHARED_LIBS "Build as a shared library" ON) ++option(BUILD_STATIC_LIBS "Build as a static library" ON) ++ ++if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS) ++ message(FATAL_ERROR "One or both of BUILD_SHARED_LIBS or BUILD_STATIC_LIBS must be set to ON to build") ++endif() ++ + set(SRCS src/propagation.cpp src/noop.cpp src/tracer.cpp) +-add_library(opentracing SHARED ${SRCS}) +-target_include_directories(opentracing INTERFACE "$<INSTALL_INTERFACE:include/>") +-set_target_properties(opentracing PROPERTIES VERSION ${OPENTRACING_VERSION_STRING} ++ ++if (BUILD_SHARED_LIBS) ++ add_library(opentracing SHARED ${SRCS}) ++ target_include_directories(opentracing INTERFACE "$<INSTALL_INTERFACE:include/>") ++ set_target_properties(opentracing PROPERTIES VERSION ${OPENTRACING_VERSION_STRING} + SOVERSION ${OPENTRACING_VERSION_MAJOR}) +-add_library(opentracing-static STATIC ${SRCS}) +-set_target_properties(opentracing-static PROPERTIES OUTPUT_NAME opentracing) +-target_include_directories(opentracing-static INTERFACE "$<INSTALL_INTERFACE:include/>") +-if (CLANG_TIDY_EXE) +- set_target_properties(opentracing PROPERTIES ++ install(TARGETS opentracing EXPORT OpenTracingTargets ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++ if (CLANG_TIDY_EXE) ++ set_target_properties(opentracing PROPERTIES + CXX_CLANG_TIDY "${DO_CLANG_TIDY}") +-endif() ++ endif() ++endif(BUILD_SHARED_LIBS) ++ ++if (BUILD_STATIC_LIBS) ++ add_library(opentracing-static STATIC ${SRCS}) ++ set_target_properties(opentracing-static PROPERTIES OUTPUT_NAME opentracing) ++ target_include_directories(opentracing-static INTERFACE "$<INSTALL_INTERFACE:include/>") ++ install(TARGETS opentracing-static EXPORT OpenTracingTargets ++ ARCHIVE DESTINATION lib) ++endif(BUILD_STATIC_LIBS) + + + install(DIRECTORY 3rd_party/include/opentracing DESTINATION include +@@ -89,9 +107,7 @@ install(DIRECTORY 3rd_party/include/opentracing DESTINATION include + PATTERN "*.h") + install(DIRECTORY include/opentracing DESTINATION include + FILES_MATCHING PATTERN "*.h") +-install(TARGETS opentracing opentracing-static EXPORT OpenTracingTargets +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib) ++ + + # ============================================================================== + # Package configuration setup +-- +2.7.4 +
package/opentracing-cpp/opentracing-cpp.mk +8 -0
@@ -11,4 +11,12 @@ OPENTRACING_CPP_LICENSE_FILES = COPYING OPENTRACING_CPP_INSTALL_STAGING = YES +ifeq ($(BR2_STATIC_LIBS),y) + OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) + OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_LIBS),y) + OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF +endif + $(eval $(cmake-package))
Signature · 1 line
2.7.4
PATCH v2 2/2 opentracing-cpp: make shared/static target a configurable option
fyi, patch got merged into opentracing-cpp upstream, no opentracing-cpp release yet that includes it
Quoted 113 lines · Jan Heylen
From: Jan Heylen <[email protected]>
Signed-off-by Jan Heylen <[email protected]>---
Changes v1 -> v2:
- v1: no patch include, v2: include extra patch to make shared/static configurable--- ...shared-static-target-a-configurable-optio.patch | 73 ++++++++++++++++++++++ package/opentracing-cpp/opentracing-cpp.mk | 8 +++ 2 files changed, 81 insertions(+) create mode 100644 package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patchpackage/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch new file +73
-0@@ -0,0 +1,73 @@ +From 9462847f23a25524fdc2112cbc8de3f2c02a1669 Mon Sep 17 00:00:00 2001 +From: Jan Heylen <[email protected]> +Date: Fri, 22 Dec 2017 22:04:29 +0100 +Subject: [PATCH] CMake: make shared/static target a configurable option + +--- + CMakeLists.txt | 40 ++++++++++++++++++++++++++++------------ + 1 file changed, 28 insertions(+), 12 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aadf2f9..d03bd00 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -70,18 +70,36 @@ endif() + include_directories(include) + include_directories(SYSTEM 3rd_party/include) + ++option(BUILD_SHARED_LIBS "Build as a shared library" ON) ++option(BUILD_STATIC_LIBS "Build as a static library" ON) ++ ++if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS) ++ message(FATAL_ERROR "One or both of BUILD_SHARED_LIBS or BUILD_STATIC_LIBS must be set to ON to build") ++endif() ++ + set(SRCS src/propagation.cpp src/noop.cpp src/tracer.cpp) +-add_library(opentracing SHARED ${SRCS}) +-target_include_directories(opentracing INTERFACE "$<INSTALL_INTERFACE:include/>") +-set_target_properties(opentracing PROPERTIES VERSION ${OPENTRACING_VERSION_STRING} ++ ++if (BUILD_SHARED_LIBS) ++ add_library(opentracing SHARED ${SRCS}) ++ target_include_directories(opentracing INTERFACE "$<INSTALL_INTERFACE:include/>") ++ set_target_properties(opentracing PROPERTIES VERSION ${OPENTRACING_VERSION_STRING} + SOVERSION ${OPENTRACING_VERSION_MAJOR}) +-add_library(opentracing-static STATIC ${SRCS}) +-set_target_properties(opentracing-static PROPERTIES OUTPUT_NAME opentracing) +-target_include_directories(opentracing-static INTERFACE "$<INSTALL_INTERFACE:include/>") +-if (CLANG_TIDY_EXE) +- set_target_properties(opentracing PROPERTIES ++ install(TARGETS opentracing EXPORT OpenTracingTargets ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++ if (CLANG_TIDY_EXE) ++ set_target_properties(opentracing PROPERTIES + CXX_CLANG_TIDY "${DO_CLANG_TIDY}") +-endif() ++ endif() ++endif(BUILD_SHARED_LIBS) ++ ++if (BUILD_STATIC_LIBS) ++ add_library(opentracing-static STATIC ${SRCS}) ++ set_target_properties(opentracing-static PROPERTIES OUTPUT_NAME opentracing) ++ target_include_directories(opentracing-static INTERFACE "$<INSTALL_INTERFACE:include/>") ++ install(TARGETS opentracing-static EXPORT OpenTracingTargets ++ ARCHIVE DESTINATION lib) ++endif(BUILD_STATIC_LIBS) + + + install(DIRECTORY 3rd_party/include/opentracing DESTINATION include +@@ -89,9 +107,7 @@ install(DIRECTORY 3rd_party/include/opentracing DESTINATION include + PATTERN "*.h") + install(DIRECTORY include/opentracing DESTINATION include + FILES_MATCHING PATTERN "*.h") +-install(TARGETS opentracing opentracing-static EXPORT OpenTracingTargets +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib) ++ + + # ============================================================================== + # Package configuration setup +-- +2.7.4 +package/opentracing-cpp/opentracing-cpp.mk +8
-1@@ -11,4 +11,12 @@ OPENTRACING_CPP_LICENSE_FILES = COPYING OPENTRACING_CPP_INSTALL_STAGING = YES +ifeq ($(BR2_STATIC_LIBS),y) + OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) + OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_LIBS),y) + OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF +endif + $(eval $(cmake-package)) --2.7.4
PATCH v2 2/2 opentracing-cpp: make shared/static target a configurable option
In reply to Jan HeylenHello,
Quoted 3 lines · Jan Heylen
From: Jan Heylen <[email protected]>
Signed-off-by Jan Heylen <[email protected]>
As I said, please merge this into the previous patch.
package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch line 5
Quoted 11 lines
package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch new file +5
-0@@ -0,0 +1,73 @@ +From 9462847f23a25524fdc2112cbc8de3f2c02a1669 Mon Sep 17 00:00:00 2001 +From: Jan Heylen <[email protected]> +Date: Fri, 22 Dec 2017 22:04:29 +0100 +Subject: [PATCH] CMake: make shared/static target a configurable option +
Please add your Signed-off-by line here.
package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch line 12
Quoted 7 lines
package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch new file +7
-0+ifeq ($(BR2_STATIC_LIBS),y) + OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) + OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_LIBS),y) + OPENTRACING_CPP_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF +endif
Don't indent the OPENTRACING_CPP_CONF_OPTS lines.
The CMake package infrastructure is already passing -DBUILD_SHARED_LIBS=OFF/ON, but not -DBUILD_STATIC_LIBS=ON/OFF. And a number of packages are anyway passing -DBUILD_SHARED_LIBS=ON/OFF. Until we clarify this, it's OK to have your package pass both options.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
v2 cover Opentracing-cpp: new package
In reply to Jan HeylenHello,
Thanks for this contribution!
Quoted 3 lines · Jan Heylen
Jan Heylen (2):
Opentracing: add opentracing-cpp v1.2.0 package
opentracing-cpp: make shared/static target a configurable option
Those two patches should be merged into a single patch, since they are both needed to add a working package.
I'll review the patches themselves with additional comments.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com