DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavel Odintsov <pavel.odintsov@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] Issues with rte_hash_crc.h when compiling with C++
Date: Wed, 29 Apr 2015 15:17:07 +0300	[thread overview]
Message-ID: <CALgsdbe0uTj9CR5fjw6HXpD5fx1Vn7fuD_W5zZyoX_+wdPmNiw@mail.gmail.com> (raw)

Hello!

I have C++ application compiles and works nice. But when I include
rte_hash_crc.h header everything goes away.

  CC main.o
In file included from
/usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_cpuflags.h:46:0,
                 from
/usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_hash_crc.h:48,
                 from /root/interceptor/main.cpp:25:
/usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/generic/rte_cpuflags.h:50:6:
error: use of enum ‘rte_cpu_flag_t’ without previous declaration
 enum rte_cpu_flag_t;
      ^
/usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/generic/rte_cpuflags.h:55:6:
error: use of enum ‘cpu_register_t’ without previous declaration
 enum cpu_register_t;
      ^
/usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/generic/rte_cpuflags.h:79:35:
error: uninitialized const ‘cpu_feature_table’ [-fpermissive]
 static const struct feature_entry cpu_feature_table[];
                                   ^
/usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/generic/rte_cpuflags.h:64:8:
note: ‘const struct feature_entry’ has no user-provided default
constructor
 struct feature_entry {
        ^
/usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/generic/rte_cpuflags.h:65:11:
note: and the implicitly-defined constructor does not initialize
‘uint32_t feature_entry::leaf’
  uint32_t leaf;    /**< cpuid leaf */
           ^
/usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/generic/rte_cpuflags.h:79:53:
error: storage size of ‘cpu_feature_table’ isn’t known
 static const struct feature_entry cpu_feature_table[];
                                                     ^
/usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/generic/rte_cpuflags.h:101:31:
error: use of enum ‘rte_cpu_flag_t’ without previous declaration
 rte_cpu_get_flag_enabled(enum rte_cpu_flag_t feature);
                               ^
In file included from
/usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_hash_crc.h:48:0,
                 from /root/interceptor/main.cpp:25:
/usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_cpuflags.h:
In function ‘int rte_cpu_get_flag_enabled(rte_cpu_flag_t)’:
/usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_cpuflags.h:278:53:
error: conflicting declaration of C function ‘int
rte_cpu_get_flag_enabled(rte_cpu_flag_t)’
 rte_cpu_get_flag_enabled(enum rte_cpu_flag_t feature)
                                                     ^
In file included from
/usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_cpuflags.h:46:0,
                 from
/usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/rte_hash_crc.h:48,
                 from /root/interceptor/main.cpp:25:
/usr/src/dpdk-2.0.0/x86_64-native-linuxapp-gcc/include/generic/rte_cpuflags.h:101:1:
note: previous declaration ‘int rte_cpu_get_flag_enabled(int)’
 rte_cpu_get_flag_enabled(enum rte_cpu_flag_t feature);
 ^
/usr/src/dpdk-2.0.0/mk/internal/rte.compile-pre.mk:145: recipe for
target 'main.o' failed
make[1]: *** [main.o] Error 1
/usr/src/dpdk-2.0.0/mk/rte.extapp.mk:42: recipe for target 'all' failed
make: *** [all] Error 2

I prepared my environment with this manual:
http://www.stableit.ru/2015/04/how-to-code-for-dpdk-with-c.html

Could anybody help me with this header file and C++?

-- 
Sincerely yours, Pavel Odintsov

             reply	other threads:[~2015-04-29 12:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-29 12:17 Pavel Odintsov [this message]
2015-05-05  7:57 ` Pavel Odintsov
2015-05-05  8:08   ` Pavel Odintsov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALgsdbe0uTj9CR5fjw6HXpD5fx1Vn7fuD_W5zZyoX_+wdPmNiw@mail.gmail.com \
    --to=pavel.odintsov@gmail.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).