LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 17901 - compile fails with 'linux/perf_event.h' file not found
Summary: compile fails with 'linux/perf_event.h' file not found
Status: RESOLVED WONTFIX
Alias: None
Product: compiler-rt
Classification: Unclassified
Component: compiler-rt (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-12 18:54 PST by Greg Czajkowski
Modified: 2014-06-02 06:47 PDT (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Czajkowski 2013-11-12 18:54:52 PST
On SUSE10 without root access, the compile fails with

/path/llvm.194522/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc:39:10: fatal error:
      'linux/perf_event.h' file not found
#include <linux/perf_event.h>

Is there some special package that's needed to build clang?
Comment 1 Kostya Serebryany 2013-11-12 21:57:21 PST
This came up independently as http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59068
I afraid, SUSE 10 is a bit too old for us to support it properly in sanitizers.
The patches are welcome though.
Comment 2 Greg Czajkowski 2013-11-13 13:12:34 PST
I was only attempting to build clang on SUSE10 with these instructions

http://llvm.org/docs/GettingStarted.html#getting-started-quickly-a-summary

am I out of luck until SLES11 or is there still a way to build clang without compiler-rt?
Comment 3 Kostya Serebryany 2013-11-13 19:41:52 PST
(In reply to comment #2)
> am I out of luck until SLES11 or is there still a way to build clang without
> compiler-rt?

If you don't checkout compiler-rt the rest should just build.
Comment 4 Greg Czajkowski 2013-11-14 12:47:22 PST
You can close the bug. Removing compiler-rt and recompiling solved the problem. Thanks
Comment 5 Anonymous User 2014-06-02 06:47:45 PDT
I know this bug was marked as resolved some months ago. Although it's fine to state - "wontfix" in llvm/projects/compiler-rt/lib/sanitizer_common there should be a fix to configure.ac to show this problem before building for hours...

This seems like a quick and unproblematic fix to configure (I've tried to compile 3.4.1 release), please have a look at it.

Firefox has

configure:11673: checking for linux/perf_event.h
configure:11686: clang -c -O2 -pipe -fno-strict-aliasing -fno-strict-aliasing -ffunction-sections -fdata-sections  -Qunused-arguments -isystem/usr/local/include  -I/usr/local/include conftest.c 1>&5
configure:11680:10: fatal error: 'linux/perf_event.h' file not found
#include <linux/perf_event.h>
         ^
1 error generated.
configure: failed program was:
#line 11678 "configure"
#include "confdefs.h"

#include <linux/perf_event.h>
int main() {

; return 0; }