Re: Loop Encryption

Alan Frederiksen (abf@postal.mfg.sgi.com)
Sun, 1 Jun 1997 19:33:13 -0700


Subject: Slakware 1.3.20/ppp 2.2 won't build

Hi,

I read the applicable READMEs and have fiddled around with this one a bit.
I am not able to get my slakware 1.3.20 kernel rebuilt with ppp 2.2.0d.

>
> 3. Verify the Makefile in the kernel.
>
> The drivers/net/Makefile in the kernel must have the proper definition
> for the BSD compression module. As of 2.2.0a, the code will only build
> as a module. This means that if you have had an earlier version of the
> PPP logic and this is an update to the kernel then it is possible that
> the patch to the Makefile did not work and you will be left with a
> kernel which will not build correctly.

All linux code came as is off a slakware dist CDROM and the ppp off the web.
ppp was not present on this system previously. All that I am adding is
ppp.

> Please, read carefully the following.
>
> Look that the kernel version which you are building. If the version is
> 1.2.x (1.2.0 though 1.2.99999, whatever) then use the set of entries
> for the 1.2 kernel. If the kernel is for 1.3.x and resembles the lines
> in the 1.3 kernel entry then use those. There is a point in the early
> 1.3 kernels where the Makefile actually was that of the 1.2 series.
> Please don't just use the 1.3 kernel change unless your makefile
> RESEMBLES the patch indicated.
>
> I don't know how to stress this enough. If you choose the wrong one
> then the makefile will not work. Your kernel build will fail. In that
> case, use the other one. There are only two variations. Please choose
> the proper one. Only one will work.

BTW uname -a yields:
Linux darkstar 1.2.13 #1 Wed Aug 23 04:25:45 CDT 1995 i586

(????!)

I should have something close to one of these 2 variations as per
README.linux:

> Check the makefile. If your kernel is 1.2 then it should be similar to
> the following:
>
> ifdef CONFIG_PPP
> NETDRV_OBJS := $(NETDRV_OBJS) ppp.o
> CONFIG_SLHC = CONFIG_SLHC
> else
> MODULES := $(MODULES) ppp.o
> endif
>
> MODULES := $(MODULES) bsd_comp.o
>
> ifdef CONFIG_SLIP
> NETDRV_OBJS := $(NETDRV_OBJS) slip.o
> CONFIG_SLHC = CONFIG_SLHC
> else
> MODULES := $(MODULES) slip.o
> endif
>
> The critical entry is the line which says "MODULES := $(MODULES) bsd_comp.o"
> and that you don't have "NETDRV_OBJS := $(NETDRV_OBJS) ppp.o bsd_comp.o".
>
> IF YOU HAVE THE 1.3 KERNEL, the following is the expected pattern in the
> Makefile.
>
> ifeq ($(CONFIG_PPP),y)
> L_OBJS += ppp.o
> CONFIG_SLHC_BUILTIN = y
> else
> CONFIG_SLHC_MODULE = y
> M_OBJS += ppp.o
> endif
> endif
>
> ifeq ($(CONFIG_SLIP),y)
> L_OBJS += slip.o
> CONFIG_SLHC_BUILTIN = y
> else
> ifeq ($(CONFIG_SLIP),m)
>
> Again, ensure that the statement reads "L_OBJS += ppp.o" and not
> "L_OBJS += ppp.o bsd_comp.o".
>

My file contains the following:

# File: drivers/net/Makefile

ifdef CONFIG_PPP
L_OBJS += ppp.o
CONFIG_SLHC = CONFIG_SLHC
else
M_OBJS += ppp.o
endif

ifneq ($(CONFIG_PPP),n)
M_OBJS += bsd_comp.o
endif

and I get this when I try to rebuild my kernel:

ppp.c: In function `ppp_tty_close':
ppp.c:845: `mod_use_count_' undeclared (first use this function)
ppp.c:845: (Each undeclared identifier is reported only once
ppp.c:845: for each function it appears in.)
ppp.c: In function `ppp_tty_open':
ppp.c:929: `mod_use_count_' undeclared (first use this function)
make[2]: *** [ppp.o] Error 1
make[2]: Leaving directory `/usr/src/linux-1.3.20/drivers/net'
make[1]: *** [sub_dirs] Error 2
make[1]: Leaving directory `/usr/src/linux-1.3.20/drivers'
make: *** [linuxsubdirs] Error 2

The L_OBJS line looks OK for a 1.3.20 kernel which is what my build tree
tells me I have. What exactly is the fix here? The README refers to:

> PROBLEMS WHICH MAY OCCUR WHILE BUILDING THE KERNEL
> A REFERENCE TO UNDEFINED _mod_use_count_
> ,,,,,....................................

The build error above says that "mod_use_count_" is "undeclared". I am
assuming this is the same error. Should I just paste the 1.3 set of
Makefile "ifdefs" above into my Makefile?

This occurs even with the following changes to the same file and patch
1.3.x correctly applied:

ifdef CONFIG_PPP
L_OBJS += ppp.o
CONFIG_SLHC = CONFIG_SLHC
CONFIG_SLHC_BUILTIN = y # after ppp README.linux
else
M_OBJS += ppp.o
CONFIG_SLHC_MODULE = y # after ppp README.linux
endif

(some more system info:)

gcc version 2.7.0
GDB 4.14 (i486-slackware-linux),

Any light shed on this would be greatly appreciated.

-thanks,
Alan

abf@mfg.sgi.com