[LLVMdev] Cygwin binaries

Henrik Bach henrik_bach_llvm at hotmail.com
Thu May 12 15:00:27 PDT 2005


Hi Aaron,

Sorry for the delay. Please be aware, that these instructions has not been 
used lately. However, I'll try to follow up on your questions.

Here are my instructions to compile the cfe:

5. Configure, build, and install the C front-end:
a. Before configure: export CPPFLAGS="-D__MINGW32__ "
                                 ?export LDFLAGS=-Wl,-no-keep-memory"
                                   export CFEINSTALL=/C/LLVM/cfe

cd objdir
make distclean

If objdir != srcdir: Change all absolute paths given to source directory
relative by using --srcdir option for configure:

configure --prefix=$CFEINSTALL --disable-threads --disable-nls 
--disable-shared --enable-languages=c,c++ --program-prefix=llvm- 
--srcdir=../../../src/llvm-gcc-1/llvm-gcc --includedir=/C/MinGW mingw32

make CFLAGS=-O LIBCFLAGS+=-g LIBCFLAGS+=-O2 LIBCXXFLAGS+=-g LIBCXXFLAGS+=-O2 
LIBCXXFLAGS+=-fno-implicit-templates all

On error:
==============
The directory that should contain system headers does not exist:
   /usr/include
--------------
Open gcc/Makefile and set:
NATIVE_SYSTEM_HEADER_DIR=/C/MinGW/include
==============

On error:
==============
In file included from ../../../../src/llvm-gcc-1/llvm-gcc/gcc/libgcc2.c:40:
./tconfig.h:5:37: config/i386/xm-mingw32.h: No such file or directory
--------------
Create the missing link:
ln -s ../../../src/llvm-gcc-1/llvm-gcc/gcc/config gcc/config
==============

On error:
==============
In file included from ./tm.h:4,
                  from ../../../../src/llvm-gcc-1/llvm-gcc/gcc/libgcc2.c:43:
./config/i386/i386.h:37:22: llvm-out.h: No such file or directory
--------------
Copy missing header files:
cp C:/projects/src/llvm-gcc-1/llvm-gcc/gcc/*.h gcc
==============

On error:
==============
checking for sin in -lm... configure: error: Link tests are not allowed 
after
GCC_NO_EXECUTABLES.
--------------
Solution: The llvm tools cannot handle dos paths correctly.
==============

On error:
==============
getruntime.c:54:23: sys/times.h: No such file or directory
--------------
Either
Solution: Make it explict with #UNDEF HAVE_TIMES in 
$objdir\i686-pc-mingw32\libiberty\config.h, because it doesn't exist on 
MinGW.
or
Solution: Make it explict with #UNDEF HAVE_TIMES in 
$objdir\mingw32\libiberty\config.h, because it doesn't exist on MinGW.
==============

On error:
==============
lrealpath.c:110: error: `_PC_PATH_MAX' undeclared (first use in this 
function)
--------------
Solution: Add this after line 41: #define _PC_PATH_MAX PATH_MAX
==============

On error:
==============
stl_algo.h:1616: error: there are no arguments to `lrand48' that depend on a 
template parameter, so a declaration of `lrand48' must be available
stl_algo.h:1616: error: (if you use `-fpermissive', G++ will accept your 
code, but allowing the use of an undeclared name is deprecated)
--------------
Solution from Anton Korobeynikov:
Undefine HAVE_DRAND48 and _GLIBCXX_HAVE_DRAND48.
The first one in the libstdc++\config.h, (At me it the file: 
mingw32\libstdc++-v3\config.h)
and the second one in libstdc++\include\<target-triplet>\bits\c++config.h 
(At me it is the file: mingw32\libstdc++\include\mingw32\bits\c++config.h)
Please note, that second file has 2 defines and you must undefine both (At 
me it is both files).
==============

c. % gmake

e. % gmake all; gmake install


Henrik


=============================================================
Henrik Bach
LLVM Open Source Developer

e-mail: henrik_bach_llvm at hotmail.com
=============================================================
'Nothing is impossible; The impossible just takes longer time :)'
- Inventor of a new energy saver light bulp from Denmark.

No software patents - Thank you Poland: 
http://www.nosoftwarepatents.com/en/m/intro/app0411.html
Got Freedom?
Software Freedom Day - 28th of August
http://www.softwarefreedomday.org/
=============================================================




>From: "Aaron Gray" <angray at beeb.net>
>Reply-To: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu>
>To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
>Subject: Re: [LLVMdev] Cygwin binaries
>Date: Mon, 9 May 2005 16:07:51 +0100
>
>>>Does anyone know a source for a pre-built version of the same?
>>
>>To my knowledge there is no pre-built version of the cfe.
>
>See following link for CFE :-
>
>        http://illuvium.com/download/
>
>It maybe a bit out of date.
>
>I believe the CFE maybe broken at the moment, at least the Cygwin nightly 
>test reports that it is broken and I believe this is the same thing ?
>
>        http://illuvium.com/testresults/Cygwin/
>
>>However, if you like I can give you the build instructions. It isn't that 
>>daunting to build it, if you've the right setup ;)
>
>I would be very interested in proper build instructions for the CFE as I 
>have tried it twice, and failed. I built GCC 3.4.3 under cygwin and used 
>the correct version of binutils...but failed.
>
>Aaron
>
>
>_______________________________________________
>LLVM Developers mailing list
>LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev

_________________________________________________________________
Få alle de nye og sjove ikoner med MSN Messenger http://messenger.msn.dk/




More information about the llvm-dev mailing list