Duncan Sands wrote:> Hi Andre, > > >> I'm trying to build LLVM-gcc to compile Ada. >> > > excellent! > > But I'm having a few problems. > > Oops :( > > >> Now when I ran make I get an error that for me it seams very weird. >> >> ../../gcc/c-format.c: In function 'set_Wformat': >> ../../gcc/c-format.c:48: error: 'warn_format_security' undeclared (first >> use in this function) >> ../../gcc/c-format.c:48: error: (Each undeclared identifier is reported >> only once >> ../../gcc/c-format.c:48: error: for each function it appears in.) >> ../../gcc/c-format.c: In function 'check_format_info': >> ../../gcc/c-format.c:1304: error: 'warn_format_security' undeclared >> (first use in this function) >> make[2]: *** [c-format.o] Error 1 >> make[2]: Leaving directory `/home/andrelct/apps/llvm-gcc/build/gcc' >> make[1]: *** [all-gcc] Error 2 >> make[1]: Leaving directory `/home/andrelct/apps/llvm-gcc/build' >> make: *** [all] Error 2 >> > > Looks like you forgot to specify --enable-llvm when configuring > llvm-gcc. > > Ciao, > > Duncan. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >Hello Duncan, I put enable-llvm this time, but got another error. In file included from ../../gcc/llvm-backend.cpp:23: ../../gcc/llvm-internal.h:31: fatal error: vector: No such file or directory compilation terminated. make[2]: *** [llvm-backend.o] Error 1 make[2]: Leaving directory `/home/andrelct/apps/llvm-gcc/build/gcc' make[1]: *** [all-gcc] Error 2 make[1]: Leaving directory `/home/andrelct/apps/llvm-gcc/build' make: *** [all] Error 2 Do you have an idea of what it is? My new config is ../configure --enable-languages=c,c++,fortran,ada --disable-bootstrap --disable-nls --disable-multilib --enable-checking --program-prefix=llvm- --prefix=/home/andrelct/apps/llvm-gcc/build/ --bindir=/home/andrelct/apps/gnat-2007/build/bin --enable-llvm=/home/andrelct/apps/llvm Thanks -- Andre Tavares Master Student in Computer Science - UFMG - Brasil http://dcc.ufmg.br/~andrelct
Hi Andre,> In file included from ../../gcc/llvm-backend.cpp:23: > ../../gcc/llvm-internal.h:31: fatal error: vector: No such file or directory > compilation terminated.line 31 of llvm-internal.h is: #include <vector> so if that's failing then your C++ compiler is somehow borked. How did you arrange to use the right gcc for the build? Maybe that's getting in the way of g++ somehow.> Do you have an idea of what it is?I suggest you do like this: make sure the system C++ compiler is working and in your path. To use the Ada enabled gcc for building do: export PATH=/home/andrelct/apps/gnat-2007/bin:$PATH before configuring, building etc. (Assuming this is where the GNAT GPL 2007 gcc is).> My new config is > ../configure --enable-languages=c,c++,fortran,ada --disable-bootstrap > --disable-nls --disable-multilib --enable-checking > --program-prefix=llvm- --prefix=/home/andrelct/apps/llvm-gcc/build/ > --bindir=/home/andrelct/apps/gnat-2007/build/binNot sure why you are using --bindir here?> --enable-llvm=/home/andrelct/apps/llvmCiao, Duncan.
Duncan Sands wrote:> Hi Andre, > > >> In file included from ../../gcc/llvm-backend.cpp:23: >> ../../gcc/llvm-internal.h:31: fatal error: vector: No such file or directory >> compilation terminated. >> > > line 31 of llvm-internal.h is: > > #include <vector> > > so if that's failing then your C++ compiler is somehow borked. > How did you arrange to use the right gcc for the build? Maybe > that's getting in the way of g++ somehow. > > >> Do you have an idea of what it is? >> > > I suggest you do like this: make sure the system C++ compiler is working > and in your path. To use the Ada enabled gcc for building do: > export PATH=/home/andrelct/apps/gnat-2007/bin:$PATH > before configuring, building etc. (Assuming this is where the GNAT > GPL 2007 gcc is). > > >> My new config is >> ../configure --enable-languages=c,c++,fortran,ada --disable-bootstrap >> --disable-nls --disable-multilib --enable-checking >> --program-prefix=llvm- --prefix=/home/andrelct/apps/llvm-gcc/build/ >> --bindir=/home/andrelct/apps/gnat-2007/build/bin >> > > Not sure why you are using --bindir here? > > >> --enable-llvm=/home/andrelct/apps/llvm >> > > Ciao, > > Duncan. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >Hey Duncan, my g++ is broken, but I used g++-4.3 and it worked. Unfortunately there is another problem. If I compile with llvm-gcc the ali file resulting says V "GNAT Lib v4.2" on the first line. So it compiled version 4.2 and so gnatbind and gnatlink does not work because they are version 4.1.3. If I compile the same program using gcc of the gnat2007, the ali file says that the version is 4.1.3, the right one. Somehow the lib version that llvm-gcc is being compiled is 4.2. Do you know how to get the 4.1.3 version? Thanks -- Andre Tavares Master Student in Computer Science - UFMG - Brasil http://dcc.ufmg.br/~andrelct