Compile error with unsigned integers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear all,

We are trying to compile the xdp programs in the /tests folder of p4c-xdp. On compiling from .c to .o using clang:
clang -O2 -S -Wall -target bpf -c xdp1-mod.c -o xdp1-mod.o

the following errors are reported:

In file included from xdp1-mod.c:3:
./xdp1-mod.h:16:5: error: unknown type name 'u32'
    u32 input_port; /* bit<32> */
    ^
./xdp1-mod.h:21:5: error: unknown type name 'u32'
    u32 output_port; /* bit<32> */
    ^
./xdp1-mod.h:25:5: error: unknown type name 'u64'
    u64 destination; /* bit<48> */
    ^
./xdp1-mod.h:26:5: error: unknown type name 'u64'
    u64 source; /* bit<48> */
    ^
./xdp1-mod.h:27:5: error: unknown type name 'u16'
    u16 etherType; /* bit<16> */
    ^
It reports 20 such errors and exits. We weren't getting such errors before when we successfully compiled and ran the test programs and even some programs that we had written. After browsing for this error, we tried including <stdint.h> and <linux/types.h>, but the error persists.

The libstdc++ version is 7.2.0, llvm version is 6.0.0svn. Please guide us how we may resolve this issue. We are utmost grateful for your help and time.

Awaiting your response,
Sincerely,



[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux