Skip to content

Instantly share code, notes, and snippets.

@zeta709
Last active December 21, 2015 12:49
Show Gist options
  • Save zeta709/ff64e4249c35fd678278 to your computer and use it in GitHub Desktop.
Save zeta709/ff64e4249c35fd678278 to your computer and use it in GitHub Desktop.
funtoo: Falied to emerge sys-devel/llvm-3.3-r1

문제: gcc-4.6.4를 쓰면 llvm을 emerge할 수 없다.

gcc-4.6.4.ebuild를 살펴보면 gcc-4.6.3.ebuild와 많이 다르다. 특히 "STDCXX_INCDIR" 등의 항목이 있는데, 확실한 것은 아니지만 이것 때문에 header file이 이상한 곳에 설치되는 것 같다. 로그를 보면 algorithm을 찾을 수 없다고 나오는데 다음과 같이 include path를 두 개 추가해서 컴파일하면 컴파일이 된다.

/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/Release/bin/clang -fno-exceptions -fPIC -funwind-tables -I/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/lib -I/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/include -Wall -Werror -O3 -fomit-frame-pointer -m64 -fPIE -fno-builtin -fno-rtti -c -o /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/tools/clang/runtime/compiler-rt/clang_linux/msan-x86_64/x86_64/SubDir.lib__msan/msan_linux.o /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/lib/msan/msan_linux.cc -I/usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.4/include/g++-v4.6 -I/usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.4/include/g++-v4.6/x86_64-pc-linux-gnu

해결 방법은 gcc-4.6.4대신 4.6.3이나 4.7.2, 4.8.0 등을 쓰는 것이다. 아니면 llvm.ebuild를 고치는 방법도 있을 것 같은데, 어떻게 고쳐야할 지 아직은 잘 모르겠다.

/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/Release/bin/clang -fno-exceptions -fPIC -funwind-tables -I/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/lib -I/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/include -Wall -Werror -O3 -fomit-frame-pointer -m64 -fPIE -fno-builtin -fno-rtti -c -o /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/tools/clang/runtime/compiler-rt/clang_linux/msan-x86_64/x86_64/SubDir.lib__msan/msan_linux.o /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/lib/msan/msan_linux.cc
/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/lib/msan/msan_linux.cc:20:10: fatal error: 'algorithm' file not found
#include <algorithm>
^
1 error generated.
clang_linux # /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/Release/bin/clang -fno-exceptions -fPIC -funwind-tables -I/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/lib -I/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/include -Wall -Werror -O3 -fomit-frame-pointer -m64 -fPIE -fno-builtin -fno-rtti -c -o /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/tools/clang/runtime/compiler-rt/clang_linux/msan-x86_64/x86_64/SubDir.lib__msan/msan_linux.o /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/lib/msan/msan_linux.cc -v
clang version 3.3 (tags/RELEASE_33/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
"/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/Release/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -main-file-name msan_linux.cc -mrelocation-model pic -pic-level 2 -pie-level 2 -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.22 -momit-leaf-frame-pointer -v -coverage-file /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/tools/clang/runtime/compiler-rt/clang_linux/msan-x86_64/x86_64/SubDir.lib__msan/msan_linux.o -resource-dir /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/Release/bin/../lib/clang/3.3 -I /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/lib -I /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/include -internal-isystem /usr/local/include -internal-isystem /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/Release/bin/../lib/clang/3.3/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Wall -Werror -fdeprecated-macro -fdebug-compilation-dir /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/tools/clang/runtime/compiler-rt/clang_linux -ferror-limit 19 -fmessage-length 168 -mstackrealign -fno-builtin -fno-rtti -fobjc-runtime=gcc -fobjc-default-synthesize-properties -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -o /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/tools/clang/runtime/compiler-rt/clang_linux/msan-x86_64/x86_64/SubDir.lib__msan/msan_linux.o -x c++ /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/lib/msan/msan_linux.cc
clang -cc1 version 3.3 based upon LLVM 3.3 default target x86_64-pc-linux-gnu
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/lib
/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/include
/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/Release/bin/../lib/clang/3.3/include
/usr/include
End of search list.
/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/lib/msan/msan_linux.cc:20:10: fatal error: 'algorithm' file not found
#include <algorithm>
^
1 error generated.
Portage 2.3.6-r5 (funtoo/1.0/linux-gnu/arch/x86-64bit, gcc-4.6.4, glibc-2.15-r4, 3.10.7-gentoo x86_64)
=================================================================
System Settings
=================================================================
System uname: Linux-3.10.7-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E7300_@_2.66GHz-with-gentoo-2.2.0
KiB Mem: 5083356 total, 1248508 free
KiB Swap: 976556 total, 975080 free
Timestamp of tree: Thu, 22 Aug 2013 05:15:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash: 4.2_p37
dev-java/java-config: 2.2.0-r1000
dev-lang/python: 2.7.5-r1000, 3.2.5-r1000, 3.3.2-r1000
dev-util/cmake: 2.8.11.1
sys-apps/baselayout: 2.2.0-r4
sys-apps/openrc: 0.10.3-r1
sys-apps/sandbox: 2.6-r1
sys-devel/autoconf: 2.13, 2.69
sys-devel/automake: 1.9.6-r3, 1.11.6, 1.12.6
sys-devel/binutils: 2.22-r1
sys-devel/gcc: 4.6.4
sys-devel/gcc-config: 1.8
sys-devel/libtool: 2.4.2
sys-devel/make: 3.82-r4
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc: 2.15-r4
* ERROR: sys-devel/llvm-3.3-r1 failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=sys-devel/llvm-3.3-r1'`,
* the complete build log and the output of `emerge -pqv '=sys-devel/llvm-3.3-r1'`.
* The complete build log is located at '/var/tmp/portage/sys-devel/llvm-3.3-r1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/llvm-3.3-r1/temp/environment'.
* Working directory: '/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64'
* S: '/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src'
>>> Failed to emerge sys-devel/llvm-3.3-r1, Log file:
>>> '/var/tmp/portage/sys-devel/llvm-3.3-r1/temp/build.log'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment