Skip to content

configure.ac: find libpsl with pkg-config - #12947

Closed
ffontaine wants to merge 1 commit into
curl:masterfrom
ffontaine:master
Closed

ffontaine wants to merge 1 commit into
curl:masterfrom
ffontaine:master

Conversation

@ffontaine

Copy link
Copy Markdown
Contributor

Find libpsl with pkg-config to avoid the following static build failure:

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:

@dfandrich

Copy link
Copy Markdown
Contributor

The test failures look relevant, probably related to removing AM_CONDITIONAL.

@ffontaine

Copy link
Copy Markdown
Contributor Author

Thanks for your review, PR was updated

Comment thread configure.ac Outdated
@jay jay added the build label Feb 18, 2024
Comment thread configure.ac Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you mean --with-libpsl and why would we not want to allow it without pkg-config?

@ffontaine ffontaine Feb 18, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll rename --libpsl to --with-libpsl.
If --with-libpsl is provided, but pkg-config file is not found, an error is raised as already done by libcurl when handling librtmp, nghttp2, ngtcp2, nghttp3 and quiche. However, it seems that curl is not very consistent as other options don't raise such kind of failure.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not consistent as to whether that is an error or not, correct. Like in this case, curl has built fine with libpsl for decades without pkg-config, so maybe it could be worth keeping that ability just to make existing setups keep working?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR was updated

Find libpsl with pkg-config to avoid the following static build failure:

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:
 - http://autobuild.buildroot.org/results/1fb15e1a99472c403d0d3b1a688902f32e78d002

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
@bagder bagder closed this in 9b3f67e Feb 23, 2024
@bagder

bagder commented Feb 23, 2024

Copy link
Copy Markdown
Member

Thanks!

lazka added a commit to lazka/MSYS2-packages that referenced this pull request Mar 27, 2024
curl-7.58.0-libpsl-static-libs.patch: fixed upstream in
  curl/curl#12947
lazka added a commit to lazka/MINGW-packages that referenced this pull request Mar 27, 2024
0003-libpsl-static-libs.patch: Fixed upstream, see
    curl/curl#12947
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

4 participants