Skip to content

Configure UX #115806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
erlend-aasland opened this issue Feb 22, 2024 · 5 comments · Fixed by #116165 or #129390
Closed

Configure UX #115806

erlend-aasland opened this issue Feb 22, 2024 · 5 comments · Fixed by #116165 or #129390
Labels
build The build process and cross-build type-feature A feature request or enhancement

Comments

@erlend-aasland
Copy link
Contributor

erlend-aasland commented Feb 22, 2024

Feature or enhancement

The LDLIBRARY and HOSTRUNNER checks overlap; this results in garbled output:

$ ./configure
[...]
checking LDLIBRARY... checking HOSTRUNNER... 
libpython$(VERSION)$(ABIFLAGS).a

The IPv6 library check is very subtle:

$ ./configure
[...]
configure: using libc

Suggesting to clean this up, for improved configure user experience:

$ ./configure
[...]
checking LDLIBRARY... libpython$(VERSION)$(ABIFLAGS).a
checking HOSTRUNNER...
[...]
checking ipv6 stack type... kame
checking ipv6 library... libc

Linked PRs

@erlend-aasland erlend-aasland added type-feature A feature request or enhancement build The build process and cross-build labels Feb 22, 2024
erlend-aasland added a commit that referenced this issue Feb 23, 2024
- make sure LDLIBRARY and HOSTRUNNER checks don't overlap
- make the ipv6 library check less subtle
@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Feb 29, 2024

Ah, our PR gh-116016 mangled the output again:

checking ipv6 stack type... checking for IPV6_INRIA_VERSION defined in netinet/in.h... no
checking for __KAME__ defined in netinet/in.h... yes
kame

With #116165 applied, we get this:

checking for IPV6_INRIA_VERSION defined in netinet/in.h... no
checking for __KAME__ defined in netinet/in.h... yes
checking ipv6 stack type... kame
checking ipv6 library... libc

erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Feb 29, 2024
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this issue Mar 4, 2024
- make sure LDLIBRARY and HOSTRUNNER checks don't overlap
- make the ipv6 library check less subtle
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this issue Mar 4, 2024
adorilson pushed a commit to adorilson/cpython that referenced this issue Mar 25, 2024
@erlend-aasland
Copy link
Contributor Author

configure -C still produces some garbled output:

checking for library containing dbm_open... (cached) -lgdbm_compat
checking for ndbm presence and linker args... yes (-lgdbm_compat)
(cached) (cached) checking for library containing dbm_open... -lgdbm_compat

diegorusso pushed a commit to diegorusso/cpython that referenced this issue Apr 17, 2024
- make sure LDLIBRARY and HOSTRUNNER checks don't overlap
- make the ipv6 library check less subtle
diegorusso pushed a commit to diegorusso/cpython that referenced this issue Apr 17, 2024
@hugovk
Copy link
Member

hugovk commented Jun 15, 2024

Triage: the linked PRs are merged, can this be closed?

LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this issue Jan 22, 2025
- make sure LDLIBRARY and HOSTRUNNER checks don't overlap
- make the ipv6 library check less subtle
@encukou
Copy link
Member

encukou commented Jan 27, 2025

I'll close it now. If there are more improvements to do, please re-open or open a new issue.

Thank you for the improvements!

@erlend-aasland
Copy link
Contributor Author

#115806 (comment) is still not fixed. The problem is that we're using AC_CHECK_HEADER wrapped in AC_CACHE_VAL:

cpython/configure.ac

Lines 4431 to 4454 in 8e57877

dnl "gdbm-ndbm.h" and "gdbm/ndbm.h" are both normalized to "gdbm_ndbm_h"
dnl unset ac_cv_header_gdbm_ndbm_h to prevent false positive cache hits.
AS_UNSET([ac_cv_header_gdbm_ndbm_h])
AC_CACHE_VAL([ac_cv_header_gdbm_slash_ndbm_h], [
AC_CHECK_HEADER(
[gdbm/ndbm.h],
[ac_cv_header_gdbm_slash_ndbm_h=yes], [ac_cv_header_gdbm_slash_ndbm_h=no]
)
])
AS_VAR_IF([ac_cv_header_gdbm_slash_ndbm_h], [yes], [
AC_DEFINE([HAVE_GDBM_NDBM_H], [1], [Define to 1 if you have the <gdbm/ndbm.h> header file.])
])
AS_UNSET([ac_cv_header_gdbm_ndbm_h])
AC_CACHE_VAL([ac_cv_header_gdbm_dash_ndbm_h], [
AC_CHECK_HEADER(
[gdbm-ndbm.h],
[ac_cv_header_gdbm_dash_ndbm_h=yes], [ac_cv_header_gdbm_dash_ndbm_h=no]
)
])
AS_VAR_IF([ac_cv_header_gdbm_dash_ndbm_h], [yes], [
AC_DEFINE([HAVE_GDBM_DASH_NDBM_H], [1], [Define to 1 if you have the <gdbm-ndbm.h> header file.])
])
AS_UNSET([ac_cv_header_gdbm_ndbm_h])

I wonder if we're better off by using AC_CACHE_CHECK and AC_PREPROC_IFELSE for these.

erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Jan 28, 2025
Replace AC_CACHE_VAL/AC_CHECK_HEADER with a cleaner variant using
AC_CACHE_CHECK/AC_PREPROC_IFELSE.

The former would produce garbled output when config.cache was reused. It
also required directly manipulating GNU Autoconf cache variables.
encukou pushed a commit that referenced this issue Feb 8, 2025
)

Replace AC_CACHE_VAL/AC_CHECK_HEADER with a cleaner variant using
AC_CACHE_CHECK/AC_PREPROC_IFELSE.

The former would produce garbled output when config.cache was reused. It
also required directly manipulating GNU Autoconf cache variables.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build type-feature A feature request or enhancement
Projects
None yet
3 participants