Compiling Linux v1.2.1 with GCC v2.6.2

Compiling Linux v1.2.1 with GCC v2.6.2

Post by Zenon Fortu » Fri, 07 Apr 1995 04:00:00





Quote:>   I have a problem compiling the kernel version 1.2.1 with GCC 2.6.2.
>   If I configure it to compile it with networking support it gives me 4
>errors in file kernel/ksyms.c. It says that register_net_device is not
>declared in that module and aborts.
>   Can anyone help with this problem???

Just for a reference: after installation of Slackware 2.2.0 (which has
gcc version 2.6.3) I did NOT have problems compiling the kernel with
networking support.

        -Z

 
 
 

Compiling Linux v1.2.1 with GCC v2.6.2

Post by Antonio Miguel Trinda » Fri, 07 Apr 1995 04:00:00


   I have a problem compiling the kernel version 1.2.1 with GCC 2.6.2.
   If I configure it to compile it with networking support it gives me 4
errors in file kernel/ksyms.c. It says that register_net_device is not
declared in that module and aborts.
   Can anyone help with this problem???

--
-------------------------------------------------------------------------------
|What do you call a series of   |  Snail-mail address:                        |
|FDIV instructions on a Pentium?|  Antonio Miguel Ferreira Marques Trindade   |
|- Successive approximations!!! |  Rua Marques de Pombal, no.1 - 1o. dto.     |
|-------------------------------|  Fala, S. Martinho do Bispo                 |
|Jean-Michel Jarre is very cool!|  3000 Coimbra, PORTUGAL                     |
|-----------------------------------------------------------------------------|
|--------------------------------------------|                                |


-------------------------------------------------------------------------------

 
 
 

Compiling Linux v1.2.1 with GCC v2.6.2

Post by Jackson » Fri, 07 Apr 1995 04:00:00



>    I have a problem compiling the kernel version 1.2.1 with GCC 2.6.2.
>    If I configure it to compile it with networking support it gives me 4
> errors in file kernel/ksyms.c. It says that register_net_device is not
> declared in that module and aborts.
>    Can anyone help with this problem???
> --
> -------------------------------------------------------------------------------
> |What do you call a series of   |  Snail-mail address:                        |
> |FDIV instructions on a Pentium?|  Antonio Miguel Ferreira Marques Trindade   |
> |- Successive approximations!!! |  Rua Marques de Pombal, no.1 - 1o. dto.     |
> |-------------------------------|  Fala, S. Martinho do Bispo                    |
> |Jean-Michel Jarre is very cool!|  3000 Coimbra, PORTUGAL                |
> |-----------------------------------------------------------------------------|
> |--------------------------------------------|                                |


> -------------------------------------------------------------------------------

It seems that newer versions of gcc have more bugs than added features. I
compiled kernel 1.2.3 with gcc 2.5.8 w/o a single problem and it runs
fine so far.

--

---
Regards,


 
 
 

1. IO Overflow via putc() in GCC v2.6.3, Slackware v2.x Linux v1.2.11

I'm getting a segmentation fault when running a program compiled by gcc
(v2.6.3 i486-linux-aout) using 'gcc -o sor -I. -Ih -g sor.c' on a 486 which
has 16 MB RAM, all scsi, and running Linux v1.2.11 based on the Slackware
v2.2/v2.3 distribution (I know, I know, I'm planning on upgrading RSN :-).

The Slackware v2.3 distribution was missing the g++ include files so I
snarfed that binary package ('disk') from the Slackware v2.3 archive on
ftp.cdrom.com and installed that.

The problem is a segmentation fault (gdb output):
[...]
Program received signal SIGSEGV, Segmentation fault.
I've not had this problem with any other programs that I've built with this
setup.  0x1d323 in _IO_file_overflow (f=0x65d00, ch=9) at fileops.c:350
fileops.c:350: No such file or directory.
(gdb) bt
#0  0x1d323 in _IO_file_overflow (f=0x65d00, ch=9) at fileops.c:350
#1  0x1b71a in __overflow (f=0x65d00, ch=9) at genops.c:160
[[I assume those first two are in the C/C++ library]]

#2  0x1cd1c in putc (c=9, stream=0x65d00) at putc.c:11
[[That's a function because I tried forcing the use of the function putc
rather than the macro but it makes no difference.]]

#3  0x15ff7 in dumpAction (
    s=0x66c03 "\n   SymbolTable* _current;", ' ' <repeats 13 times>, "// most current symbol table\n   AST* _currClass;", ' ' <repeats 19 times>, "// current class, for recurs. detect\n   RWTPtrDlist<ErrorMsg>* _errorList;  // errorMsgs owned"..., output=0x65d00, tabs=1, file=-1, line=0, final_newline=1) at gen.c:906
[[This is in the actual 'sor' program.  The string is a few hundred bytes
long.  See the print below...]]

#4  0x1a9c8 in GenCPPClassHeader () at cpp.c:94
#5  0x109c6 in main (argc=3, argv=0xbffffb2c) at main.c:311

(gdb) printf "%500s", s

SymbolTable* _current;             // most current symbol table
AST* _currClass;                   // current class, for recurs. detect
RWTPtrDlist<ErrorMsg>* _errorList;  // errorMsgs owned by Linker!

void initialize();
void initScope(AST* n);
void initFuncScope(AST* n);
void addUnique(AST* id,AST* n);
void addNonUnique(AST* id,AST* n);
void addConstructor(AST* id,AST* n);
void addInheritedScopes(AST* classNode, AST* nteList);
RWTPtrDlist<ErrorMsg>* errorList()  { return _errorList; }
void rptErr(ErrorCode e, AST* n);
void rptErr(ErrorCode e, AST* n, String str);
(gdb)

The application code is pretty simple the offending source line is:
906             if ( *s!='#' ) {TAB;}

where 'TAB' is a macro defined as:
#define TAB     {int i=1; for (;i<=tabs;i++) {putc('\t', output);}}

and 'output' is an argument to dumpAction():
FILE *output

which has been passed 'stdout' by the callers.

I put explicit fflush(output) in the code but that didn't help any either.

I have not had this problem with any of the myriad other programs that I've
built with this system so, I'd really appreciate learning what stupid thing
I'm missing/doing/etc.

Thanks,
        John

2. Linux router

3. Problem with GCC V2.7.2 compiling kernel V1.2.13

4. Welcome to comp.unix.questions [Frequent posting]

5. Diskless configuration?

6. HELP:Unable to compile Linux 2.1 w/gcc 2.7 - no 386 inst 'rdtsc'

7. EVIL AMERICAN GOVT (aka FBI) is full of SADISTS and PERVERTS

8. Kernal v1.2.13/GCC v2.7.2 - Can't make zImage (io.h?)

9. Problems compiling UMoria 5.4 (MCC .95c+, GCC 2.1)

10. problem when running a program compiled with gcc 2.1 under 0.95a

11. Problems to compile X11R5 (solaris 2.1) with gcc version cygnus-2.0.2

12. top: memory leak when compiled with GCC 2.1