gcc seems to ignore flags in make vmlinux (was: Kernel compile aborts in make bzImage)
Aurel Wisse
yellowdog-general@lists.terrasoftsolutions.com
Sun Apr 21 14:07:01 2002
Sorry for coming back with this one, but if I don't
solve it, there will be no networking with YDL 2.2 for
me.
I followed Gary's advice and looked up a few
dependencies with grep, in the Makefiles and in the
sources
.
To recall, the "make vmlinux" output contains, after
all the object files are compiled and linked and hence
"global linking" should start,
init/main.o: in function 'do_basic_setup' ...
undefined reference to 'init_pcmcia_ds'
Looking up this line in main.c, it says in order to
compile this call, the flag CONFIG_PCMCIA has to be
set. Looking this up in .config shows me that the flag
*was not* set.
Same thing with the second unresolved conflict:
"set_backlight_enable" in kernel.o (called in
traps.c). When the flag "CONFIG_PMAC_BACKLIGHT" is not
set, the function call shouldn't be compiled and hence
not cause a dependency. I can assert that this flag
doesn't even appear in the .config file.
What do I try from here? Could it be the compiler
(gcc-2.95.4)?
Well, it's probably I, but I need a little push to get
over this bump.
Thanks for additional advice.
Aurel
> 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! Games - play chess, backgammon, pool and more
http://games.yahoo.com/