[LLVMdev] llvm configuration error
Eli Friedman
eli.friedman at gmail.com
Mon Oct 31 18:13:29 PDT 2011
On Mon, Oct 31, 2011 at 5:35 PM, Bo Wu <wubousc at gmail.com> wrote:
> The problem was solved by setting environment variable CXX. But somehow a
> new one came. The gcc is installed in /usr/local/gcc-4.2.3. I managed to
> change
> clang/lib/Frontend/InitHeaderSearch.cpp
> clang/lib/Driver/ToolChains.cpp
> to force clang use the crt lib for that version. For details, plz
> see http://www.advogato.org/person/redi/diary/228.html.
> So now I have no problem of using clang to compile a trivial C program of 20
> lines. When I tried to compile programs of spec2006, such as bzip2 or mcf,
> the following erros showed up.
> clang spec.o blocksort.o bzip2.o bzlib.o compress.o crctable.o
> decompress.o huffman.o randtable.o -o bzip2
> blocksort.o: In function `gnu_dev_major':
> /usr/include/sys/sysmacros.h:44: multiple definition of `gnu_dev_major'
> spec.o:/usr/include/sys/sysmacros.h:44: first defined here
> blocksort.o: In function `gnu_dev_makedev':
> /usr/include/sys/sysmacros.h:56: multiple definition of `gnu_dev_makedev'
> spec.o:/usr/include/sys/sysmacros.h:56: first defined here
> blocksort.o: In function `gnu_dev_minor':
> /usr/include/sys/sysmacros.h:50: multiple definition of `gnu_dev_minor'
> spec.o:/usr/include/sys/sysmacros.h:50: first defined here
> bzip2.o: In function `gnu_dev_major':
> /usr/include/sys/sysmacros.h:44: multiple definition of `gnu_dev_major'
> spec.o:/usr/include/sys/sysmacros.h:44: first defined here
> bzip2.o: In function `gnu_dev_makedev':
Your headers are outdated/wrong; as a workaround, you can specify
-std=gnu89 to clang. http://llvm.org/bugs/show_bug.cgi?id=5960 tracks
this issue.
-Eli
More information about the llvm-dev
mailing list