Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libuhttpd: disable -Werror
@ 2024-03-10 16:31 Fabrice Fontaine
  2024-05-10 20:52 ` Thomas Petazzoni via buildroot
  2024-06-08  7:10 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2024-03-10 16:31 UTC (permalink / raw)
  To: buildroot; +Cc: Jianhui Zhao, Fabrice Fontaine

Disable -Werror to fix the following build failure raised at least since
bump to version 3.9.0 in commit e76d9868c940f2d19968077b97e79c49376aa464
and
https://github.com/zhaojh329/libuhttpd/commit/81db1fa371bc80f40c1bfe60010e7d64bdf30b46:

/home/autobuild/autobuild/instance-8/output-1/build/libuhttpd-3.14.1/src/file.c: In function '__serve_file':
/home/autobuild/autobuild/instance-8/output-1/build/libuhttpd-3.14.1/src/file.c:322:50: error: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type '__off_t' {aka 'long int'} [-Werror=format=]
  322 |         conn->send_header(conn, "Content-Range", "bytes */%" PRIu64, st->st_size);
      |                                                  ^~~~~~~~~~~         ~~~~~~~~~~~
      |                                                                        |
      |                                                                        __off_t {aka long int}
In file included from /home/autobuild/autobuild/instance-8/output-1/build/libuhttpd-3.14.1/src/file.c:36:
/home/autobuild/autobuild/instance-8/output-1/per-package/libuhttpd/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/inttypes.h:91:41: note: format string is defined here
   91 | # define PRIu64         __PRI64_PREFIX "u"
cc1: all warnings being treated as errors

Fixes: e76d9868c940f2d19968077b97e79c49376aa464
 - http://autobuild.buildroot.org/results/46349a1409f9cff027b462456078284459e75511

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...akeLists.txt-add-BUILD_WERROR-option.patch | 30 +++++++++++++++++++
 package/libuhttpd/libuhttpd.mk                |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 package/libuhttpd/0003-CMakeLists.txt-add-BUILD_WERROR-option.patch

diff --git a/package/libuhttpd/0003-CMakeLists.txt-add-BUILD_WERROR-option.patch b/package/libuhttpd/0003-CMakeLists.txt-add-BUILD_WERROR-option.patch
new file mode 100644
index 0000000000..2e87014e87
--- /dev/null
+++ b/package/libuhttpd/0003-CMakeLists.txt-add-BUILD_WERROR-option.patch
@@ -0,0 +1,30 @@
+From c0f2260d8b7e435bce765e7ac91d51f1b349b87b Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 10 Mar 2024 13:43:12 +0100
+Subject: [PATCH] CMakeLists.txt: add BUILD_WERROR option
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Upstream: https://github.com/zhaojh329/libuhttpd/commit/c0f2260d8b7e435bce765e7ac91d51f1b349b87b
+---
+ CMakeLists.txt | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6fb9651..6719e5f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,7 +7,13 @@ include(CheckLibraryExists)
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/")
+ 
+ add_definitions(-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64)
+-add_compile_options(-O -Wall -Werror --std=gnu99)
++add_compile_options(-O -Wall --std=gnu99)
++
++option(BUILD_WERROR "Build with -Werror" ON)
++
++if(BUILD_WERROR)
++    add_compile_options(-Werror)
++endif()
+ 
+ option(BUILD_STATIC "Build static library" OFF)
+ 
diff --git a/package/libuhttpd/libuhttpd.mk b/package/libuhttpd/libuhttpd.mk
index 0d5306c6dd..78e0f42b22 100644
--- a/package/libuhttpd/libuhttpd.mk
+++ b/package/libuhttpd/libuhttpd.mk
@@ -10,6 +10,7 @@ LIBUHTTPD_LICENSE = MIT
 LIBUHTTPD_LICENSE_FILES = LICENSE
 LIBUHTTPD_INSTALL_STAGING = YES
 LIBUHTTPD_DEPENDENCIES = libev
+LIBUHTTPD_CONF_OPTS = -DBUILD_WERROR=OFF
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 LIBUHTTPD_DEPENDENCIES += openssl
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/libuhttpd: disable -Werror
  2024-03-10 16:31 [Buildroot] [PATCH 1/1] package/libuhttpd: disable -Werror Fabrice Fontaine
@ 2024-05-10 20:52 ` Thomas Petazzoni via buildroot
  2024-06-08  7:10 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-05-10 20:52 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Jianhui Zhao, buildroot

On Sun, 10 Mar 2024 17:31:50 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Disable -Werror to fix the following build failure raised at least since
> bump to version 3.9.0 in commit e76d9868c940f2d19968077b97e79c49376aa464
> and
> https://github.com/zhaojh329/libuhttpd/commit/81db1fa371bc80f40c1bfe60010e7d64bdf30b46:
> 
> /home/autobuild/autobuild/instance-8/output-1/build/libuhttpd-3.14.1/src/file.c: In function '__serve_file':
> /home/autobuild/autobuild/instance-8/output-1/build/libuhttpd-3.14.1/src/file.c:322:50: error: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type '__off_t' {aka 'long int'} [-Werror=format=]
>   322 |         conn->send_header(conn, "Content-Range", "bytes */%" PRIu64, st->st_size);
>       |                                                  ^~~~~~~~~~~         ~~~~~~~~~~~
>       |                                                                        |
>       |                                                                        __off_t {aka long int}
> In file included from /home/autobuild/autobuild/instance-8/output-1/build/libuhttpd-3.14.1/src/file.c:36:
> /home/autobuild/autobuild/instance-8/output-1/per-package/libuhttpd/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/inttypes.h:91:41: note: format string is defined here
>    91 | # define PRIu64         __PRI64_PREFIX "u"
> cc1: all warnings being treated as errors
> 
> Fixes: e76d9868c940f2d19968077b97e79c49376aa464
>  - http://autobuild.buildroot.org/results/46349a1409f9cff027b462456078284459e75511
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...akeLists.txt-add-BUILD_WERROR-option.patch | 30 +++++++++++++++++++
>  package/libuhttpd/libuhttpd.mk                |  1 +
>  2 files changed, 31 insertions(+)
>  create mode 100644 package/libuhttpd/0003-CMakeLists.txt-add-BUILD_WERROR-option.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/libuhttpd: disable -Werror
  2024-03-10 16:31 [Buildroot] [PATCH 1/1] package/libuhttpd: disable -Werror Fabrice Fontaine
  2024-05-10 20:52 ` Thomas Petazzoni via buildroot
@ 2024-06-08  7:10 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-06-08  7:10 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Jianhui Zhao, buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Disable -Werror to fix the following build failure raised at least since
 > bump to version 3.9.0 in commit e76d9868c940f2d19968077b97e79c49376aa464
 > and
 > https://github.com/zhaojh329/libuhttpd/commit/81db1fa371bc80f40c1bfe60010e7d64bdf30b46:

 > /home/autobuild/autobuild/instance-8/output-1/build/libuhttpd-3.14.1/src/file.c: In function '__serve_file':
 > /home/autobuild/autobuild/instance-8/output-1/build/libuhttpd-3.14.1/src/file.c:322:50:
 > error: format '%llu' expects argument of type 'long long unsigned
 > int', but argument 4 has type '__off_t' {aka 'long int'}
 > [-Werror=format=]
 >   322 |         conn->send_header(conn, "Content-Range", "bytes */%" PRIu64, st->st_size);
 >       |                                                  ^~~~~~~~~~~         ~~~~~~~~~~~
 >       |                                                                        |
 >       |                                                                        __off_t {aka long int}
 > In file included from /home/autobuild/autobuild/instance-8/output-1/build/libuhttpd-3.14.1/src/file.c:36:
 > /home/autobuild/autobuild/instance-8/output-1/per-package/libuhttpd/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/inttypes.h:91:41: note: format string is defined here
 >    91 | # define PRIu64         __PRI64_PREFIX "u"
 > cc1: all warnings being treated as errors

 > Fixes: e76d9868c940f2d19968077b97e79c49376aa464
 >  - http://autobuild.buildroot.org/results/46349a1409f9cff027b462456078284459e75511

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2024.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-06-08  7:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-10 16:31 [Buildroot] [PATCH 1/1] package/libuhttpd: disable -Werror Fabrice Fontaine
2024-05-10 20:52 ` Thomas Petazzoni via buildroot
2024-06-08  7:10 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox