Donald Becker wrote:

> On Mon, 21 May 2001, David Rankin wrote:
>
> > I need serious help! I can't compile the tulip.c driver I obtained from
> > scyld.com. (I must be a complete idiot) I am not too familiar with gcc,
> > so I think my problem may be not having the -I[location] information
> > right or possibly a problem with header version conflicts.
>
> Find where your kernel include files are kept.
> Perhaps /usr/src/linux-2.2.17/include/
> Then add  -I/usr/src/linux-2.2.17/include/  to the compile line.
>
> > Fresh Install - Linux Mandrake 7.2 (odessy) Stock distro 2.2.17 kernel
> > Linksys NC100 "network anywhere" 10/100 NIC Ver. 2
>
> FYI, this uses a ADMtek Comet/Centaur-P chip.
>

I guess this means the NIC will work if I can ever get the driver to compile ;
)

>
> The instruction on compiling the RPM should work.
>   http://www.scyld.com/network/updates.html
>
> > In file included from /usr/include/linux/string.h:37,
> >                  from tulip.c:143:
> > /usr/include/asm/string.h:46: parse error before `size_t'
>
> Hmmm, I can't guess what the problem is here.  The "size_t" type should
> be defined in linux/types.h.  The only obvious thing that could go wrong
> is if some fool defined  __KERNEL_STRICT_NAMES, which breaks a lot of
> things.
>
> > /usr/include/asm/string.h: In function `strncpy':
> > /usr/include/asm/string.h:47: number of arguments doesn't match
> > prototype
>
> This is a bogus warning.  It and the following errors means that size_t
> and clock_t are not defined.  They should be defined in <linux/types.h>.
> This is not a driver error, but a problem somewhere in the include or
> configuration files.
>

Don, I still can't get it to compile, but I at least know where the compile is
blowing up. Line 143 is the simple include statement # include
<linux/string.h>. I did a simple test with an empty file and just started
adding include statements and compiling to find out where the problem is.
<linux/config.h>, <linux/version.h>, etc.. all work without any problem. I can
do a simple # include <string.h> and that works. But when I try
<linux/string.h> all hell brakes loose. The following is the error stream that
is produced by tring to include <linux/string.h>. I would think that if the
kernel include file path was the problem, the compile would complain about
<linux/module.h>, <linux/config.h> etc.

Here is my test file:

# include <linux/config.h>
snip <module, version, modversion, etc..>
# include <linux/string.h>                            /* (line 7)*/

Here is the output:

[root@localhost tulip]# gcc -c test.c
In file included from /usr/include/linux/string.h:37,
                 from test.c:7:
/usr/include/asm/string.h:46: parse error before `size_t'
/usr/include/asm/string.h: In function `strncpy':
/usr/include/asm/string.h:47: number of arguments doesn't match prototype
/usr/include/linux/string.h:13: prototype declaration
/usr/include/asm/string.h:61: `src' undeclared (first use in this function)
/usr/include/asm/string.h:61: (Each undeclared identifier is reported only
once
/usr/include/asm/string.h:61: for each function it appears in.)
/usr/include/asm/string.h:61: `dest' undeclared (first use in this function)
/usr/include/asm/string.h:61: `count' undeclared (first use in this function)
/usr/include/asm/string.h: At top level:
/usr/include/asm/string.h:84: parse error before `size_t'
/usr/include/asm/string.h: In function `strncat':
/usr/include/asm/string.h:85: number of arguments doesn't match prototype
/usr/include/linux/string.h:15: prototype declaration
/usr/include/asm/string.h:102: `src' undeclared (first use in this function)
/usr/include/asm/string.h:102: `dest' undeclared (first use in this function)
/usr/include/asm/string.h:102: `count' undeclared (first use in this function)

/usr/include/asm/string.h: At top level:
/usr/include/asm/string.h:130: parse error before `size_t'
/usr/include/asm/string.h: In function `strncmp':
/usr/include/asm/string.h:131: number of arguments doesn't match prototype
/usr/include/linux/string.h:25: prototype declaration
/usr/include/asm/string.h:149: `cs' undeclared (first use in this function)
/usr/include/asm/string.h:149: `ct' undeclared (first use in this function)
/usr/include/asm/string.h:149: `count' undeclared (first use in this function)

/usr/include/asm/string.h: At top level:

I agree with you, it certainly doesn't look like linux/types.h and its
typedefs are getting pulled in. Any thoughts on what I should check or what I
can do to fix it?


--
David Rankin
Nacogdoches, Texas



Reply via email to