Skip to content

bpf: Fix space hack in Makefile #10173

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

Merged
merged 1 commit into from
Feb 13, 2020
Merged

bpf: Fix space hack in Makefile #10173

merged 1 commit into from
Feb 13, 2020

Conversation

brb
Copy link
Member

@brb brb commented Feb 13, 2020

Fix the space hack which stopped working with make v4.3 (works with v4.2 though):

[..]
" [-DENABLE_HOST_REDIRECT-DENABLE_IPV4-DENABLE_IPV6-DENABLE_NAT46]";
clang -DENABLE_HOST_REDIRECT-DENABLE_IPV4-DENABLE_IPV6-DENABLE_NAT46
-I/home/brb/sandbox/gopath/src/github.com/cilium/cilium/bpf/include
-I/home/brb/sandbox/gopath/src/github.com/cilium/cilium/bpf
-D__NR_CPUS__=8 -O2 -g -target bpf -emit-llvm -Wall -Werror
-Wno-address-of-packed-member -Wno-unknown-warning-option -c bpf_lxc.c
-o bpf_lxc.ll; llc -march=bpf -mcpu=probe -mattr=dwarfris -o /dev/null
bpf_lxc.ll;  \
fi
In file included from <built-in>:323:
<command line>:1:20: error: ISO C99 requires whitespace after the macro
name [-Werror,-Wc99-extensions]
#define ENABLE_IPV4-DHAVE_LPM_MAP_TYPE 1

This change is Reviewable

Fix the space hack which stopped working with make v4.3 (works with
v4.2 though):

    [..]
    " [-DENABLE_HOST_REDIRECT-DENABLE_IPV4-DENABLE_IPV6-DENABLE_NAT46]";
    clang -DENABLE_HOST_REDIRECT-DENABLE_IPV4-DENABLE_IPV6-DENABLE_NAT46
    -I/home/brb/sandbox/gopath/src/github.com/cilium/cilium/bpf/include
    -I/home/brb/sandbox/gopath/src/github.com/cilium/cilium/bpf
    -D__NR_CPUS__=8 -O2 -g -target bpf -emit-llvm -Wall -Werror
    -Wno-address-of-packed-member -Wno-unknown-warning-option -c bpf_lxc.c
    -o bpf_lxc.ll; llc -march=bpf -mcpu=probe -mattr=dwarfris -o /dev/null
    bpf_lxc.ll;  \
    fi
    In file included from <built-in>:323:
    <command line>:1:20: error: ISO C99 requires whitespace after the macro
    name [-Werror,-Wc99-extensions]
    #define ENABLE_IPV4-DHAVE_LPM_MAP_TYPE 1

Signed-off-by: Martynas Pumputis <m@lambda.lt>
@brb brb added pending-review area/misc Impacts miscellaneous areas of the code not otherwise owned by another area. release-note/misc This PR makes changes that have no direct user impact. labels Feb 13, 2020
@brb brb requested a review from a team as a code owner February 13, 2020 06:50
@brb
Copy link
Member Author

brb commented Feb 13, 2020

test-me-please

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 44.582% when pulling fda3160 on pr/brb/fix-bpf-makefile into c4b6095 on master.

@brb
Copy link
Member Author

brb commented Feb 13, 2020

CI provisioning failed. re-running.

@brb
Copy link
Member Author

brb commented Feb 13, 2020

test-me-please

@aanm aanm merged commit 4630078 into master Feb 13, 2020
@aanm aanm deleted the pr/brb/fix-bpf-makefile branch February 13, 2020 16:08
gandro added a commit to cilium/hubble that referenced this pull request Feb 17, 2020
GNU make v4.3 breaks trailing slashes. This inserts the trailing space
in the api/v1/Makefile by introduce an $space variable containing a
single space.

Without this fix, generating the gRPC API breaks with the following
error:

```console
$ make -C api/v1                                                                                                                                                                                                                          :(
[...]
google,Mprotobuf,Mduration.proto=github.com,Mgogo,Mprotobuf,Mtypes,M: No such file or directory
make: *** [Makefile:32: flow/flow.pb.go] Error 1
```

See also cilium/cilium#10173

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
gandro added a commit to cilium/hubble that referenced this pull request Feb 17, 2020
GNU make v4.3 breaks trailing slashes. This inserts the trailing space
in the api/v1/Makefile by introduce an $space variable containing a
single space.

Without this fix, generating the gRPC API breaks with the following
error:

```console
$ make -C api/v1
[...]
google,Mprotobuf,Mduration.proto=github.com,Mgogo,Mprotobuf,Mtypes,M: No such file or directory
make: *** [Makefile:32: flow/flow.pb.go] Error 1
```

See also cilium/cilium#10173

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
gandro added a commit to cilium/hubble that referenced this pull request Feb 17, 2020
GNU make v4.3 breaks trailing slashes. This inserts the trailing space
in the api/v1/Makefile by introduce an $space variable containing a
single space.

Without this fix, generating the gRPC API breaks with the following
error:

```console
$ make -C api/v1
[...]
google,Mprotobuf,Mduration.proto=github.com,Mgogo,Mprotobuf,Mtypes,M: No such file or directory
make: *** [Makefile:32: flow/flow.pb.go] Error 1
```

See also cilium/cilium#10173

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
michi-covalent pushed a commit to cilium/hubble that referenced this pull request Feb 17, 2020
GNU make v4.3 breaks trailing slashes. This inserts the trailing space
in the api/v1/Makefile by introduce an $space variable containing a
single space.

Without this fix, generating the gRPC API breaks with the following
error:

```console
$ make -C api/v1
[...]
google,Mprotobuf,Mduration.proto=github.com,Mgogo,Mprotobuf,Mtypes,M: No such file or directory
make: *** [Makefile:32: flow/flow.pb.go] Error 1
```

See also cilium/cilium#10173

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
This was referenced Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/misc Impacts miscellaneous areas of the code not otherwise owned by another area. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants