Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 505908 - =sys-devel/llvm-3.4 - linux/perf_event.h' file not found (on prefix amd64)
Summary: =sys-devel/llvm-3.4 - linux/perf_event.h' file not found (on prefix amd64)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-26 23:02 UTC by Christoph Junghans (RETIRED)
Modified: 2014-04-14 21:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Junghans (RETIRED) gentoo-dev 2014-03-26 23:02:12 UTC
/panfs/scratch3/vol10/junghans/gentoo-prefix/var/tmp/portage/sys-devel/llvm-3.4/work/llvm-3.4-amd64/Release/bin/clang -fno-exceptions -fPIC -funwind-tables -I/panfs/scratch3/vol10/junghans/gentoo-prefix/var/tmp/portage/sys-devel/llvm-3.4/work/llvm-3.4/projects/compiler-rt/lib -I/panfs/scratch3/vol10/junghans/gentoo-prefix/var/tmp/portage/sys-devel/llvm-3.4/work/llvm-3.4/projects/compiler-rt/include -Wall -Werror -O3 -fomit-frame-pointer -m64 -fPIE -fno-builtin -gline-tables-only -fno-rtti -c -o /panfs/scratch3/vol10/junghans/gentoo-prefix/var/tmp/portage/sys-devel/llvm-3.4/work/llvm-3.4-amd64/tools/clang/runtime/compiler-rt/clang_linux/san-x86_64/x86_64/SubDir.lib__sanitizer_common/sanitizer_stacktrace.o /panfs/scratch3/vol10/junghans/gentoo-prefix/var/tmp/portage/sys-devel/llvm-3.4/work/llvm-3.4/projects/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc
/panfs/scratch3/vol10/junghans/gentoo-prefix/var/tmp/portage/sys-devel/llvm-3.4/work/llvm-3.4/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc:56:10: fatal error: 'linux/perf_event.h' file not found
#include <linux/perf_event.h>
         ^
1 error generated.
make[5]: *** [/panfs/scratch3/vol10/junghans/gentoo-prefix/var/tmp/portage/sys-devel/llvm-3.4/work/llvm-3.4-amd64/tools/clang/runtime/compiler-rt/clang_linux/san-x86_64/x86_64/SubDir.lib__sanitizer_common/sanitizer_platform_limits_linux.o] Error 1

Basically the linux headers of the host are used instead of the one from prefix.

Adding something like:
if use clang && use prefix; then
  sed -e '/^CFLAGS /s@$@'" -I${EPREFIX}/usr/include@" \
      -i 'projects/compiler-rt/make/platform/clang_linux.mk' || die
fi

to src_prepare should help. We could put that into a clang patch too and add clang_linux.mk to sub_files. Appending '-I${EPREFIX}/usr/include' to CPPFLAGS don't help as these flags are ignored when lib_sanitizer is build.
Comment 1 Christoph Junghans (RETIRED) gentoo-dev 2014-04-14 21:02:04 UTC
+  14 Apr 2014; Christoph Junghans <ottxor@gentoo.org> llvm-3.4-r2.ebuild,
+  llvm-9999.ebuild:
+  add prefix include path for kernel headers (bug #505908)
+