Rick
Dan Wilder wrote:
Warning: this post gets a bit involved. You most likely are not
interested in reading it unless you are:-- A pretty good C programmer, and
-- Interested in the missing __u32 problem.
My hope is that people who satisfy both of the above, and who are
having the __u32 problem themselves, in the 2.0.xx or in the
2.2.x kernel, will read and understand this, and (correctly)
point out where and why I'm wrong, or otherwise add something to
the picture.The missing __u32 has been a recurring problem with ppp-2.3.5 under
the 2.0.xx kernels, as well as in the 2.2, as in the post quoted
below.I'll write here of what little I know of the problem in 2.0.xx, as
I've not yet tried to build the 2.2.0 or 2.2.1 kernels. With some
luck, it will be the same problem in 2.2.x.I'm very puzzled, mostly because I've never encountered the
problem. My luck is usually nowhere near so good. Many others
have encountered the difficulty, and there is even something
about it, in the ppp hints archive underhttp://www.tartu.customs.ee/valentin.shtml
Others have advised just tossing in an __u32 someplace, but
somehow that doesn't ring true. You shouldn't have to;
it should be already there. If it isn't, I suspect something
else is broken.In linux/include/asm/types.h you should find:
typedef unsigned int __u32;
and one way or another, this types.h file should be getting included
in your pppd compile. At least, it is in mine. At a guess, I'd
say through the link which _should_ be there, in /usr/include:klister:52:/usr/include: file asm
asm: symbolic link to ../src/linux/include/asm-i386which should be the same as the link in /usr/src/linux/include:
klister:55:/usr/src/linux/include: file asm
asm: symbolic link to asm-i386Let's check. In /usr/src/ppp-2.3.5/pppd (command line wrapped
for the sake of the e-mail):klister:69:/usr/src/ppp-2.3.5/pppd: cc -O2 -pipe -Wall -g -D_linux_=1
-DHAVE_PATHS_H -DIPX_CHANGE -I../include -DCHAPMS=1 -DUSE_CRYPT=1
-DHAVE_CRYPT_H=1 -DHAS_SHADOW -c sys-linux.c -o sys-linux.o
klister:70:/usr/src/ppp-2.3.5/pppd:No errors. Now, I'll temporarily plant a bomb in my asm/types.h
file, to see how it got there (there's probably an easier way
to ask the compiler that, but I haven't the patience):in /usr/src/linux/include/asm/types.h, my bomb:
#ifndef _I386_TYPES_H
#define _I386_TYPES_HBOMB
[ ... ]
And then:
klister:45:/usr/src/ppp-2.3.5/pppd: cc -O2 -pipe -Wall -g -D_linux_=1
-DHAVE_PATHS_H -DIPX_CHANGE -I../include -DCHAPMS=1 -DUSE_CRYPT=1
-DHAVE_CRYPT_H=1 -DHAS_SHADOW -c sys-linux.c -o sys-linux.o
In file included from /usr/include/linux/types.h:17,
from /usr/include/sys/types.h:4,
from /usr/include/termios.h:27,
from /usr/include/sys/ioctl.h:6,
from sys-linux.c:21:
/usr/include/asm/types.h:6: syntax error before `typedef'Yup, it tripped the BOMB. Tracing the include path as
shown in the error message, I see:sys-linux.c:21 #include <sys/ioctl.h>
/usr/include/sys/ioctl.h:6 #include <termios.h>
/usr/include/termios.h:27 #include <sys/types.h>
/usr/include/sys/types.h:4 #include <linux/types.h>
/usr/include/linux/types.h:17 #include <asm/types.h>And that nets us /usr/include/asm/types.h which includes,
at the moment, both the missing declaration and my BOMB.It is a convoluted path. It could break down on unexpected
stuff in any of those several include files.The most obvious vulnerability appears to lie in the link
(or links) to the linux/include/asm-i386/ directory.These may be set into place correctly (I'm not sure) by the
first "make config" in your /usr/src/linux source tree;
however, I see in /usr/src/linux/README some warnings:- make sure your /usr/include/asm, /usr/include/linux, and
/usr/include/scsi directories are just symlinks to the kernel
sources:cd /usr/include
rm -rf asm linux scsi
ln -s /usr/src/linux/include/asm-i386 asm
ln -s /usr/src/linux/include/linux linux
ln -s /usr/src/linux/include/scsi scsiSo these the questions I'd like to ask somebody who is having the
problem, in the 2.0 kernels, and who is still reading:-- Are your symlinks, as prescribed here, all correct?
-- If not, and if you correct them, can you now build pppd?
For the 2.2 kernels, I'd like to know
-- Is there a comparable README?
-- Does it describe similar symlinks?
-- Are the symlinks described present on your system?
-- If not, and if you make them, does pppd build now?
Finally, if this doesn't fix the problem, and if you are up
to building with the gcc "-E" option and taking a look at
the output,-- Where is your compiler finding the ringer for <asm/types.h>
which doesn't supply the neede __u32 typedef?On Sat, Jan 30, 1999 at 11:55:26PM -0500, John LeMay wrote:
> I seem to be having some problems getting ppp 2.3.5 compiled on my
> RedHat 5.1 Linux 2.2.0 box. I get through the ./configure, make kernel,
> I get the new kernel completed and installed, but when I attempt a
> "make" from the ppp-2.3.5 source directory I get "stuff" like:
>
> make[1]: Entering directory `/usr/local/src/ppp-2.3.5/pppd'
> cc -O2 -pipe -Wall -g -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE
> -I../include -DCHAPMS=1 -DUSE_CRYPT=1 -DHAVE_CRYPT_H=1 -DHAS_SHADOW -c
> sys-linux.c -o sys-linux.o
> In file included from sys-linux.c:68:
> ../include/linux/ppp_defs.h:97: parse error before `ext_accm'
> ../include/linux/ppp_defs.h:97: warning: data definition has no type or
> storage class
> ../include/linux/ppp_defs.h:113: parse error before `__u32'
> ../include/linux/ppp_defs.h:113: warning: no semicolon at end of struct
> or union
> ../include/linux/ppp_defs.h:115: warning: data definition has no type or
> storage
>
>
> This continues for a while then I get:
>
> ../include/linux/ppp_defs.h:149: warning: data definition has no type or
> storage class
> ../include/linux/ppp_defs.h:152: parse error before `}'
> ../include/linux/ppp_defs.h:155: field `p' has incomplete type
> ../include/linux/ppp_defs.h:156: field `vj' has incomplete type
> ../include/linux/ppp_defs.h:160: field `c' has incomplete type
> ../include/linux/ppp_defs.h:161: field `d' has incomplete type
> In file included from sys-linux.c:69:
> ../include/linux/if_ppp.h:92: parse error before `__u8'
> ../include/linux/if_ppp.h:92: warning: no semicolon at end of struct or
> union
> ../include/linux/if_ppp.h:93: warning: data definition has no type or
> storage class
> ../include/linux/if_ppp.h:95: parse error before `}'
> In file included from sys-linux.c:71:
> pppd.h:266: parse error before `ext_accm'
> sys-linux.c:983: parse error before `ext_accm'
> sys-linux.c: In function `ppp_set_xaccm':
> sys-linux.c:988: `accm' undeclared (first use this function)
> sys-linux.c:988: (Each undeclared identifier is reported only once
> sys-linux.c:988: for each function it appears in.)
> sys-linux.c: In function `ccp_test':
> sys-linux.c:1047: storage size of `data' isn't known
> sys-linux.c:1054: sizeof applied to an incomplete type
> sys-linux.c:1047: warning: unused variable `data'
> make[1]: *** [sys-linux.o] Error 1
> make[1]: Leaving directory `/usr/local/src/ppp-2.3.5/pppd'
> make: *** [all] Error 2
>
>
> I'm really not sure what to do now! Any help will certainly be
> appreciated. Thanks!
>
> --
>
> John J. LeMay Jr.
> NJMC, LLC.
> http://www.njmc.com--
Dan Wilder <[EMAIL PROTECTED]>-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]
-- mailto:[EMAIL PROTECTED] <=> RICK MARSHALL <=> http://www.herzfeld.com/isl International Software Laboratories Pty Limited - Australia, New Zealand Footwear: Retail Management, Point of Sale, Wholesale, Manufacturing (-: All in Linux :-) (-: On the Web :-) (-: All in UNIBASE 5GL :-)
