Hello,

The latest Visual Studio 2026 release is version 18.7.0, which is released a few days ago:

Update 18.7.0, June 9, 2026
https://learn.microsoft.com/en-us/visualstudio/releases/2026/release-notes#june-update-1870

When I tried to build LibreOffice with this version, the configuration phase could not complete. I got the error message:

$ ./autogen.sh:
...
   checking for clang-cl... no
checking the dependency generation prefix (clang.exe -showIncludes)... configure: error: cannot determine the -showIncludes prefix
Error running configure at ./autogen.sh line 338.

clang/clang-cl were available, although not in the path. You may try clang/clang-cl and the options from the "x64 Native Tools Command Prompt for VS" link in Windows, you will have after VS 2026 installation.

I reverted back to 18.6.2, and the problem went away. But, we should find solutions for that, both for the new installations, and the regular updates from devs.

This is the relevant function in configure.ac around line 4900, which uses a regex:

SHOWINCLUDES_PREFIX=
if test "$_os" = WINNT; then
dnl We need to guess the prefix of the -showIncludes output, it can be
    dnl localized
AC_MSG_CHECKING([the dependency generation prefix (cl.exe -showIncludes)])
    echo "#include <stdlib.h>" > conftest.c
SHOWINCLUDES_PREFIX=`VSLANG=1033 $CC $CFLAGS -c -showIncludes conftest.c 2>/dev/null | \
        grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
    rm -f conftest.c conftest.obj
    if test -z "$SHOWINCLUDES_PREFIX"; then
        AC_MSG_ERROR([cannot determine the -showIncludes prefix])
    else
        AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"])
    fi
fi
AC_SUBST(SHOWINCLUDES_PREFIX)

I can guess that the output in the compiler is changed, and we should change configure.ac to be able to handle that.

These are some relevant commits:

commit e74d0f01504c61917d8ff9e7538a0017b6212ff5
Author: Stephan Bergmann <[email protected]>
Date:   Wed Oct 19 10:18:07 2022 +0200

    Make MSVC -showIncludes processing more reliable

commit 01554ccd201cdbccbe3bb76812ef51ece0f8d777
Author: Stephan Bergmann <[email protected]>
Date:   Tue Sep 12 12:43:56 2017 +0200

    Make detection of Clang CL driver mode more robust

Regards,
Hossein

--
Hossein Nourikhah, Ph.D., Developer Community Architect
Tel: +49 30 5557992-65 | Email: [email protected]
The Document Foundation, Winterfeldtstraße 52, 10781 Berlin, DE
Gemeinnützige rechtsfähige Stiftung des bürgerlichen Rechts
Legal details: https://www.documentfoundation.org/imprint

Reply via email to