* [Buildroot] [PATCH 1/1] package/libcurl: fix libpsl static build
@ 2024-02-24 22:06 Fabrice Fontaine
2024-02-25 7:55 ` Peter Korsgaard
2024-03-09 13:34 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2024-02-24 22:06 UTC (permalink / raw)
To: buildroot; +Cc: Fabrice Fontaine
Fix the following static build failure with libpsl raised since bump to
version 8.6.0 in commit 5cee6b6be6524e443012d130e09b0e6983b0ff90:
configure:28830: /home/autobuild/autobuild/instance-6/output-1/host/bin/aarch64_be-buildroot-linux-musl-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -g0 -static -Werror-implicit-function-declaration -Wno-system-headers -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/autobuild/autobuild/instance-6/output-1/host/aarch64_be-buildroot-linux-musl/sysroot/usr/include -static -L/home/autobuild/autobuild/instance-6/output-1/host/bin/../aarch64_be-buildroot-linux-musl/sysroot/usr/lib -L/home/autobuild/autobuild/instance-6/output-1/host/aarch64_be-buildroot-linux-musl/sysroot/usr/lib conftest.c -lpsl -lmbedtls -lmbedx509 -lmbedcrypto -lz -latomic >&5
/home/autobuild/autobuild/instance-6/output-1/host/lib/gcc/aarch64_be-buildroot-linux-musl/11.4.0/../../../../aarch64_be-buildroot-linux-musl/bin/ld: /home/autobuild/autobuild/instance-6/output-1/host/bin/../aarch64_be-buildroot-linux-musl/sysroot/usr/lib/libpsl.a(psl.c.o): in function `is_public_suffix':
psl.c:(.text+0x2a8): undefined reference to `idn2_lookup_u8'
[...]
checking for library containing psl_builtin... no
configure: error: libpsl was not found
Fixes: 5cee6b6be6524e443012d130e09b0e6983b0ff90
- http://autobuild.buildroot.org/results/1fb15e1a99472c403d0d3b1a688902f32e78d002
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...igure.ac-find-libpsl-with-pkg-config.patch | 109 ++++++++++++++++++
package/libcurl/libcurl.mk | 2 +
2 files changed, 111 insertions(+)
create mode 100644 package/libcurl/0001-configure.ac-find-libpsl-with-pkg-config.patch
diff --git a/package/libcurl/0001-configure.ac-find-libpsl-with-pkg-config.patch b/package/libcurl/0001-configure.ac-find-libpsl-with-pkg-config.patch
new file mode 100644
index 0000000000..46df1e36a2
--- /dev/null
+++ b/package/libcurl/0001-configure.ac-find-libpsl-with-pkg-config.patch
@@ -0,0 +1,109 @@
+From 9b3f67e267d1fa8d7867655d133bdbf8830a0ab3 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Thu, 15 Feb 2024 20:59:25 +0100
+Subject: [PATCH] configure.ac: find libpsl with pkg-config
+
+Find libpsl with pkg-config to avoid static build failures.
+
+Ref: http://autobuild.buildroot.org/results/1fb15e1a99472c403d0d3b1a688902f32e78d002
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Closes #12947
+
+Upstream: https://github.com/curl/curl/commit/9b3f67e267d1fa8d7867655d133bdbf8830a0ab3
+---
+ configure.ac | 79 ++++++++++++++++++++++++++++++++++++++++++++--------
+ docs/TODO | 7 -----
+ 2 files changed, 67 insertions(+), 19 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index cd0e2d07d8d164..09d5364f4de575 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2075,19 +2075,74 @@ dnl **********************************************************************
+ dnl Check for libpsl
+ dnl **********************************************************************
+
+-AC_ARG_WITH(libpsl,
+- AS_HELP_STRING([--without-libpsl],
+- [disable support for libpsl]),
+- with_libpsl=$withval,
+- with_libpsl=yes)
+-curl_psl_msg="no (libpsl disabled)"
+-if test $with_libpsl != "no"; then
+- AC_SEARCH_LIBS(psl_builtin, psl,
+- [curl_psl_msg="enabled";
+- AC_DEFINE([USE_LIBPSL], [1], [PSL support enabled])
+- ],
+- [AC_MSG_ERROR([libpsl was not found]) ]
++dnl Default to compiler & linker defaults for LIBPSL files & libraries.
++OPT_LIBPSL=off
++AC_ARG_WITH(libpsl,dnl
++AS_HELP_STRING([--with-libpsl=PATH],[Where to look for libpsl, PATH points to the LIBPSL installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
++AS_HELP_STRING([--without-libpsl], [disable LIBPSL]),
++ OPT_LIBPSL=$withval)
++
++if test X"$OPT_LIBPSL" != Xno; then
++ dnl backup the pre-libpsl variables
++ CLEANLDFLAGS="$LDFLAGS"
++ CLEANCPPFLAGS="$CPPFLAGS"
++ CLEANLIBS="$LIBS"
++
++ case "$OPT_LIBPSL" in
++ yes)
++ dnl --with-libpsl (without path) used
++ CURL_CHECK_PKGCONFIG(libpsl)
++
++ if test "$PKGCONFIG" != "no" ; then
++ LIB_PSL=`$PKGCONFIG --libs-only-l libpsl`
++ LD_PSL=`$PKGCONFIG --libs-only-L libpsl`
++ CPP_PSL=`$PKGCONFIG --cflags-only-I libpsl`
++ else
++ dnl no libpsl pkg-config found
++ LIB_PSL="-lpsl"
++ fi
++
++ ;;
++ off)
++ dnl no --with-libpsl option given, just check default places
++ LIB_PSL="-lpsl"
++ ;;
++ *)
++ dnl use the given --with-libpsl spot
++ LIB_PSL="-lpsl"
++ PREFIX_PSL=$OPT_LIBPSL
++ ;;
++ esac
++
++ dnl if given with a prefix, we set -L and -I based on that
++ if test -n "$PREFIX_PSL"; then
++ LD_PSL=-L${PREFIX_PSL}/lib$libsuff
++ CPP_PSL=-I${PREFIX_PSL}/include
++ fi
++
++ LDFLAGS="$LDFLAGS $LD_PSL"
++ CPPFLAGS="$CPPFLAGS $CPP_PSL"
++ LIBS="$LIB_PSL $LIBS"
++
++ AC_CHECK_LIB(psl, psl_builtin,
++ [
++ AC_CHECK_HEADERS(libpsl.h,
++ curl_psl_msg="enabled"
++ LIBPSL_ENABLED=1
++ AC_DEFINE(USE_LIBPSL, 1, [if libpsl is in use])
++ AC_SUBST(USE_LIBPSL, [1])
++ )
++ ],
++ dnl not found, revert back to clean variables
++ LDFLAGS=$CLEANLDFLAGS
++ CPPFLAGS=$CLEANCPPFLAGS
++ LIBS=$CLEANLIBS
+ )
++
++ if test X"$OPT_LIBPSL" != Xoff &&
++ test "$LIBPSL_ENABLED" != "1"; then
++ AC_MSG_ERROR([libpsl libs and/or directories were not found where specified!])
++ fi
+ fi
+ AM_CONDITIONAL([USE_LIBPSL], [test "$curl_psl_msg" = "enabled"])
+
diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk
index 9dafe90c82..4281cfabb1 100644
--- a/package/libcurl/libcurl.mk
+++ b/package/libcurl/libcurl.mk
@@ -14,6 +14,8 @@ LIBCURL_LICENSE = curl
LIBCURL_LICENSE_FILES = COPYING
LIBCURL_CPE_ID_VENDOR = haxx
LIBCURL_INSTALL_STAGING = YES
+# 0001-configure.ac-find-libpsl-with-pkg-config.patch
+LIBCURL_AUTORECONF = YES
# We disable NTLM delegation to winbinds ntlm_auth ('--disable-ntlm-wb')
# support because it uses fork(), which doesn't work on non-MMU platforms.
--
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/libcurl: fix libpsl static build
2024-02-24 22:06 [Buildroot] [PATCH 1/1] package/libcurl: fix libpsl static build Fabrice Fontaine
@ 2024-02-25 7:55 ` Peter Korsgaard
2024-03-09 13:34 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-02-25 7:55 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> Fix the following static build failure with libpsl raised since bump to
> version 8.6.0 in commit 5cee6b6be6524e443012d130e09b0e6983b0ff90:
> configure:28830:
> /home/autobuild/autobuild/instance-6/output-1/host/bin/aarch64_be-buildroot-linux-musl-gcc
> -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -D_FILE_OFFSET_BITS=64 -O3 -g0 -static
> -Werror-implicit-function-declaration -Wno-system-headers
> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
> -I/home/autobuild/autobuild/instance-6/output-1/host/aarch64_be-buildroot-linux-musl/sysroot/usr/include
> -static
> -L/home/autobuild/autobuild/instance-6/output-1/host/bin/../aarch64_be-buildroot-linux-musl/sysroot/usr/lib
> -L/home/autobuild/autobuild/instance-6/output-1/host/aarch64_be-buildroot-linux-musl/sysroot/usr/lib
> conftest.c -lpsl -lmbedtls -lmbedx509 -lmbedcrypto -lz -latomic >&5
> /home/autobuild/autobuild/instance-6/output-1/host/lib/gcc/aarch64_be-buildroot-linux-musl/11.4.0/../../../../aarch64_be-buildroot-linux-musl/bin/ld:
> /home/autobuild/autobuild/instance-6/output-1/host/bin/../aarch64_be-buildroot-linux-musl/sysroot/usr/lib/libpsl.a(psl.c.o):
> in function `is_public_suffix':
> psl.c:(.text+0x2a8): undefined reference to `idn2_lookup_u8'
> [...]
> checking for library containing psl_builtin... no
> configure: error: libpsl was not found
> Fixes: 5cee6b6be6524e443012d130e09b0e6983b0ff90
> - http://autobuild.buildroot.org/results/1fb15e1a99472c403d0d3b1a688902f32e78d002
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed, 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
* Re: [Buildroot] [PATCH 1/1] package/libcurl: fix libpsl static build
2024-02-24 22:06 [Buildroot] [PATCH 1/1] package/libcurl: fix libpsl static build Fabrice Fontaine
2024-02-25 7:55 ` Peter Korsgaard
@ 2024-03-09 13:34 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-03-09 13:34 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> Fix the following static build failure with libpsl raised since bump to
> version 8.6.0 in commit 5cee6b6be6524e443012d130e09b0e6983b0ff90:
> configure:28830:
> /home/autobuild/autobuild/instance-6/output-1/host/bin/aarch64_be-buildroot-linux-musl-gcc
> -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -D_FILE_OFFSET_BITS=64 -O3 -g0 -static
> -Werror-implicit-function-declaration -Wno-system-headers
> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
> -I/home/autobuild/autobuild/instance-6/output-1/host/aarch64_be-buildroot-linux-musl/sysroot/usr/include
> -static
> -L/home/autobuild/autobuild/instance-6/output-1/host/bin/../aarch64_be-buildroot-linux-musl/sysroot/usr/lib
> -L/home/autobuild/autobuild/instance-6/output-1/host/aarch64_be-buildroot-linux-musl/sysroot/usr/lib
> conftest.c -lpsl -lmbedtls -lmbedx509 -lmbedcrypto -lz -latomic >&5
> /home/autobuild/autobuild/instance-6/output-1/host/lib/gcc/aarch64_be-buildroot-linux-musl/11.4.0/../../../../aarch64_be-buildroot-linux-musl/bin/ld:
> /home/autobuild/autobuild/instance-6/output-1/host/bin/../aarch64_be-buildroot-linux-musl/sysroot/usr/lib/libpsl.a(psl.c.o):
> in function `is_public_suffix':
> psl.c:(.text+0x2a8): undefined reference to `idn2_lookup_u8'
> [...]
> checking for library containing psl_builtin... no
> configure: error: libpsl was not found
> Fixes: 5cee6b6be6524e443012d130e09b0e6983b0ff90
> - http://autobuild.buildroot.org/results/1fb15e1a99472c403d0d3b1a688902f32e78d002
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed to 2023.02.x and 2023.11.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-03-09 13:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-24 22:06 [Buildroot] [PATCH 1/1] package/libcurl: fix libpsl static build Fabrice Fontaine
2024-02-25 7:55 ` Peter Korsgaard
2024-03-09 13:34 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox