LLVM 3.4 RC3 fails to run on Win32

Hello all,

I downloaded LLVM-3.4-rc3-win32.exe from http://llvm.org/pre-releases/3.4/rc3/ but all *.exe files of bin directory fail to run on a native Windows XP 32 bit system. Could it be that they are compiled for a 64 bit system?

Best regards
Jasper Neumann

Looking at the PE32 file for it, it is a 32-bit executable. More
likely, the version was built using a newer visual studio (2012, or
2013), but not built with XP support enabled.

~Aaron

Hello Aaron, hello all,

> Looking at the PE32 file for it, it is a 32-bit executable. More
> likely, the version was built using a newer visual studio (2012, or
> 2013), but not built with XP support enabled.

This is a plausible cause. Thanks for the explanation.

I sincerely hope that subsequent release candidates and release versions are usable also on even older Windows versions such as Windows 2000. Similar things might hold for other operating systems.
BTW: What's the point of creating a compiler but not using it? :slight_smile:
IMHO published versions of the compiler should have been compiled with itself.

Best regards
Jasper Neumann

Hello Aaron, hello all,

Looking at the PE32 file for it, it is a 32-bit executable. More
likely, the version was built using a newer visual studio (2012, or
2013), but not built with XP support enabled.

This is a plausible cause. Thanks for the explanation.

I sincerely hope that subsequent release candidates and release versions are
usable also on even older Windows versions such as Windows 2000.

This is not likely to happen -- Windows XP is the minimum OS we are
supporting. However, it might make sense for us to explore creating
the pre-built binaries with XP support enabled. If it proves to be
impossible (IIRC, using XP support could change the compiler features
we can use from MSVC), we should at least cause the installer to fail
on XP and lower (we should fail on Win2k and lower no matter what, but
since I don't create the installers, it's easy for me to say this).

Similar
things might hold for other operating systems.
BTW: What's the point of creating a compiler but not using it? :slight_smile:
IMHO published versions of the compiler should have been compiled with
itself.

clang can self-host on Windows, but the linker support isn't there for
producing executables. MSVC ABI compatibility is coming along nicely,
but not to the point where we can use LINK.exe to link clang (that I'm
aware of), and lld support for PE32 files is also coming along nicely,
but not completed yet either.

~Aaron

It could also be that the target system is missing a MSVCRT update/SxS version - this happens a lot on us, to the point our installer includes the installer for the specific version of MSVCRT we build against.

Hello Peter, hello all,

>> I downloaded LLVM-3.4-rc3-win32.exe from
>> http://llvm.org/pre-releases/3.4/rc3/ but all *.exe files of bin
>> directory fail to run on a native Windows XP 32 bit system. Could it
>> be that they are compiled for a 64 bit system?

> It could also be that the target system is missing a MSVCRT update/SxS
> version - this happens a lot on us, to the point our installer includes
> the installer for the specific version of MSVCRT we build against.

Maybe. To be more concrete, here are my observations with more details:

My test system:
Microsoft Windows XP
Professional
Version 2002
Service Pack 2

Intel Atom N450
with physical address extension (PAE)

As far as I remember there were no updates to the operating system.

The installation of LLVM-3.4-rc3-win32.exe worked flawlessly and only sported the following message in a command line window:
===>
Installing MSVC integration...
Failed to find MSBuild toolsets directory.
MSVC integration install failed.
Drücken Sie eine beliebige Taste . . .
<===
This was to be expected since no MS C compiler is present.
The last line means "Press any key to continue".

The MS common runtime library DLLS are as follows in C:\windows\system32\ :
msvcrt.dll: 7.0.2600.2180 (xpsp_sp2_rtm.040803-2158)
msvcrt20.dll: 2.12.000
msvcrt40.dll: 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
msvcr70.dll: 7.00.9466.0
msvcr100.dll: 10.00.40219.1
msvcp50.dll: 5.00.7051
msvcp60.dll: 6.02.3104.0
msvcp100.dll: 10.00.40219.1

All programs of LLVM\bin\ fail by popping up a window with the following message:
===>
C:\Programme\LLVM\bin\clang.exe ist keine zulässige Win32-Anwendung.
<===
This means "... is not a valid Win32 application".

Best regards
Jasper Neumann

I suggest the use of Dependency Walker (http://www.dependencywalker.com/) to check for errors. This tests for things like Side-by-side versions of DLLs.

In my experience any failure, in a Win32 console application, will produce that error message.

That said, I am guessing here, I have no experience with these pre-built binaries etc.

It could also be that the target system is missing a MSVCRT update/SxS
version - this happens a lot on us, to the point our installer includes the
installer for the specific version of MSVCRT we build against.

The binaries are statically linked (/MT) against the run-time library
to avoid any problems with missing or wrong version of MSVCRT etc.

- Hans

Sorry for the late reply, I've been away over the holidays.

Looking at the PE32 file for it, it is a 32-bit executable. More
likely, the version was built using a newer visual studio (2012, or
2013), but not built with XP support enabled.

Yes, this is probably the reason.

Both the snapshot builds and the 3.4 release are 32-bit builds done
with Visual Studio 2012, but they didn't were not done with the XP
compatible mode.

I don't know the details of what the difference is in this "XP support
mode", but I'll try to figure out if we can use that for future
builds.

Thanks,
Hans

Hi Jasper,

Hello all,

I downloaded LLVM-3.4-rc3-win32.exe from
http://llvm.org/pre-releases/3.4/rc3/ but all *.exe files of bin directory
fail to run on a native Windows XP 32 bit system. Could it be that they are
compiled for a 64 bit system?

As was pointed out in the thread, the binaries don't work because
they're built with Visual Studio 2012 without XP support enabled.

I have attempted to build this week's 3.5 snapshot
(http://llvm.org/builds/downloads/LLVM-3.5.r198737-win32.exe) with XP
support. I don't have a Win XP machine handy, so it would be great if
you or someone else could give it a try and see if it works.

Thanks,
Hans

I'm very sorry, it seems I forgot to reload my browser before copying
that link. The latest snapshot is here:
http://llvm.org/builds/downloads/LLVM-3.5.r199319-win32.exe

I managed to try this on a vanilla Win XP SP3 machine, and it seems to
work :slight_smile: I didn't do a lot of testing, but at least clang.exe and
clang-cl.exe both execute and can compile a simple file.

Thanks,
Hans