kernel can't compile, undefined references errors!

kernel can't compile, undefined references errors!

Post by Matthew Greenfie » Mon, 19 Feb 1996 04:00:00



mm, reposting this as I think it didn't get thru somehow..

I've got problems trying to compile my kernel (slackware 1.2.13, and
have tried 1.3.0 as well)... when it tries to link all the '.o' files
(or whatever it is it's trying to do at the end) it comes out with a
plethora of 'undefinted reference to blah_blah_blah' errors, and fails
to put anything nice together for me at all..

any advice will be MUCHLY appreciated! cheers

 
 
 

kernel can't compile, undefined references errors!

Post by Jon Mitche » Mon, 19 Feb 1996 04:00:00



>mm, reposting this as I think it didn't get thru somehow..
>I've got problems trying to compile my kernel (slackware 1.2.13, and
>have tried 1.3.0 as well)... when it tries to link all the '.o' files
>(or whatever it is it's trying to do at the end) it comes out with a
>plethora of 'undefinted reference to blah_blah_blah' errors, and fails
>to put anything nice together for me at all..

Maybe you could list some of those errors for us, so we could have a
chance at identifying your problem?

Jon Mitchell
*****************************************************************************
* [Fun-Boy] Sleep is for weaklings!                        * jrmitche       *

*  and those who cannot.  It is one of the great divisions * My views have  *
*  of the human race." - Iris Murdoch (stolen from the     * _nothing_ to   *
*                        pages of Stephen King's Insomnia) * do with ccso!  *
*****************************************************************************

 
 
 

kernel can't compile, undefined references errors!

Post by John Wils » Mon, 19 Feb 1996 04:00:00



>mm, reposting this as I think it didn't get thru somehow..
>I've got problems trying to compile my kernel (slackware 1.2.13, and
>have tried 1.3.0 as well)... when it tries to link all the '.o' files
>(or whatever it is it's trying to do at the end) it comes out with a
>plethora of 'undefinted reference to blah_blah_blah' errors, and fails
>to put anything nice together for me at all..
>any advice will be MUCHLY appreciated! cheers

I've got the same problem.  I got the source and all the patches,
applied the patch* patches (don't know what to do with the *diff*
stuff, and in what order) and followed the Kernel faq.

The errors scream by so fast I can't stop them, and don't know how to
pipe it to a file so I can review or post them.

 
 
 

kernel can't compile, undefined references errors!

Post by M.A. » Tue, 20 Feb 1996 04:00:00




> >mm, reposting this as I think it didn't get thru somehow..

> >I've got problems trying to compile my kernel (slackware 1.2.13, and
> >have tried 1.3.0 as well)... when it tries to link all the '.o' files
> >(or whatever it is it's trying to do at the end) it comes out with a
> >plethora of 'undefinted reference to blah_blah_blah' errors, and fails
> >to put anything nice together for me at all..

> >any advice will be MUCHLY appreciated! cheers

> I've got the same problem.  I got the source and all the patches,
> applied the patch* patches (don't know what to do with the *diff*
> stuff, and in what order) and followed the Kernel faq.

> The errors scream by so fast I can't stop them, and don't know how to
> pipe it to a file so I can review or post them.

Check to see if you have gcc 2.7.0. and get 1.3.62 and the incomming
patch from Sunsite.Run make config,make dep,make clean and make zlilo.
appply the patch first,check README OR DIE

I had the same problem until someone on the net give us the solution.

M.A.

 
 
 

kernel can't compile, undefined references errors!

Post by Frank Benne » Thu, 22 Feb 1996 04:00:00


: I've got problems trying to compile my kernel (slackware 1.2.13, and
: have tried 1.3.0 as well)... when it tries to link all the '.o' files
: (or whatever it is it's trying to do at the end) it comes out with a
: plethora of 'undefinted reference to blah_blah_blah' errors, and fails

When I had the same problem at the end of last year, I was
told, in the end, that this was a "pretty well-known problem"
that somehow hadn't yet made its way into the kernel FAQ.

Your problem is probably that you are using a GCC that defaults
to ELF format.  You need to tell it to be nice and link things
using a.out libraries instead, at the final putting-together
stage.  Add these lines to the beginning of your
/usr/src/linux/arch/i386/Makefile:

  AS=/usr/i486-linuxaout/bin/as
  LD=/usr/i486-linuxaout/bin/ld -m i386linux
  CC=gcc -b i486-linuxaout -D__KERNEL__ -I$(TOPDIR)/include

With these incantations in place, the thing should compile
okay, without any changes to the source itself.

I know how frustrated you must feel.  This information (assuming
that this solves your problem) is the sort of thing one should
not have to dig for.  Hope all goes smoothly for you now.

--


Tel: (0171)323-6351          () WWW: http://rumple.soas.ac.uk/~fbennett/

 
 
 

kernel can't compile, undefined references errors!

Post by Edward Winsto » Tue, 27 Feb 1996 04:00:00




> : I've got problems trying to compile my kernel (slackware 1.2.13, and
> : have tried 1.3.0 as well)... when it tries to link all the '.o' files
> : (or whatever it is it's trying to do at the end) it comes out with a
> : plethora of 'undefinted reference to blah_blah_blah' errors, and fails

> Add these lines to the beginning of your
> /usr/src/linux/arch/i386/Makefile:

>   AS=/usr/i486-linuxaout/bin/as
>   LD=/usr/i486-linuxaout/bin/ld -m i386linux
>   CC=gcc -b i486-linuxaout -D__KERNEL__ -I$(TOPDIR)/include

> With these incantations in place, the thing should compile
> okay, without any changes to the source itself.

I added this to that file and I got the following message when i tried to recompile :

gcc -b i486-linuxaout -D__KERNEL__ -I/usr/src/linux-1.2.13/include -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -pipe -m486  -c -o init/main.o init/main.c
gcc: installation problem, cannot exec cpp: No such file or directory
gcc: installation problem, cannot exec cc1: No such file or directory
/usr/i486-linuxaout/bin/as: unrecognized option `-Qy'
make: *** [init/main.o] Error 1

Does anyone have any ideas about this?  Have I totally screwed up my installation or what?

edward