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

complie error: /usr/include/bpf/bpf_helpers.h:74:2: error: '#' is not followed by a macro parameter #43

Closed
nlgwcy opened this issue Nov 18, 2023 · 0 comments · Fixed by #44
Assignees

Comments

@nlgwcy
Copy link
Contributor

nlgwcy commented Nov 18, 2023

  1. env:
    [root@localhost kmesh]# uname -r
    5.10.0-60.18.0.50.oe2203.x86_64
    [root@localhost kmesh]# yum info libbpf
    Last metadata expiration check: 22:58:20 ago on Fri 17 Nov 2023 11:45:50 AM CST.
    Installed Packages
    Name : libbpf
    Epoch : 2
    Version : 0.3
    Release : 1.h0.oe2203
    Architecture : x86_64
    Size : 239 k
    Source : libbpf-0.3-1.h0.oe2203.src.rpm
    Repository : @System
    From repo : everything
    Summary : Libbpf library
    URL : https://github.com/libbpf/libbpf
    License : LGPLv2 or BSD
    Description : A mirror of bpf-next linux tree bpf-next/tools/lib/bpf directory plus its
    : supporting header files. The version of the package reflects the version of
    : ABI.

[root@localhost kmesh]#

  1. compile failed: complie error: /usr/include/bpf/bpf_helpers.h:74:2: error: '#' is not followed by a macro parameter
    [root@localhost kmesh]# ./build.sh
    ......
    In file included from ../../include/common.h:28:
    /usr/include/bpf/bpf_helpers.h:74:2: error: '#' is not followed by a macro parameter
    #if GNUC && !clang
    ^
    /usr/include/bpf/bpf_helpers.h:76:2: error: #else after #else
    #else
    ^
    /usr/include/bpf/bpf_helpers.h:80:2: error: #else after #else

  2. After the preceding error is temporarily avoided, the following error message is displayed when the compilation continues:
    /home/wcy/code/kmesh/oncn-mda/ebpf_src/sock_redirect.c:23:31: error: use of undeclared identifier 'NULL'
    struct sock_key *redir_key = NULL;
    It looks like some basic header files are not included. pls check it, thanks.

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 a pull request may close this issue.

2 participants