Bug 153476 - Configuration problem: checking for UCRT location fails
Summary: Configuration problem: checking for UCRT location fails
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-08 17:29 UTC by Hossein
Modified: 2023-02-09 07:44 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2023-02-08 17:29:58 UTC
I have previously sent the details of this build problem to the dev mailing list, but I think it deserves a bug report:

Configuration problem: checking for UCRT location fails
https://lists.freedesktop.org/archives/libreoffice/2023-January/089880.html

I am using Visual Studio 2022 to build LibreOffice, but in the configuration phase when invoking ./autogen.sh, I gets this error message when trying to configure the latest LO 7.6 master: f7c03364e24da285ea95cea0cc688a7a120fc163

$ ./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.20348.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 Tools\/al.exe
checking .NET Framework... found: C:/PROGRA~2/WI3CF2~1/NETFXSDK/4.8/
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 321.

The problem can also be seen from config.log. At some point, the compiler is detected correctly, but the UCRT library is not:

...
configure:19511: result: no
configure:20052: checking what the C++ library is
configure:20078: C:/PROGRA~1/MIB055~1/2022/COMMUN~1/VC/Tools/MSVC/1430~1.307/bin/Hostx64/x64/cl.exe -c  -IC:/PROGRA~2/WI3CF2~1/10/Include/ucrt  -IC:/PROGRA~2/WI3CF2~1/10/Include/ucrt -IC:/PROGRA~1/MIB055~1/2022/COMMUN~1/VC/Tools/MSVC/1430~1.307/Include conftest.cpp >&5
conftest.cpp
C:/PROGRA~1/MIB055~1/2022/COMMUN~1/VC/Tools/MSVC/1430~1.307/Include\cstddef(12): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
Microsoft (R) C/C++ Optimizing Compiler Version 19.30.30711.2 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.
...


I can get rid of the problem by setting this environment variable:

export CYGWIN="disable_pcon"
https://cygwin.com/cygwin-ug-net/using-cygwinenv.html

Unfortunately, this was not the case for our mentee which has the same problem. This approach may have some performance impacts.

These are the logs:
Name: config-output.txt
https://lists.freedesktop.org/archives/libreoffice/attachments/20230127/d90606ed/attachment.txt

Name: config.log.gz
https://lists.freedesktop.org/archives/libreoffice/attachments/20230127/d90606ed/attachment.gz
Comment 1 Hossein 2023-02-08 18:55:36 UTC
I tried to bisect this problem with libreoffice 7.3, so I did:

 git checkout origin/libreoffice-7-3

But I had the same problem there. I think this can be a problem with the recent Windows 10 updates, because I have encountered this problem from the time I updated Windows 10 after a while.

Our mentee is using Windows 11.
Comment 2 Commit Notification 2023-02-09 07:07:48 UTC
Hossein committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b1f0c23720cbb7a30128c066d54f7dcf1fdc6178

tdf#153476 Disable MS telemetry in VsDevCmd.bat

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Hossein 2023-02-09 07:44:05 UTC
The problem is fixed for me now. Both the path and version of UCRT is detected correctly.