Skip to contentSkip to conversation

package/opentracing-cpp: fix build if clang-tidy is installed on the host

PATCH New Thomas De Schampheleire 3 participants 3 messages Jan 19, 2021 – Jan 28, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/opentracing-cpp: fix build if clang-tidy is installed on the host

From: Thomas De Schampheleire <[email protected]>

opentracing-cpp fails to build if clang-tidy is installed:

...
-- clang-tidy found: /usr/lib/llvm/11/bin/clang-tidy -- Configuring done
-- Generating done
...

[ 25%] Building CXX object CMakeFiles/opentracing.dir/src/propagation.cpp.o .../buildroot/output/build/opentracing-cpp-1.5.1/include/opentracing/string_view.h:5:10: error: 'algorithm' file not found [clang-diagnostic-error]

         ^
.../buildroot/output/build/opentracing-cpp-1.5.1/src/propagation.cpp:3:11: warning: '__llvm_libc' needs to be the outermost namespace [llvmlibc-implementation-in-namespace]
namespace opentracing {
          ^
.../buildroot/output/build/opentracing-cpp-1.5.1/src/propagation.cpp:11:3: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default,modernize-use-equals-default]
  PropagationErrorCategory() {}
  ^                          ~~
                             = default;

.../buildroot/output/build/opentracing-cpp-1.5.1/src/propagation.cpp:13:15: warning: use a trailing return type for this function [modernize-use-trailing-return-type]
const char* name() const noexcept override {
~~~~~~~~~~~ ^
auto -> const char*
.../buildroot/output/build/opentracing-cpp-1.5.1/src/propagation.cpp:13:15: warning: method 'name' can be made static [readability-convert-member-functions-to-static]

  const char* name() const noexcept override {
              ^      ~~~~~~
  static
.../buildroot/output/build/opentracing-cpp-1.5.1/src/propagation.cpp:17:24: warning: use a trailing return type for this function [modernize-use-trailing-return-type]
  std::error_condition default_error_condition(int code) const
                       ^
.../buildroot/output/build/opentracing-cpp-1.5.1/src/propagation.cpp:37:15: warning: use a trailing return type for this function [modernize-use-trailing-return-type]
  std::string message(int code) const override {
              ^
.../buildroot/output/build/opentracing-cpp-1.5.1/src/propagation.cpp:58:28: warning: use a trailing return type for this function [modernize-use-trailing-return-type]
const std::error_category& propagation_error_category() {
                           ^

226 warnings and 1 error generated.
Error while processing .../buildroot/output/build/opentracing-cpp-1.5.1/src/propagation.cpp.
Suppressed 218 warnings (218 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. Found compiler error(s).
make[3]: *** [CMakeFiles/opentracing.dir/build.make:83: CMakeFiles/opentracing.dir/src/propagation.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs.... .../buildroot/output/build/opentracing-cpp-1.5.1/include/opentracing/string_view.h:5:10: error: 'algorithm' file not found [clang-diagnostic-error]

         ^

.../buildroot/output/build/opentracing-cpp-1.5.1/src/dynamic_load.cpp:4:

Disable the 'ENABLE_LINTING' option to avoid this influence.

---
 package/opentracing-cpp/opentracing-cpp.mk | 2 ++
 1 file changed, 2 insertions(+)
package/opentracing-cpp/opentracing-cpp.mk +2 -0
index d466a80237..0605cd5d96 100644
@@ -22,4 +22,6 @@ else ifeq ($(BR2_SHARED_LIBS),y)
 OPENTRACING_CPP_CONF_OPTS += -DBUILD_STATIC_LIBS=OFF
 endif
 
+OPENTRACING_CPP_CONF_OPTS += -DENABLE_LINTING=OFF
+
 $(eval $(cmake-package))
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/1 package/opentracing-cpp: fix build if clang-tidy is installed on the host

Thomas, All,

On 2021-01-19 18:17 +0100, Thomas De Schampheleire spake thusly:

Quoted 2 lines

From: Thomas De Schampheleire <[email protected]> opentracing-cpp fails to build if clang-tidy is installed:

[--SNIP--]

Quoted 3 lines

Disable the 'ENABLE_LINTING' option to avoid this influence.

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 22 lines
---
 package/opentracing-cpp/opentracing-cpp.mk | 2 ++
 1 file changed, 2 insertions(+)
package/opentracing-cpp/opentracing-cpp.mk +2 -0
index d466a80237..0605cd5d96 100644
@@ -22,4 +22,6 @@ else ifeq ($(BR2_SHARED_LIBS),y)
 OPENTRACING_CPP_CONF_OPTS += -DBUILD_STATIC_LIBS=OFF
 endif
 
+OPENTRACING_CPP_CONF_OPTS += -DENABLE_LINTING=OFF
+
 $(eval $(cmake-package))
Signature · 6 lines
2.26.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 package/opentracing-cpp: fix build if clang-tidy is installed on the host

In reply to Thomas De Schampheleire
Quoted 46 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas De Schampheleire <[email protected]> writes:

From: Thomas De Schampheleire <[email protected]> opentracing-cpp fails to build if clang-tidy is installed:

...
-- clang-tidy found: /usr/lib/llvm/11/bin/clang-tidy -- Configuring done
-- Generating done
...

[ 25%] Building CXX object CMakeFiles/opentracing.dir/src/propagation.cpp.o .../buildroot/output/build/opentracing-cpp-1.5.1/include/opentracing/string_view.h:5:10: error: 'algorithm' file not found [clang-diagnostic-error]

         ^
.../buildroot/output/build/opentracing-cpp-1.5.1/src/propagation.cpp:3:11: warning: '__llvm_libc' needs to be the outermost namespace [llvmlibc-implementation-in-namespace]
namespace opentracing {
          ^
.../buildroot/output/build/opentracing-cpp-1.5.1/src/propagation.cpp:11:3: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default,modernize-use-equals-default]
  PropagationErrorCategory() {}
  ^                          ~~
                             = default;

.../buildroot/output/build/opentracing-cpp-1.5.1/src/propagation.cpp:13:15: warning: use a trailing return type for this function [modernize-use-trailing-return-type]
const char* name() const noexcept override {
~~~~~~~~~~~ ^
auto -> const char*
.../buildroot/output/build/opentracing-cpp-1.5.1/src/propagation.cpp:13:15: warning: method 'name' can be made static [readability-convert-member-functions-to-static]

  const char* name() const noexcept override {
              ^      ~~~~~~
  static
.../buildroot/output/build/opentracing-cpp-1.5.1/src/propagation.cpp:17:24: warning: use a trailing return type for this function [modernize-use-trailing-return-type]
  std::error_condition default_error_condition(int code) const
                       ^
.../buildroot/output/build/opentracing-cpp-1.5.1/src/propagation.cpp:37:15: warning: use a trailing return type for this function [modernize-use-trailing-return-type]
  std::string message(int code) const override {
              ^
.../buildroot/output/build/opentracing-cpp-1.5.1/src/propagation.cpp:58:28: warning: use a trailing return type for this function [modernize-use-trailing-return-type]
const std::error_category& propagation_error_category() {
                           ^

226 warnings and 1 error generated.
Error while processing .../buildroot/output/build/opentracing-cpp-1.5.1/src/propagation.cpp.
Suppressed 218 warnings (218 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. Found compiler error(s).
make[3]: *** [CMakeFiles/opentracing.dir/build.make:83: CMakeFiles/opentracing.dir/src/propagation.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs.... .../buildroot/output/build/opentracing-cpp-1.5.1/include/opentracing/string_view.h:5:10: error: 'algorithm' file not found [clang-diagnostic-error]

Quoted 6 lines
         ^

.../buildroot/output/build/opentracing-cpp-1.5.1/src/dynamic_load.cpp:4:

Disable the 'ENABLE_LINTING' option to avoid this influence.

Committed to 2020.02.x and 2020.11.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard