Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build-dynamic and build-static make goals #241

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

bobrik
Copy link
Contributor

@bobrik bobrik commented Jul 26, 2023

A dynamic build might be useful if there are no static archives present for depenencies like libbpf and libelf.

ivan@vm:~/projects/ebpf_exporter$ make build-static
...
ivan@vm:~/projects/ebpf_exporter$ ldd ebpf_exporter
    not a dynamic executable
ivan@vm:~/projects/ebpf_exporter$ make build-dynamic
...
ivan@vm:~/projects/ebpf_exporter$ ldd ebpf_exporter
    linux-vdso.so.1 (0x0000007f85ee5000)
    libbpf.so.1 => /lib/aarch64-linux-gnu/libbpf.so.1 (0x0000007f85e30000)
    libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f85c80000)
    libelf.so.1 => /lib/aarch64-linux-gnu/libelf.so.1 (0x0000007f85c40000)
    libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000007f85c00000)
    /lib/ld-linux-aarch64.so.1 (0x0000007f85ea8000)

A dynamic build might be useful if there are no static archives present
for depenencies like libbpf and libelf.

```
ivan@vm:~/projects/ebpf_exporter$ make build-static
...
ivan@vm:~/projects/ebpf_exporter$ ldd ebpf_exporter
    not a dynamic executable
```

```
ivan@vm:~/projects/ebpf_exporter$ make build-dynamic
...
ivan@vm:~/projects/ebpf_exporter$ ldd ebpf_exporter
    linux-vdso.so.1 (0x0000007f85ee5000)
    libbpf.so.1 => /lib/aarch64-linux-gnu/libbpf.so.1 (0x0000007f85e30000)
    libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f85c80000)
    libelf.so.1 => /lib/aarch64-linux-gnu/libelf.so.1 (0x0000007f85c40000)
    libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000007f85c00000)
    /lib/ld-linux-aarch64.so.1 (0x0000007f85ea8000)
```
@bobrik bobrik merged commit d53fe96 into cloudflare:master Jul 26, 2023
@bobrik bobrik deleted the ivan/build-dynamic branch July 26, 2023 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant