Trying to build llvm-gcc no x86_64 linux

Hello all,

I am trying to build the latest version of llvm-gcc on a x86_64 architecture running a Linux distribution. Using the READM.LLVM I have managed to run ./configure using appropriate options, but when I try to build using make, it shows the following error message after a few seconds:

…/…/llvm-gcc/gcc/gengtype-lex.l:31:27: fatal error: gengtype-yacc.h: No such file or directory.

This happens when trying to build gengtype-lex.c.

I could indeed not find the file gengtype-yacc.h in neither llvm-gcc nor llvm code base. Is there a dependency I am missing ? A problem with the configure flags I’ve used ?

Thank you very much in advance for your help !

Romain

You’ll need to install the dev packages for gcc 4.2.

Rajika

I need to add, also you’ll need bison+flex.

Rajika

Ok. Thank you for your input. New questions :slight_smile: :

  • Is the dev package basically the source code of gcc 4.2 ? Isn’t it already fully included in llvm-gcc code base ?
  • How should I include bison+flex when I have installed Do I need to put additional flags to configure script ?

Cheers,
Romain

Ok. Thank you for your input. New questions :slight_smile: :

  • Is the dev package basically the source code of gcc 4.2 ? Isn’t it already fully included in llvm-gcc code base ?

AFAIR, you need to have the set of headers, gcc-dev.( Some one else may provide you with this information)

  • How should I include bison+flex when I have installed Do I need to put additional flags to configure script ?

If you have those in PATH, that should be picked by the script.

Rajika

Thanks. It worked for a few more compilation lines.
I now get the following linker error:
undefined reference to llvm::MemoryBuffer::getNewMemBuffer(unsigned long, llvm::StringRef)

I am surprised since the linker compile line already links with a whole bunch of llvm libraries …

Thanks for your help
Romain

I got this one fixed by rebuilding llvm Debug (oups). I had an old version.
I now seem to have a classical message:
version GLIBCXX_3.4.14 not found.

I am indeed building llvm-gcc using gcc4.5. Is this the problem ? The fix to this problem indicated in README.LLVM does not help …

Thanks
Romain

I got this one fixed by rebuilding llvm Debug (oups). I had an old version.
I now seem to have a classical message:
version GLIBCXX_3.4.14 not found.

It seems that your system is missing the standard c++ library. You should be able to install the above with the package manager of your system.

Rajika