[cfe-dev] building LLVM/Clang on Windows 7 x64 using MinGW/MSYS

Dennis Cote DennisC at harding.ca
Thu Oct 10 16:12:59 PDT 2013

I tried building with the MinGW64 compiler and got a different link error at 64% of the build:


Linking CXX executable ../../bin/lli.exe

../../lib/libLLVMExecutionEngine.a(RTDyldMemoryManager.cpp.obj):RTDyldMemoryManager.cpp:(.text+0x8f): undefined reference to `__register_frame'

collect2.exe: error: ld returned 1 exit status

tools/lli/CMakeFiles/lli.dir/build.make:198: recipe for target `bin/lli.exe' failed

make[2]: *** [bin/lli.exe] Error 1

CMakeFiles/Makefile2:7475: recipe for target `tools/lli/CMakeFiles/lli.dir/all' failed

make[1]: *** [tools/lli/CMakeFiles/lli.dir/all] Error 2

Makefile:136: recipe for target `all' failed

make: *** [all] Error 2


So I went back and tried the 32 bit tools again. I got the same failure, but I noticed that ld.exe was only using 1.97 GB of ram when it crashed, so I'm not sure the problem is an address space issue. 


I will be busy with moving for a few days, but any other ideas are welcome.


Dennis Cote



From: Yaron Keren [mailto:yaron.keren at gmail.com] 
Sent: October 10, 2013 6:10 AM
To: Mikael Lepistö
Cc: Dennis Cote; cfe-dev at cs.uiuc.edu Developers
Subject: Re: [cfe-dev] building LLVM/Clang on Windows 7 x64 using MinGW/MSYS


3GB is too close for comfort for the 32 bit linker.

G M reports success with the 64 bit toolchain so maybe it's actually required with current versions.


Are you using the 32-bit toolchain or 64-bit toolchain of mingw-builds?





2013/10/10 Mikael Lepistö <mikael.lepisto at vincit.fi>



I also had some problems with building llvm+clang on MinGW 4.8.1 + MSYS. Another thing was that linker did require ~3GB memory to complete on x64.


Here in the readme I have listed steps and linked versions of MinGW and MSYS to use for being able to compile llvm + clang on Windows 7.




Good luck!


Best regards, Mikael Lepistö


On Thu, Oct 10, 2013 at 11:50 AM, Yaron Keren <yaron.keren at gmail.com> wrote:

	I'd try switching MingW distribution as it's very easy to do.

	If you're now using http://www.mingw.org/ try http://sourceforge.net/projects/mingwbuilds/ and vice verse. These are different distributions with different patches and different binaries. 

	For instance ld.exe in the former is 9MB and in the later 944K.





	cfe-dev mailing list
	cfe-dev at cs.uiuc.edu


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131010/13a967d9/attachment.html>

More information about the cfe-dev mailing list