Skip to contentSkip to conversation

package/libuhttpd: fix build with openssl3

PATCH Applied Bernd Kuhls 2 participants 2 messages Jul 20, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libuhttpd: fix build with openssl3

Fixes:
http://autobuild.buildroot.net/results/c09/c09c77e399e9ee410995a91a22306897eca667d1/

---
 ...eLists.txt-remove-Werror-from-CFLAGS.patch | 38 +++++++++++++++++++
 ...eLists.txt-remove-Werror-from-CFLAGS.patch | 38 +++++++++++++++++++
 2 files changed, 76 insertions(+)
 create mode 100644 package/libuhttpd/0002-CMakeLists.txt-remove-Werror-from-CFLAGS.patch
 create mode 100644 package/libuhttpd/0003-CMakeLists.txt-remove-Werror-from-CFLAGS.patch
package/libuhttpd/0002-CMakeLists.txt-remove-Werror-from-CFLAGS.patch new file +38 -0
new file mode 100644
index 0000000000..01f66f42d9
@@ -0,0 +1,38 @@
+From a7d47180777366b9ee374ee1fe0f1a155a02160b Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Thu, 20 Jul 2023 22:14:16 +0200
+Subject: [PATCH] CMakeLists.txt: remove -Werror from CFLAGS
+
+Build is broken with OpenSSL 3.0, see buildroot autobuilder logs:
+http://autobuild.buildroot.net/results/c09/c09c77e399e9ee410995a91a22306897eca667d1/build-end.log
+
+/home/autobuild/autobuild/instance-2/output-1/build/libuhttpd-3.14.1/src/ssl/openssl.c:
+ In function 'ssl_last_error_string':
+/home/autobuild/autobuild/instance-2/output-1/build/libuhttpd-3.14.1/src/ssl/openssl.c:143:9:
+ error: 'ERR_peek_error_line_data' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
+
+cc1: all warnings being treated as errors
+
+Upstream: https://github.com/zhaojh329/libuhttpd/pull/22
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6fb9651..64f506c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,7 +7,7 @@ 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_STATIC "Build static library" OFF)
+ 
+-- 
+2.39.2
+
package/libuhttpd/0003-CMakeLists.txt-remove-Werror-from-CFLAGS.patch new file +38 -0
new file mode 100644
index 0000000000..8e370e0a80
@@ -0,0 +1,38 @@
+From b22667f1054ea85c4dc3bdca5b7c84aeb0a801bc Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Thu, 20 Jul 2023 22:22:05 +0200
+Subject: [PATCH] CMakeLists.txt: remove -Werror from CFLAGS
+
+Build is broken with OpenSSL 3.0, see buildroot autobuilder logs:
+http://autobuild.buildroot.net/results/c09/c09c77e399e9ee410995a91a22306897eca667d1/build-end.log
+
+/home/autobuild/autobuild/instance-2/output-1/build/libuhttpd-3.14.1/src/ssl/openssl.c:
+ In function 'ssl_last_error_string':
+/home/autobuild/autobuild/instance-2/output-1/build/libuhttpd-3.14.1/src/ssl/openssl.c:143:9:
+ error: 'ERR_peek_error_line_data' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
+
+cc1: all warnings being treated as errors
+
+Upstream: https://github.com/zhaojh329/ssl/pull/6
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 36488c7..98585b5 100644
+--- a/src/ssl/CMakeLists.txt
++++ b/src/ssl/CMakeLists.txt
+@@ -78,7 +78,7 @@ if(SSL_SUPPORT)
+ 
+     add_library(xssl STATIC ${SSL_SRC})
+     target_compile_definitions(xssl PRIVATE ${SSL_DEFINE})
+-    target_compile_options(xssl PRIVATE -O -Wall -Werror --std=gnu99 -fPIC)
++    target_compile_options(xssl PRIVATE -O -Wall --std=gnu99 -fPIC)
+     target_include_directories(xssl PRIVATE ${SSL_INC})
+     target_link_libraries(xssl PRIVATE ${SSL_LIBS})
+ 
+-- 
+2.39.2
+
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 10 lines · On Thu, 20 Jul 2023 22:26:32 +0200 Bernd Kuhls <[email protected]> wrote:

Fixes:
http://autobuild.buildroot.net/results/c09/c09c77e399e9ee410995a91a22306897eca667d1/

---
 ...eLists.txt-remove-Werror-from-CFLAGS.patch | 38 +++++++++++++++++++
 ...eLists.txt-remove-Werror-from-CFLAGS.patch | 38 +++++++++++++++++++
 2 files changed, 76 insertions(+)
 create mode 100644 package/libuhttpd/0002-CMakeLists.txt-remove-Werror-from-CFLAGS.patch
 create mode 100644 package/libuhttpd/0003-CMakeLists.txt-remove-Werror-from-CFLAGS.patch

Applied to master, thanks. However, I don't think your two patches are acceptable upstream: the right change for upstream is to fix the usage of the deprecated OpenSSL functions.

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot