HELP: Compiling PPP 2.2.0e on 1.2.84 w/ gcc 2.7.2

HELP: Compiling PPP 2.2.0e on 1.2.84 w/ gcc 2.7.2

Post by Gordon S. Edwar » Tue, 09 Apr 1996 04:00:00



I am trying to compile PPP 2.2.0e with:

        linux 1.3.84
        gcc 2.7.2
        binutils 2.6.0.12
        libc 5.3.9

I am getting unresolved symbols:

        __constant_c_and_count_memset
        __memset_generic

when linking pppd. chat compiles with no problem.

These symbols are defined in /usr/include/asm/string.h and are
declared as inline.

Why is the compiler bombing? I wrote a simple program using
memset to clear a buffer and everything linked fine. The base
include for both appears to be /usr/include/memory.h

Thanks!
--
Gordon Edwards

http://www.mindspring.com/~gse

 
 
 

HELP: Compiling PPP 2.2.0e on 1.2.84 w/ gcc 2.7.2

Post by Peter Dalgaard B » Wed, 10 Apr 1996 04:00:00



   I am trying to compile PPP 2.2.0e with:

           linux 1.3.84
           gcc 2.7.2
           binutils 2.6.0.12
           libc 5.3.9

   I am getting unresolved symbols:

           __constant_c_and_count_memset
           __memset_generic

   when linking pppd. chat compiles with no problem.

   These symbols are defined in /usr/include/asm/string.h and are
   declared as inline.

   Why is the compiler bombing? I wrote a simple program using
   memset to clear a buffer and everything linked fine. The base
   include for both appears to be /usr/include/memory.h

Yes, this is weird. Something to do with the "extern inline" (what's
the logic of that, anyway??), I suspect. I forced it to compile by
changing that to "static inline" (in the output of gcc -E, not the
orig. include file) and fixing the ensuing unresolved ___strtok
problem. Compile -O2 also works, I think. Haven't tried with gcc 2.7.0
yet, but looks like a compiler bug to me...
--
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N  
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918


 
 
 

HELP: Compiling PPP 2.2.0e on 1.2.84 w/ gcc 2.7.2

Post by Robert Hamilt » Wed, 10 Apr 1996 04:00:00



> ............ and fixing the ensuing unresolved ___strtok
> problem. Compile -O2 also works, I think. Haven't tried with gcc 2.7.0
> yet, but looks like a compiler bug to me...
> --

How did you fix the ___strtok problem?
I ended up just commenting out the references to strtok() (They
didn't seem to be doing anything anyway), but there must be a
better way, right?
 
 
 

HELP: Compiling PPP 2.2.0e on 1.2.84 w/ gcc 2.7.2

Post by Peter Dalgaard B » Wed, 10 Apr 1996 04:00:00



   orig. include file) and fixing the ensuing unresolved ___strtok
   problem.

Which, I'd better add, you fix with a

char * ___strtok;

at any suitable place in the code.
--
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N  
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918

 
 
 

HELP: Compiling PPP 2.2.0e on 1.2.84 w/ gcc 2.7.2

Post by Tom Temper » Wed, 10 Apr 1996 04:00:00


I don't believe this is a compiler bug.

From what I have seen, and how I fixed this problem is to go
to asm/string.h and put an ifdef __KERNEL__ to skip the header
file contents if I am not building the kernel.

I don't know if the define is missing in the source tree, but
the problem stems from on going development in both ppp and
the kernel.

Congratulations. You are paying your dues for living on the
(b)leading edge ;-)

--
Cheers....

Thomas Tempero                          Design Acceleration, Inc

                                        1530 Highway 52 N, Suite 1076  
                                        Rochester, MN

 
 
 

HELP: Compiling PPP 2.2.0e on 1.2.84 w/ gcc 2.7.2

Post by Peter Dalgaard B » Thu, 11 Apr 1996 04:00:00



   I don't believe this is a compiler bug.

Hmm. It certainly looks like one to me, but let wiser people
judge. (Linker refuses to resolve functions that were actually defined
in the source file itself?)

   From what I have seen, and how I fixed this problem is to go
   to asm/string.h and put an ifdef __KERNEL__ to skip the header
   file contents if I am not building the kernel.

Effective, obviously. But then you'll miss all the hard optimization
in your C programs, won't you?

   Congratulations. You are paying your dues for living on the
   (b)leading edge ;-)

Hrmpf! Actually, I was just trying to do a long overdue move towards
ELF, but then I had to...., and then I had to..., and then..., and
then...

And then I ordered the CD-ROM.
--
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N  
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918

 
 
 

1. HELP: Compiling PPP 2.2.0e on 1.3.84 (Part 2)

OK, after specifying -O in the compile of pppd, I eliminated the
unresolved __memset_generic, etc. (Thanks to Mark Hahn)

Now ___strtok is undefined in sys-linux.c.

Again my configuration is:
        linux 1.3.84
        gcc 2.7.2
        libc-5.3.9
        binutils-2.6.0.12

Thanks.

--
Gordon Edwards

http://www.mindspring.com/~gse

2. Unofficial Onceoff FAQ to COLDA ;-)

3. kernel 1.3.64, ppp 2.2.0e, and gcc 2.5.8

4. KPPP as non-root won't start

5. PPP 2.2.0e Compiling Trouble

6. Bandwidth limiter

7. Can't compile kernel with ppp 2.2.0e

8. How to record real audio streams??

9. compiling ppp.2.2.0e and 13.12 kernel problem

10. Parse errors compiling PPP 2.2.0e

11. PPP 2.2.0e wont compile, Want my TRS-80 back

12. Compiling problem with ppp 2.2.0e

13. Prob compiling FTape 2.2.0e on 1.3.89