LLVM/CLANG를 다운로드하여 빌드하기 시작했습니다. 나는 처음에 gcc 버전 4.1.2 20080704 (Red Hat 4.1.2-48)를 설치했지만 LLVM 웹 사이트는 더 높은 버전을 사용하도록 명시했습니다. 그래서 나는 GCC gcc 버전 4.7.2 (GCC)를 다운로드하고 컴파일/빌드했다.GCC : 잘못된 헤더 버전을 가져옴
# setenv PATH /usr/local/lib:/usr/local/lib64:$PATH
# setenv LD_LIBRARY_PATH /usr/local/lib/:/usr/local/lib64/
# setenv CC /usr/local/bin/gcc
참고이 GCC 4.1.2 내가으로/usr/local/bin에 그것을 발견 4.7.2의 상태는/usr/빈은 경로 : 지금은 아래의 설정을 설정 한 후 LLVM을 구축하기 시작
In file included from /x/home/satprasad/llvm/llvm-3.1.src/projects/compiler-rt/lib/asan/asan_posix.cc:35:
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/algorithm:64:
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_algobase.h:69:
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/iosfwd:45:
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/c++io.h:38:
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr.h:132:
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:100:1: error: weakref declaration must have
internal linkage
__gthrw(pthread_once)
하지만 4.7.2 버전되지 4.1.2 것들에 대한 파일/헤더를 선택해야합니다 - 당신은 내가이 문제를 해결하는 방법을 알려 주시기 바랍니다 수 있습니다 - 라인을 기본적
그러나 LLVM 빌드 진술 실패 오류가 파일/코드 아래에 있습니다.
미리개llvm-3.1.src/projects/compiler-rt/lib/asan/asan_posix.cc
#include <algorithm>
덕분에
CentOS에서 문제가 있습니다. 정확히 같은 증상은 아니지만 gcc 4.7.2를 사용하십시오. 포기하고 대신 rpm을 다운로드하고 잘 작동합니다. – cdarke