Build failure: on Linux /x86

I tried building LLVM with the downloaded sources. I am building it with gcc4.3.

After getting configured successfully, and running ‘make’, build fails with the following message:

make[1]: Entering directory /home/guest/SRC/llvm-2.1/lib/System' llvm[1]: Compiling DynamicLibrary.cpp for Release build DynamicLibrary.cpp: In static member function âstatic void* llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(const char*)â: DynamicLibrary.cpp:178: error: âstrcmpâ was not declared in this scope DynamicLibrary.cpp:179: error: âstrcmpâ was not declared in this scope DynamicLibrary.cpp:180: error: âstrcmpâ was not declared in this scope make[1]: *** [/home/guest/SRC/llvm-2.1/lib/System/Release/DynamicLibrary.o] Error 1 make[1]: Leaving directory /home/guest//SRC/llvm-2.1/lib/System’
make: *** [all] Error 1

Please let me know what may be the wrong here.


$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ./configure --prefix=/home/guest/gcc4.3.0/install_gcc_4.3.0 --with-mpfr=/home/guest/mpfr/install_mpfr
Thread model: posix
gcc version 4.3.0 (GCC)

$uname -a
Linux 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686 i386 GNU/Linux


make[1]: Entering directory `/home/guest/SRC/llvm-2.1/lib/System'

is this LLVM 2.1? Why not build the more recent 2.2?




I downloaded llvm2.2 and got over with previous issue. Now a new error is
being shown:

APInt.cpp:2017: instantiated from here
error: invalid use of incomplete type âstruct std::basic_ostream<char,
std::char_traits<char> >â

I don't think it is possible to build llvm 2.2 using gcc-4.3. Try using
gcc-4.2 or earlier. I'm told that LLVM from svn builds with gcc-4.3.

I hope this helps,


PS: Please continue on the mailing list rather than privately emailing me:
that way others with the same problem will be able to find the discussion
in the mailing list archive.