Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
7th February 2021, 13:58 | #1 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Binary compiled by ICL 2021 doesn't work on XP
I'm trying to compile MediaInfo with the latest "2021" version of the Intel C++ compiler. For whatever reason, the Intel C++ compiler now seems to be called "oneAPI DPC++ Compiler" and all traces of the normal Intel C++ compiler have vanished from their web-site. But that's not the problem. Except for that fact that the "/Qax" option has disappeared - which was the outstanding feature of Intel C++ compiler - it seems to work as usual
However, I noticed that the binary created by ICL 2021 doesn't work on Windows XP: (works fine on my Windows 10 though) The binary was compiled with VS2017, the "v141_xp" Toolset and the /MT option, so should be compatible with Windows XP. Also, the binary was linked fully static. It think it definitely is not a missing dependency issue: (If it was a missing DLL or a missing entry point problem,then Windows also would give a different error message, I think) The NT header of the binary created by ICL 2021 looks as expected to me. Operating system version and sub-system both are set to "5.1", i.e. Windows XP, which should be fine: Trying to run the binary in WinDbg gives the following error (Win32 error 14001): Win32 error 14001 is: Quote:
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 7th February 2021 at 18:15. |
|
7th February 2021, 16:44 | #2 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Maybe not related [no idea what that German stuff says], but you should be made aware of this if you are not already aware,
(see from linked post till end, about 4 posts):- https://forum.doom9.org/showthread.p...48#post1935348 Quote:
Quote:
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 7th February 2021 at 16:48. |
||
7th February 2021, 18:08 | #3 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
This application could not be started, because the application configuration is incorrect. In order to solve the problem you should reinstall the application. Also, since the binary was compiled with the /MT option, it is fully static and it does not have any dependencies on the Visual C++ runtime, as can easily be checked with Dependency Walker (see screenshot above).
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 7th February 2021 at 18:11. |
|
7th February 2021, 18:41 | #4 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,904
|
I don't get it. You used Intel Parallel Studio to compile and the resulting exe is not XP compatible, right?
Then you tried to use the Microsoft Compiler with v141_xp within Intel Parallel Studio and the resulting binary is still not XP compatible? (if that's not what you've done, then I didn't understand) |
7th February 2021, 18:58 | #5 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
Intel C++ compiler integrates into Visual Studio. So, I used Visual Studio 2017 to compile MediaInfo, but with the Intel C++ Compiler. If you select the Intel C++ compiler, you can still select the "Base Platform Toolset" separately. I selected "v141_xp" here, in order to ensure that the resulting binary will be compatible to Windows XP. (I also tried with a "pure" MSVC binary and that works just fine under Windows XP) By the way: That is what I have been doing for years to build MediaInfo. Binaries have been working in Windows XP thus far. Something must have changed. But I don't know what exact is different with the binary now
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 7th February 2021 at 19:26. |
|
7th February 2021, 19:35 | #6 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Meh, I just realized that there is a subtle difference between the Manifest generated by Intel C++ compiler and MSVC:
So I edited the binary created by the Intel C++ compiler with Resource Hacker and "implanted" the Manifest from the MSVC binary. Surprise, surprise, binary now works in Windows XP
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
7th February 2021, 19:40 | #7 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Well spotted, glad you got it sorted.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
8th February 2021, 18:24 | #9 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,316
|
Stupid question i have to ask : When building, you have added the following option :
/Zc:threadSafeInit- (In C/C++ -> "Command line"). This is necessary to have a Windows XP working build, selecting the toolset is not enough.
__________________
My github. Last edited by jpsdr; 8th February 2021 at 18:26. |
8th February 2021, 19:23 | #10 | Link | ||
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
Problem was definitely caused by the Manifest, but I still have no idea what exactly in the Manifest generated by the Intel C++ compiler caused Windows XP to reject the binary. [EDIT] Quote:
Also, Windows XP apparently has a lower limit on the number of TLS sections. And, because "Thread-safe Local Static Initialization" makes uses of TLS internally (i.e. it draws from the TLS sections limit), there is a higher risk of exceeding the TLS section limit on Windows XP - when "Thread-safe Local Static Initialization" is enabled. That is why "/Zc:threadSafeInit-" may be needed for some applications to avoid that problem on Windows XP. But is it always good to disable "Thread-safe Local Static Initialization"? It may break applications that expect correct C++11 behavior, I think
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 9th February 2021 at 00:46. |
||
9th February 2021, 10:07 | #11 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,904
|
Over here I've always seen it within binaries compiled for XP for plugins and other things and even Avisynth itself, so I think it's pretty safe. Technically you could release two versions, like most people over here are doing: a legacy XP one with thread safe and another without targeting newer OS. Still, in your very case it was the manifest so it might not be related.
|
Thread Tools | Search this Thread |
Display Modes | |
|
|