Hello,One of our mentees was trying to build LibreOffice on Windows using LODE. At first, he mistakenly didn't install C/C++ development workload ("Desktop development with C++") from Visual Studio 2022. He had only installed individual components that were listed in the TDF wiki.
But after checking the Visual Studio 2022 workloads and individual components in a joint call, he also installed the above workload, and I think the installed Visual Studio workloads and components are OK now. He can successfully compile and run a test C++ program in Visual Studio 2022.
Even now, when invoking ./autogen.sh, he gets this error message. The complete log is also attached as config-output.txt.
$ ./autogen.sh . . .checking for Windows SDK... found Windows SDK 10.0 (/cygdrive/c/PROGRA~2/WI3CF2~1/10) checking for midl.exe... C:\Program Files (x86)\Windows Kits\10\/Bin/10.0.22621.0/x64/midl.exe checking for csc.exe... C:\Windows\Microsoft.NET\Framework\v4.0.30319\/csc.exe checking for al.exe... C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8.1 Tools\/al.exe checking .NET Framework... found: C:/PROGRA~2/WI3CF2~1/NETFXSDK/48D70E~1.1/
checking whether jumbo sheets are supported... yes checking whether to enable runtime optimizations... yes checking for valgrind/valgrind.h... no checking for sys/sdt.h... nochecking what the C++ library is... configure: error: Could not figure out what C++ library this is
Error running configure at ./autogen.sh line 322. make: *** No rule to make target 'check'. Stop.The problem can also be seen from config.log, which is also attached. At some point, the compiler is detected correctly, but the UCRT library is not:
configure:13493: checking build compilerconfigure:13527: result: C:/PROGRA~1/MICROS~1/2022/COMMUN~1/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe
configure:13573: checking for short pathname of VC product directory configure:13576: result: C:/PROGRA~1/MICROS~1/2022/COMMUN~1/VC configure:13582: checking for UCRT location configure:13586: result: ()I had also a similar issue on my computer. As I could successfully configure LibreOffice in a Cygwin shell, and not in another with different configuration, I compared the results of the two configurations and environment variables, and I could see that by disabling pseudo console, I could get a successful configuration:
export CYGWIN="disable_pcon" https://cygwin.com/cygwin-ug-net/using-cygwinenv.htmlUnfortunately, this was not the case for him, and didn't help. Also, this approach may have some performance impacts. So, I appreciate any help to resolve this problem.
Regards, Hossein
deepa@Deepanshu-Laptop ~/lode $ cd dev/core ./autogen.sh make check 2>&1 | tee build.log Running './configure --enable-debug --with-visual-studio=2022 --srcdir=/home/deepa/lode/dev/core --enable-option-checking=fatal' ******************************************************************** * * Running LibreOffice build configuration. * ******************************************************************** checking build system type... x86_64-pc-cygwin checking host system type... x86_64-pc-cygwin checking for product name... LibreOfficeDev checking for package version... 7.6.0.0.alpha0+ checking for product version... 7.6 checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for grep... (cached) /usr/bin/grep checking for GNU Make... C:/cygwin/home/deepa/lode/opt/bin/make configure: Using a native Win32 GNU Make version. checking for explicit COMSPEC... found: C:\WINDOWS\system32\cmd.exe checking for sed... /usr/bin/sed checking whether to use link-time optimization... no configure: VCL platform has a usable dynamic loading API: yes configure: VCL platform uses freetype+fontconfig: no configure: VCL platform uses headless plugin: no configure: VCL platform uses X11: no checking for explicit AFLAGS... no checking for explicit CFLAGS... no checking for explicit CXXFLAGS... no checking for explicit OBJCFLAGS... no checking for explicit OBJCXXFLAGS... no checking for explicit LDFLAGS... no checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for library containing backtrace... no checking for libexecinfo... no checking whether build target is Release Build... no checking whether to build a Community flavor... yes checking whether to sign windows build... no checking for gawk... gawk checking for gawk... /usr/bin/gawk checking for bash... /bin/sh checking for pigz... no checking for gzip... /usr/bin/gzip checking for GNU or BSD tar... tar checking for tar's option to strip components... --strip-components checking how to build and package galleries... internal src images for desktop checking for ccache... not found checking for sccache... (cached) not found checking whether to build with Java support... yes checking whether to treat the installation as read-only... no checking Visual C++... checking multi-arch compiler... C:/PROGRA~1/MICROS~1/2022/COMMUN~1/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x86/cl.exe checking build compiler... C:/PROGRA~1/MICROS~1/2022/COMMUN~1/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe checking for short pathname of VC product directory... C:/PROGRA~1/MICROS~1/2022/COMMUN~1/VC checking for UCRT location... () checking for MSBuild.exe location for: 17.0... C:/PROGRA~1/MICROS~1/2022/COMMUN~1/VC/../MSBuild/Current/Bin/amd64 configure: found Visual C++ 2022 checking cl.exe is at least Visual Studio 2019 version 16.5... yes checking cl.exe is at least Visual Studio 2019 version 16.10... yes checking for a x86 compiler and libraries for 32-bit binaries required for TWAIN support... found checking whether the compiler is actually Clang... no checking the dependency generation prefix (cl.exe -showIncludes)... "conftest.c(1): fatal error C1083: Cannot open inclu"e file: 'stdlib.h': No such file or directory checking whether to build with additional debug utilities... no checking whether to do a debug build... yes checking whether cl.exe supports -Xclang -debug-info-kind=constructor... no checking whether to generate debug information... yes checking whether to compile with optimization flags... no checking which package format to use... none checking which help to build... no checking if we need to build the help index tooling... yes checking whether to enable xapian-omega support for online help... no checking whether to include the XML-help support... yes checking for helppack integration... no integration checking which lockfile binary to use... internal checking for getopt.h... no checking for paths.h... no checking for sys/param.h... no checking for utime... no checking for utimes... no checking for syslog.h... no checking whether to turn warnings to errors... yes checking whether to have assert() failures abort even without --enable-debug... yes checking whether to build the pagein binaries for oosplash... no checking whether to enable CUPS support... no checking which fontconfig to use... not tested checking whether we want to fetch tarballs... yes, if we use them checking whether to include MySpell dictionaries... no checking whether to use dicts from external paths... no checking whether to enable pch feature... yes (full) checking whether C:/PROGRA~1/MICROS~1/2022/COMMUN~1/VC/Tools/MSVC/1434~1.319/bin/Hostx64/x64/cl.exe supports -fpch-instantiate-templates... no checking whether C:/PROGRA~1/MICROS~1/2022/COMMUN~1/VC/Tools/MSVC/1434~1.319/bin/Hostx64/x64/cl.exe supports -Xclang -building-pch-with-obj... no checking the GNU Make version... C:/cygwin/home/deepa/lode/opt/bin/make 4.2.1 checking for --hash-style gcc linker support... no checking for perl... /usr/bin/perl checking the Perl version... Perl 5 checking for required Perl modules... all modules found checking for Windows SDK... found Windows SDK 10.0 (/cygdrive/c/PROGRA~2/WI3CF2~1/10) checking for midl.exe... C:\Program Files (x86)\Windows Kits\10\/Bin/10.0.22621.0/x64/midl.exe checking for csc.exe... C:\Windows\Microsoft.NET\Framework\v4.0.30319\/csc.exe checking for al.exe... C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8.1 Tools\/al.exe checking .NET Framework... found: C:/PROGRA~2/WI3CF2~1/NETFXSDK/48D70E~1.1/ checking whether jumbo sheets are supported... yes checking whether to enable runtime optimizations... yes checking for valgrind/valgrind.h... no checking for sys/sdt.h... no checking what the C++ library is... configure: error: Could not figure out what C++ library this is Error running configure at ./autogen.sh line 322. make: *** No rule to make target 'check'. Stop.
Attachment:
config.log.gz
Description: application/gzip