[vim/vim] Configure script succeeds despite failing to find X and requested to fail if missing (Issue #15437)

12 views
Skip to first unread message

Sektor van Skijlen

unread,
Aug 6, 2024, 6:19:59 AM8/6/24
to vim/vim, Subscribed

Steps to reproduce

  1. After downloading repo run:
./configure --enable-gui=gtk3 --enable-fail-if-missing
  1. Result:
checking for xmkmf... no
checking for X... no
checking if X11 header files can be found... no
checking --enable-gui argument... no GUI support
checking for pkg-config... /usr/bin/pkg-config
checking for X11/SM/SMlib.h... no

and the script succeeds.

Expected behaviour

  1. If GUI is configured as "auto" (default), it could pick up GUI, if it exists.
  2. I understand that some people would like to automatically configure GUI with specific type, but ignore missing libraries and therefore not turn on GUI, and that this should be the default behavior.
  3. But there must be also an option that if some features are enabled explicitly (by setting an option to a nondefault value) and the script should fail if enabling this feature is not possible due to missing packages. And according to any intuition, --enable-fail-if-missing should exactly be such an option.

Additionally, it would be nice if configure also mentions what kind of library is missing (at least by openly declaring what file was being looked for), without making a user do reverse engineering on the configure script to determine what exactly devel packages must be installed to be able to compile vim.

Version of Vim

d7af21e or 9.1.0661

Environment

Operating system: Linux (OpenSUSE Leap 15.9)

Logs and stack traces

configure: creating cache auto/config.cache
checking whether make sets $(MAKE)... yes
checking for gcc... gcc-13
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc-13 accepts -g... yes
checking for gcc-13 option to enable C11 features... none needed
checking how to run the C preprocessor... gcc-13 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for gawk... gawk
checking for strip... strip
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for unsigned long long int... yes
checking for long long int... yes
checking if the compiler supports trailing commas... yes
checking if the compiler supports C++ comments... yes
checking --enable-fail-if-missing argument... yes
checking for clang version... N/A
checking for buggy tools... - sh is     'GNU bash, version 4.4.23(1)-release (x86_64-suse-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.' - probably OK.
checking uname... Linux
checking uname -r... 5.15.153.1-microsoft-standard-WSL2
checking uname -m... x86_64
checking for Haiku... no
checking for QNX... no
checking for Darwin (Mac OS X)... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for sys/time.h... yes
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for AvailabilityMacros.h... no
checking for dispatch/dispatch.h... no
checking --with-local-dir argument... Defaulting to /usr/local
checking --with-vim-name argument... Defaulting to vim
checking --with-ex-name argument... Defaulting to ex
checking --with-view-name argument... Defaulting to view
checking --with-global-runtime argument... no
checking --with-modified-by argument... no
checking if character set is EBCDIC... no
checking --disable-smack argument... no
checking for linux/xattr.h... yes
checking for sys/xattr.h... yes
checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... no
checking --disable-selinux argument... no
checking for is_selinux_enabled in -lselinux... no
checking --enable-xattr argument... yes
checking for sys/xattr.h... (cached) yes
checking --with-features argument... Defaulting to huge
checking --with-compiledby argument... no
checking --disable-xsmp argument... no
checking --disable-xsmp-interact argument... no
checking diff feature... enabled
checking --enable-luainterp argument... no
checking --enable-mzschemeinterp argument... no
checking --enable-perlinterp argument... no
checking --enable-pythoninterp argument... no
checking --enable-python3interp argument... no
checking --enable-tclinterp argument... yes
checking --with-tclsh argument... no
checking for tclsh8.5... no
checking for tclsh8.4... no
checking for tclsh8.2... no
checking for tclsh8.0... no
checking for tclsh... /usr/bin/tclsh
checking Tcl version... 8.6 - OK
checking for location of Tcl include... /usr/include/tcl.h
checking for location of tclConfig.sh script... /usr/lib64/tclConfig.sh
checking --enable-rubyinterp argument... no
checking --enable-cscope argument... no
checking --disable-netbeans argument... no
checking --disable-channel argument... no
checking for socket in -lsocket... no
checking whether compiling with IPv6 networking is possible... yes
checking for inet_ntop... yes
checking --enable-terminal argument... defaulting to yes
checking --enable-autoservername argument... no
checking --enable-multibyte argument... yes
checking --disable-rightleft argument... no
checking --disable-arabic argument... no
checking --enable-xim argument... defaulting to auto
checking --enable-fontset argument... no
checking for xmkmf... no
checking for X... no
checking if X11 header files can be found... no
checking --enable-gui argument... no GUI support
checking for pkg-config... /usr/bin/pkg-config
checking for X11/SM/SMlib.h... no
checking for /proc link to executable... /proc/self/exe
checking for CYGWIN or MSYS environment... no
checking whether toupper is broken... no
checking whether __DATE__ and __TIME__ work... yes
checking whether __attribute__((unused)) is allowed... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for sys/select.h... (cached) yes
checking for sys/utsname.h... yes
checking for termcap.h... yes
checking for fcntl.h... yes
checking for sgtty.h... yes
checking for sys/ioctl.h... yes
checking for sys/time.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for termio.h... yes
checking for iconv.h... yes
checking for inttypes.h... (cached) yes
checking for langinfo.h... yes
checking for math.h... yes
checking for unistd.h... (cached) yes
checking for stropts.h... no
checking for errno.h... yes
checking for sys/resource.h... yes
checking for sys/systeminfo.h... no
checking for locale.h... yes
checking for sys/stream.h... no
checking for termios.h... yes
checking for libc.h... no
checking for sys/statfs.h... yes
checking for poll.h... yes
checking for sys/poll.h... yes
checking for pwd.h... yes
checking for utime.h... yes
checking for sys/param.h... yes
checking for sys/ptms.h... no
checking for libintl.h... yes
checking for libgen.h... yes
checking for util/debug.h... no
checking for util/msg18n.h... no
checking for frame.h... no
checking for sys/acl.h... no
checking for sys/access.h... no
checking for sys/sysinfo.h... yes
checking for wchar.h... yes
checking for wctype.h... yes
checking for sys/ptem.h... no
checking for sys/sysctl.h... no
checking for pthread_np.h... no
checking for strings.h... (cached) yes
checking if strings.h can be included after string.h... yes
checking whether gcc-13 needs -traditional... no
checking for an ANSI C-conforming const... yes
checking for working volatile... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for uint32_t... yes
checking for ino_t... yes
checking for dev_t... yes
checking whether byte ordering is bigendian... no
checking for inline... inline
checking for rlim_t... yes
checking for stack_t... yes
checking whether stack_t has an ss_base field... no
checking --with-tlib argument... empty: automatic terminal library selection
checking for tgetent in -ltinfo... yes
checking whether we talk terminfo... yes
checking what tgetent() returns for an unknown terminal... zero
checking whether termcap.h contains ospeed... yes
checking whether termcap.h contains UP, BC and PC... yes
checking whether tputs() uses outfuntype... no
checking whether del_curterm() can be used... yes
checking whether sys/select.h and sys/time.h may both be included... yes
checking for /dev/ptc... no
checking for SVR4 ptys... yes
checking for ptyranges... don't know
checking for struct sigcontext... yes
checking getcwd implementation is broken... no
checking for fchdir... yes
checking for fchown... yes
checking for fchmod... yes
checking for fsync... yes
checking for getcwd... yes
checking for getpseudotty... no
checking for getpwent... yes
checking for getpwnam... yes
checking for getpwuid... yes
checking for getrlimit... yes
checking for gettimeofday... yes
checking for localtime_r... yes
checking for lstat... yes
checking for memset... yes
checking for mkdtemp... yes
checking for nanosleep... yes
checking for opendir... yes
checking for putenv... yes
checking for qsort... yes
checking for readlink... yes
checking for select... yes
checking for setenv... yes
checking for getpgid... yes
checking for setpgid... yes
checking for setsid... yes
checking for sigaltstack... yes
checking for sigstack... yes
checking for sigset... yes
checking for sigsetjmp... no
checking for sigaction... yes
checking for sigprocmask... yes
checking for sigvec... no
checking for strcasecmp... yes
checking for strcoll... yes
checking for strerror... yes
checking for strftime... yes
checking for stricmp... no
checking for strncasecmp... yes
checking for strnicmp... no
checking for strpbrk... yes
checking for strptime... yes
checking for strtol... yes
checking for tgetent... yes
checking for towlower... yes
checking for towupper... yes
checking for iswupper... yes
checking for tzset... yes
checking for usleep... yes
checking for utime... yes
checking for utimes... yes
checking for mblen... yes
checking for ftruncate... yes
checking for unsetenv... yes
checking for posix_openpt... yes
checking for clock_gettime... yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking --enable-canberra argument... Defaulting to yes
checking for libcanberra... no; try installing libcanberra-dev
checking --enable-libsodium argument... Defaulting to yes
checking for libsodium... no; try installing libsodium-dev
checking for st_blksize... yes
checking for timer_create without -lrt... yes
checking whether stat() ignores a trailing slash... no
checking for nanoseconds field of struct stat... st_mtim.tv_nsec
checking for iconv_open()... yes
checking for nl_langinfo(CODESET)... yes
checking for strtod in -lm... yes
checking for isinf()... yes
checking for isnan()... yes
checking --disable-acl argument... no
checking for acl_get_file in -lposix1e... no
checking for acl_get_file in -lacl... no
checking for POSIX ACL support... no
checking for acl_get in -lsec... no
checking for Solaris ACL support... no
checking for AIX ACL support... no
checking --enable-gpm argument... yes
checking for gpm... no
checking --disable-sysmouse argument... no
checking for sysmouse... no
checking for FD_CLOEXEC... yes
checking for rename... yes
checking for dirfd... yes
checking for flock... yes
checking for sysctl... not usable
checking for sysinfo... yes
checking for sysinfo.mem_unit... yes
checking for sysinfo.uptime... yes
checking for sysconf... yes
checking for _SC_SIGSTKSZ via sysconf()... yes
checking size of int... 4
checking size of long... 8
checking size of time_t... 8
checking size of off_t... 8
checking uint32_t is 32 bits... ok
checking whether memmove handles overlaps... yes
checking for _xpg4_setrunelocale in -lxpg4... no
checking how to create tags... ctags
checking how to run man with a section nr... man
checking --disable-nls argument... no
checking for msgfmt... no
checking for NLS... msgfmt not found - disabled
checking for dlfcn.h... yes
checking for dlopen()... yes
checking for dlsym()... yes
checking for setjmp.h... yes
checking for GCC 3 or later... yes
checking whether we need -D_FORTIFY_SOURCE=1... yes
checking whether we need to force -D_FILE_OFFSET_BITS=64... no
checking linker --as-needed support... yes
configure: updating cache auto/config.cache
configure: creating auto/config.status
config.status: creating auto/config.mk
config.status: creating auto/config.h


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15437@github.com>

Christian Brabandt

unread,
Aug 6, 2024, 7:04:46 AM8/6/24
to vim/vim, Subscribed

please share the configure logfile


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15437/2271008644@github.com>

Sektor van Skijlen

unread,
Aug 6, 2024, 5:12:25 PM8/6/24
to vim/vim, Subscribed

please share the configure logfile

It's pasted under "Logs and stack traces", whole file as is, since the first up to the last line.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15437/2272160143@github.com>

Christian Brabandt

unread,
Aug 7, 2024, 4:59:59 PM8/7/24
to vim/vim, Subscribed

That's not the configure.log file. It's in the src/auto directory. Anyhow, I think this patch might do it. Can you please check it?

diff --git a/src/auto/configure b/src/auto/configure
index 26ac45826..4afc7055b 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -8682,6 +8682,10 @@ fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_fontset" >&5
 printf "%s\n" "$enable_fontset" >&6; }

+if test "x$with_x" = "xno" -a "x$HAIKU" != "xyes" -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" -a "x$enable_gui" != "xno" -a "x$fail_if_missing" = "xyes"; then
+    as_fn_error $? "could not configure GUI" "$LINENO" 5
+fi
+
 test -z "$with_x" && with_x=yes
 test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
 if test "$with_x" = no; then
diff --git a/src/configure.ac b/src/configure.ac
index 29cd926b5..3341e72e0 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -2382,6 +2382,10 @@ AC_ARG_ENABLE(fontset,
 AC_MSG_RESULT($enable_fontset)
 dnl defining FEAT_XFONTSET is delayed, so that it can be disabled for no GUI

+if test "x$with_x" = "xno" -a "x$HAIKU" != "xyes" -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" -a "x$enable_gui" != "xno" -a "x$fail_if_missing" = "xyes"; then
+    AC_MSG_ERROR([could not configure GUI])
+fi
+
 test -z "$with_x" && with_x=yes
 test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
 if test "$with_x" = no; then


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15437/2274336971@github.com>

Jongbin Jung

unread,
Dec 16, 2025, 6:54:39 PM (6 hours ago) Dec 16
to vim/vim, Subscribed
jongbinjung left a comment (vim/vim#15437)

Had a similar issue, but with termio.h, using Fedora 43. AFAIK, I don't have termio.h, but configure seemed to think that I do, and that caused problems when building.

Was able to circumvent by commenting out termio.h check in src/auto/configure, i.e., :

diff --git a/src/auto/configure b/src/auto/configure
index 7cf35d66d..ff559b37c 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -12472,12 +12472,12 @@ then :
   printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h

 fi
-ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
-if test "x$ac_cv_header_termios_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
+# ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
+# if test "x$ac_cv_header_termios_h" = xyes
+# then :
+#   printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h

-fi
+# fi
 ac_fn_c_check_header_compile "$LINENO" "libc.h" "ac_cv_header_libc_h" "$ac_includes_default"
 if test "x$ac_cv_header_libc_h" = xyes
 then :


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15437/3662940626@github.com>

Reply all
Reply to author
Forward
0 new messages