iovisor / iovisor/bcc

Compile bpf module without relying on the current working directory of the process

Open
#2,896 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

Is it possible to compile a bpf module without relying on the current working directory of the process? I notice a comment [here](https://github.com/iovisor/bcc/blob/master/src/cc/frontends/clang/loader.cc#L161) stating that clang requires us to be inside the kernel source directory but is it possible to influence this and do a build without relying on relative paths (ie. without using chdir)?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at src/cc/frontends/clang/loader.cc, especially the comment around line 161, and trace how the BPF module compilation invokes clang and depends on the process working directory. Determine whether the relative-path requirement can be removed without chdir; done means documenting the constraint or defining and implementing a supported alternative, with validation identified from the surrounding code.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
compilers, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.