Kernel compile aborts in make bzImage

Aurel Wisse yellowdog-general@lists.terrasoftsolutions.com
Fri Apr 19 10:36:01 2002


Thanks Gary, these are a few good places to start.

Digging deeper, I actually found in nohup.out that,
after the compilation, 'make' invokes a linker command
'ld' with, amongst others, the option 

--start-group (or --begin-group, not sure from memory)
<plenty of *.o filenames, including network.o>
--end-group

This command is then followed by literally hundreds of
lines of unresolved dependencies until 'make' suddenly
gives up with something like 

make: *** [Error 1] vmlinux

always at the same point as mentioned in previous
posts.


According to the 'ld' man page, the
start-group/end-group  option means that the linker
will play with the grouped *.o files until all
dependencies are resolved. Looks like 'make' looses
patience and gives up.

What I am trying to achieve: I want to recompile the
kernel without unneeded features but including module
support for a few more ethernet cards (sunbmac and
sungem) to see whether a) these work with my iMac
rev.B (normally BMAC driver) and b) they allow me to
force the speed and half-duplex of the NIC while
switching off autonegotiation.

What I tried: 1) make-ing the .config created by the
default option in the KDE Kernel configurator and 2)
make-ing two of the config files in
/usr/src/linux/configs (copying them to /usr/src/linux
as .config). 

In every instance 'make' quits like I mentioned above.


Now it would be helpful if somebody can confirm me
that  he or she succeeds in compiling one or more of
the standard /usr/src/linux/configs or even a custom
.config after doing an original install from the YDL
2.2 disk (not incremental/upgrade). This would tell me
that the combination of compiler version (mine is gcc
2.95.2), linker, make etc as shipped by Terrasoft
works and I have to sort out my own problems,
thankfully with helpful members of this group.

Aurel Wisse

--- ghannon@cspi.com wrote:
> 
> Disclaimer:  *****
> I deleted your initial message, so I'm not sure what
> you are trying to do
> in the first place.
> If you are trying to build the kernel that came with
> the 2.2  release, the
> problem
> may be that you need to copy a config file from the
> /usr/src/linux/configs
> directory
> into /usr/src/linux as .config and then do the
> build.  Take the one that
> applies to
> your machine.
> 
> If you've done that and you are just building a
> kernel with some different
> options
> or modules, then the following applies.
> 
> End Disclaimer ****
> 
> It looks like you need to add some more options to
> your kernel, as there
> are
> functions being called that are not linked in.
> 
> For sk_attach_filter,
> I went to /usr/src/linux/net and did
> 
> grep -r sk_attach_filter *
> 
> which returned the following
> 
> core/filter.c: *        sk_attach_filter - attach a
> socket filter
> core/filter.c:int sk_attach_filter(struct sock_fprog
> *fprog, struct sock
> *sk)
> core/sock.c:                            ret =
> sk_attach_filter(&fprog, sk);
> Binary file core/sock.o matches
> Binary file core/filter.o matches
> Binary file core/core.o matches
> Binary file network.o matches
> 
> then I went into the core subdirectory and looked at
> Makefile to see what
> includes
> filter.o,  the file which would define that routine
> and see:
> 
> obj-$(CONFIG_FILTER) += filter.o
> 
>  meaning that if CONFIG_FILTER is set, then filter.o
> will get included in
> the link.
> 
> So, now you would do make menuconfig or make xconfig
> and set CONFIG_FILTER.
> 
> It may be helpful to also look in the
> directory tree working backwards from core to find a
> Config.in which
> contains CONFIG_FILTER, as it will tell you the text
> to look for in
> configuring
> that parameter.  In this case it's
> /usr/src/linux/net/Config.in and the
> line is
> 
> bool 'Socket Filtering'  CONFIG_FILTER
> 
> Thus in "make menuconfig", when you enable Socket
> Filtering, you will
> get filter.o included and your undefined for
> sk_attach_filter will go away.
> 
> The problem is that sometimes the kernel has
> dependencies which
> are not all protected and these "mismatches" occur.
> 
> Good Luck!
> 
> Gary Hannon
> CSPI
> 
> 
> 
> 
> 
> 
> 
> 
> Aurel Wisse <aurel_wisse@yahoo.com> on 04/18/2002
> 08:11:21 PM
> 
> Please respond to
> yellowdog-general@lists.terrasoftsolutions.com
> 
> To:   yellowdog-general@lists.terrasoftsolutions.com
> cc:    (bcc: Gary Hannon/CSP)
> Subject:  Re: Kernel compile aborts in make bzImage
> 
> 
> 
> 
> Not solved. After reinstalling the kernel sources
> and
> using make vmlinux, the compile now hangs
> systematically with several lines of the form:
> In function 'sock_setsockopt'
> net/network.o(...stuff...): undefined reference to
> ....
> sk_attach_filter
> kmap_high
> kunmap_high
> 
> and several more functions and undefined references.
> 
> 
> Looks like a linker error. How come? What could I
> reinstall/correct to resolve these?
> 
> 
> 
> --- hanai@koto.kpu-m.ac.jp wrote:
> > From: Aurel Wisse <aurel_wisse@yahoo.com>
> > > Running YDL 2.2 in KDE on an iMac Rev. B/160MB
> > RAM.
> >
> > > I am configuring in the Linux Kernel
> Configurator,
> > > putting the .config file in /usr/src/Linux and
> run
> > > make dep, make clean and then make bzImage.
> >
> > "make bzImage" does not work in ppc. use "make
> > vmlinux"
> > (or just "make").
> >
> > HTH,
> > kaz
> > _______________________________________________
> > yellowdog-general mailing list
> > yellowdog-general@lists.terrasoftsolutions.com
> >
>
http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
> _______________________________________________
> yellowdog-general mailing list
> yellowdog-general@lists.terrasoftsolutions.com
>
http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
> 
> 
> 
> 
> 
> 
> _______________________________________________
> yellowdog-general mailing list
> yellowdog-general@lists.terrasoftsolutions.com
>
http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/