[netperf-talk] Errors compiling netperf on Opteron running Fedora-9
Rahul Nabar
rpnabar at gmail.com
Mon Sep 8 18:04:34 PDT 2008
On Mon, Sep 8, 2008 at 7:51 PM, Rick Jones <rick.jones2 at hp.com> wrote:
> same error, new line number. perhaps I cannot use ifndef afterall? (just to
> be sure, if you added that by hand you did do two underscores right?
>
> #ifndef __u64
Yup. First ifndef has two underscores. Second has none.
> Which distro are you using?
Fedora. fc9. 2.6.25-14.fc9.x86_64 #1 SMP
>
> So, how about trying this diff against the original top of trunk bits. It
> will have an include of linux/types.h before the #ifndef test:
So, to confirm what you asked me to do:
I added a single line:
#include <linux/types.h>
Now the corresponding snippet looks like this:
*****************************
#include <sys/types.h>
#include <string.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <net/if.h>
#include <linux/types.h>
#include <linux/sockios.h>
/* alas, direct inclusion of ethtool.h depends on some types not
normally found in nature, which we must provide or things will be
quite unhappy. */
#ifndef __u64
typedef __uint64_t __u64;
typedef __uint32_t __u32;
typedef __uint16_t __u16;
typedef __uint8_t __u8;
#endif
#ifndef u64
/* older ones want them without the leading underscores */
typedef __uint64_t u64;
typedef __uint32_t u32;
typedef __uint16_t u16;
typedef __uint8_t u8;
#endif
#include <linux/ethtool.h>
******************************
Still no luck. I reproduce the error msg. below:
***************************
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT netdrv_ethtool.o
-MD -MP -MF ".deps/netdrv_ethtool.Tpo" \
-c -o netdrv_ethtool.o `test -f 'netdrv_ethtool.c' || echo
'./'`netdrv_ethtool.c; \
then mv -f ".deps/netdrv_ethtool.Tpo" ".deps/netdrv_ethtool.Po"; \
else rm -f ".deps/netdrv_ethtool.Tpo"; exit 1; \
fi
netdrv_ethtool.c:20: error: conflicting types for '__u64'
/usr/include/asm/types.h:29: error: previous declaration of '__u64' was here
make[3]: *** [netdrv_ethtool.o] Error 1
***************************
Just keep throwing the suggestions at me! I want to get this working! :)
More information about the netperf-talk
mailing list