Bug 108580 - Cannot run LibreOffice, api-ms-win-crt-runtime-l1-1-0.dll is missing (for local solution see comment 7)
Summary: Cannot run LibreOffice, api-ms-win-crt-runtime-l1-1-0.dll is missing (for loc...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
5.4.0.0.beta2
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.0.0 target:5.4.3 target:6.1....
Keywords:
: 109994 111628 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-06-17 05:44 UTC by karthikeyan g
Modified: 2018-01-08 17:14 UTC (History)
14 users (show)

See Also:
Crash report or crash signature:


Attachments
error msge and two different system configuration (220.20 KB, image/jpeg)
2017-06-17 05:50 UTC, karthikeyan g
Details
Install log for an installation resulted in non-functional program (2.14 MB, application/x-zip-compressed)
2017-08-11 09:12 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description karthikeyan g 2017-06-17 05:44:23 UTC
Description:
click the icon the error msge is"the program cannot start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer.try to reinstalling the program to fix this problem

Actual Results:  
application did not open error msge will be received

Expected Results:
application open 


Reproducible: Always

User Profile Reset: No

Additional Info:
click the icon the error msge is"the program cannot start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer.try to reinstalling the program to fix this probletry to install two and more systems same error msge will be received


User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36
Comment 1 karthikeyan g 2017-06-17 05:50:31 UTC
Created attachment 134077 [details]
error msge and two different system configuration
Comment 2 Xisco Faulí 2017-06-19 08:52:34 UTC
This is not a LibreOffice problem. There's a plausible solution to the problem here: https://www.smartftp.com/support/kb/the-program-cant-start-because-api-ms-win-crt-runtime-l1-1-0dll-is-missing-f2702.html
Comment 3 Mike Kaganski 2017-08-01 13:48:28 UTC
(In reply to Xisco Faulí from comment #2)

Xisco, I'm not sure it's NOTOURBUG. As I described in bug 108005 comment 16, since 5.4 there are *a lot* of these errors. And the problem is that we bundle the necessary libraries with LO! You may check that using, e.g., 7-zip and opening our MSIs with it, and see that the problematic file is there. We even had a story with runtime for VS 2015 that we couldn't bundle for some time: see https://wiki.documentfoundation.org/Development/msvc-x86_64#VC_Runtime_Install_Error_.28FIXED.2C_keep_for_ref.29
Comment 4 Aron Budea 2017-08-10 20:29:55 UTC
Let's keep this open until we actually find out what's going on, or at least until the reports stop coming in.
Comment 5 Aron Budea 2017-08-10 20:30:55 UTC
*** Bug 111628 has been marked as a duplicate of this bug. ***
Comment 6 Aron Budea 2017-08-10 20:31:19 UTC
*** Bug 109994 has been marked as a duplicate of this bug. ***
Comment 7 Aron Budea 2017-08-10 20:37:00 UTC
This is where Visual C++ 2015 Redistributable Update 3 has to be installed from:
https://www.microsoft.com/en-us/download/details.aspx?id=53840
Comment 8 Mike Kaganski 2017-08-11 07:53:37 UTC
As documentation states, [1] if a directory name *starts with* one of predefined SystemFolder properties, a CustomAction type 51 is generated for it. "It does not verify that the directory name exactly equals the directory property. Any directory beginning with one of these standard folder names gets a type 51 custom action, even if the rest of the name is not a GUID."

Our fix for bug 105311 follows this description literally. But my concern is if we are victims of another MS documentation flaw. I mean, the passage "The tables in the merge module must reference the location of a child directory of TARGETDIR, *or another directory in the merge module's tree*" in the mentioned documentation page (emphasis mine).

The C-Runtime merge module has two directories in it, named

SystemFolder.E281B893_10D7_34CE_BB0E_B69D88E154A5
and
SystemFolder_x86_VC.E281B893_10D7_34CE_BB0E_B69D88E154A5

The former has its parent set to TARGETDIR, and the latter has its parent set to former (SystemFolder.E281B893_10D7_34CE_BB0E_B69D88E154A5). I.e., they form a hierarchy (though the latter doesn't define any subdirectory).

But we generate two custom actions for both of them, because they both do begin with "SystemFolder". Thus, we may break the hierarchy (that's my guess). Intuitively, this shouldn't break things, as we still point both to a proper location, but who knows.

Could it be that MS documentation must be read as "if directory name *before dot* is equal to one of pre-defined SystemFolder properties, ..."?

Adding David Ostrovsky (the author of fix for bug 105311, and expert in this area) to CC list.

[1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa367787
Comment 9 Mike Kaganski 2017-08-11 09:12:57 UTC
Created attachment 135448 [details]
Install log for an installation resulted in non-functional program

This is an installation log taken on a freshly-installed Windows Server 2008 Version 6.1 (Build 7601: Service Pack 1), no updates, with command line

msiexec /i C:\Users\Administrator\Downloads\LibreOffice_5.4.0.3_Win_x86.msi /l*vx C:\Users\Administrator\Downloads\LOinst.log

The installation completed successfully, and then launching the program resulted in the mentioned error message:

---------------------------
soffice.exe - System Error
---------------------------
The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. Try reinstalling the program to fix this problem. 
---------------------------
OK   
---------------------------
Comment 10 Mike Kaganski 2017-08-11 09:41:06 UTC
The problem is condition for component "ucrtbase.dll_system_x86.E281B893_10D7_34CE_BB0E_B69D88E154A5", which is

((VersionNT = 501) OR (VersionNT = 502)) AND (VC_REDIST=1)

This is only true for WinXP systems. So, I assume that the problem is only with Vista+ systems that have no Universal C Runtime preinstalled (up to Windows 10?). Changing the condition to simple

VC_REDIST=1

allows me to install and run LibreOffice on the above-mentioned test system.

Searching for "VersionNT" over repository doesn't give any similar results, I assume that this comes from merge module itself.

The Microsoft Visual C++ 2015 Redistributable Update 3 download page references KB 2999226 [1], which tells about different Universal C Runtime packages for different Windows versions. This makes me think that there might be different merge modules for different Windows versions, that we might need to include into installer, each one with its own VersionNT condition. I am not sure that simply forcing the WinXP version (that we bundle now) to install on any Vista+ is a proper solution.

[1] https://support.microsoft.com/en-us/kb/2999226
Comment 11 Mike Kaganski 2017-08-11 09:54:10 UTC
Sigh.

A discussion in a blog by Visual C++ team [1] describes this in detail.

> On Windows Vista and newer operating systems, the Universal CRT is
> installed via Windows Update—either when the machine downloads new
> updates from the web or when you install one of the redistributable
> packages from the Download Center (the November build, 10586, can be
> found here:
> http://www.microsoft.com/en-us/download/details.aspx?id=50410).
> Windows Update redistributables do not use MSI; they have a different
> installer technology. Because they do not use MSI, there are no MSMs
> for the Universal CRT. For Windows Vista and newer, installation of
> the Windows Update packages is the only supported way to get the
> Universal CRT onto the machine in the system directory. The Visual C++
> libraries MSMs install the Universal CRT on Windows XP only because
> the Universal CRT is not an operating system component on Windows XP
> (and Windows XP does not support the same Windows Update packaging
> mechanisms that are used on Windows Vista and above). Do not modify
> the MSMs.

So, it turns out that we cannot bundle the Universal CRT with the installer. In that case, we have a hard external dependency on those systems, that we must mention on release notes page. And possibly on the download page, with a link to MS site (mentioned in comment 7).

[1] https://blogs.msdn.microsoft.com/vcblog/2015/03/03/introducing-the-universal-crt/
Comment 12 Mike Kaganski 2017-08-11 10:39:38 UTC
Or can we?

On the same page mentioned in comment 11:

> 6. Updated September 11, 2015:  App-local deployment of the Universal CRT is
> supported.  To obtain the binaries for app-local deployment, install the
> Windows Software Development Kit (SDK) for Windows 10.  The binaries will be
> installed to C:\Program Files (x86)\Windows Kits\10\Redist\ucrt.  You will
> need to copy all of the DLLs with your app (note that the set of DLLs are
> necessary is different on different versions of Windows, so you must include
> all of the DLLs in order for your program to run on all supported versions
> of Windows).
Comment 13 Ted Mittelstaedt 2017-08-20 19:48:10 UTC Comment hidden (no-value)
Comment 14 Kumāra 2017-09-07 05:56:34 UTC
Is this serious enough to escalate Importance to major? Most Windows users meeting this problem will likely not be able to solve it on their own.

While a solution is being discussed, I suggest placing a prominent note on the Windows download page on the requirement. Those who rather not deal with this issue on their own should go for the Still version for now.
Comment 15 Kumāra 2017-09-14 03:34:49 UTC
(In reply to Aron Budea from comment #7)
> This is where Visual C++ 2015 Redistributable Update 3 has to be installed
> from:
> https://www.microsoft.com/en-us/download/details.aspx?id=53840

Somehow this didn't work for me. Neither did Still version: 5.3.6.
I've opted to return to 5.2.5.1, and will stay on until this bug is resolved.
Comment 16 Libomark 2017-09-18 08:34:53 UTC Comment hidden (me-too)
Comment 17 Kumāra 2017-09-18 09:12:47 UTC
(In reply to Libomark from comment #16)
> Anyone coming new to LO would likely just give up and look for something
> else: failed installations are IMHO a critical error - nothing works.

I agree. Can we have this escalated to critical?
Comment 18 Mike Kaganski 2017-10-05 13:12:02 UTC
It seems that 2015+ vcredists aren't MSI-dependent (rather, they contain MSU packages in it, which require wusa.exe to run).

Maybe these packages won't conflict with MSI process, and thus, will allow us to run from installer? We could try to package the vc_redist.exe to out MSI, and run it in case a pre-requisite fits (OS + absence of the redist)?
Comment 19 Mike Saunders 2017-10-23 08:11:57 UTC
We are monitoring emails sent to the download@libreoffice.org address, where users can send questions, and we are getting this a lot. We could set up the auto-responder to point people here: https://www.microsoft.com/en-us/download/details.aspx?id=52685

Or is a fix in preparation for an upcoming release?

Thanks
Comment 20 Mike Saunders 2017-10-23 09:56:44 UTC
(In reply to Mike Saunders from comment #19)
> 
> Or is a fix in preparation for an upcoming release?

From speaking to Cloph, it looks like this will be fixed by bundling the DLL in 5.4.3 onwards.
Comment 21 Commit Notification 2017-10-31 14:38:57 UTC
Christian Lohmaier committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=71d9a61302e65fe091cf70c13fa72b3df09b7e3a

tdf#108580 ship universal crts with the program as workaround

It will be available in 6.0.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2017-11-02 21:58:47 UTC
Christian Lohmaier committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=67940d53fd68283c7dbc70897063c33d5ede49df&h=libreoffice-5-4

tdf#108580 ship universal crts with the program as workaround

It will be available in 5.4.4.

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

Affected users are encouraged to test the fix and report feedback.
Comment 23 Commit Notification 2017-11-02 22:01:18 UTC
Christian Lohmaier committed a patch related to this issue.
It has been pushed to "libreoffice-5-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2c5875485dd53c9e6d509ffa474212fadb8cefed&h=libreoffice-5-4-3

tdf#108580 ship universal crts with the program as workaround

It will be available in 5.4.3.

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

Affected users are encouraged to test the fix and report feedback.
Comment 24 Oliver Brinzing 2017-11-03 19:16:06 UTC
.
Comment 25 Boris Silva R 2017-11-07 21:10:54 UTC
What are the dll to copy to get installed 5.4.2.2 from 5.4.2.2 portable?
Comment 26 Boris Silva R 2017-11-09 01:57:54 UTC
(In reply to Boris Silva R from comment #25)
> What are the dll to copy to get installed 5.4.2.2 from 5.4.2.2 portable?

For now i copy all api-ms-win-***.dll fron the LibreOfficePortable\App\libreoffice\program to the installed LO 5.4.2.2 and get it working in Win7 (no sp1)
Comment 27 Commit Notification 2017-12-18 11:53:44 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=61b1d631331551b43bc7d619be33bfbfeff7cad6

tdf#108580: integrate vc_redist.exe into MSI

It will be available in 6.1.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 28 Commit Notification 2018-01-08 17:14:26 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ca893ce3e4da351576e0d57caada57da190773f2&h=libreoffice-6-0

tdf#108580: integrate vc_redist.exe into MSI

It will be available in 6.0.0.2.

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

Affected users are encouraged to test the fix and report feedback.