Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building a new kernel



>>>>> "Jim" == Jim Schweizer <schweiz@example.com> writes:

    Jim> Hi all, Getting back to the kernal problem:

    Jim> When I type 'make config' I get dissed with:
    Jim> make: *** No rule to make target 'config'. Stop.

    ST> Question 1: Can you read the Makefile?  Question 2: Can you
    ST> read the Makefile?

    Jim> Answer 1: Yes Answer 2: No, not really.

OK ... it's really not that hard to read basic make rules.  In the
basic format, it's

target: dependency
	action

and you read that "if <target> doesn't exist, or <target> is older
than <dependency>, then rebuild <target> via <action>."  There really
ought to be a tool which reads complicated makefiles and builds an
HTML file so that you can follow a link from a dependency to the
target that builds it.  Unfortunately, there isn't.  So you just have
to use search functions in a text editor.

You can also tell make to do a dry run on your Makefile, which might
be interesting to watch with `less':

>From `info make':

`-n'
`--just-print'
`--dry-run'
`--recon'
     Print the commands that would be executed, but do not execute them.
     *Note Instead of Executing the Commands: Instead of Execution.

`-p'
`--print-data-base'
     Print the data base (rules and variable values) that results from
     reading the makefiles; then execute as usual or as otherwise
     specified.  This also prints the version information given by the
     `-v' switch (see below).  To print the data base without trying to
     remake any files, use `make -p -f /dev/null'.

[The "-f /dev/null" actually prints the database of defaults, since it
doesn't read any Makefiles.  To not remake files, use '-n'.  '-p' is
hellaciously verbose, even with trivial makefiles---among other
things, it prints out the whole environment---so do use 'less' or
something like that!]

`-W FILE'
`--what-if=FILE'
`--assume-new=FILE'
`--new-file=FILE'
     "What if".  Each `-W' flag is followed by a file name.  The given
     files' modification times are recorded by `make' as being the
     present time, although the actual modification times remain the
     same.  You can use the `-W' flag in conjunction with the `-n' flag
     to see what would happen if you were to modify specific files.

[Be careful with the '-W' and '-p' flag[s]; make will actually execute
the relevant actions unless you use '-n' too.]

    JWT> And if it your answer was yes to both, you might consider:
    JWT> Question 3: Do I have an old version of GNU make which had a
    JWT> bug that was masked by the old libc library?

    Jim> I was just reading the release note for the 2.0 kernel and
    Jim> saw:

    >> The latest stable Linux C Library release is 5.2.18.  If you
    >> upgrade to this from 5.0.9 or earlier, be sure to read the
    >> `release.libc-5.2.18' file, since GNU make and a few other
    >> fairly important utils can be broken by the upgrade

    Jim> When I installed jdk1.01 (someday I WILL learn how to use
    Jim> it!) I grabbed libc.5.2.18.bin.tar.gz and uncompressed,
    Jim> untarred and copied the files in the lib subdirectory of the
    Jim> top level of the heirarchy to /lib. (I followed the
    Jim> directions to the T) So, now I have both 5.0.9 and 5.2.18 in
    Jim> /lib. There was nothing in the java-HOWTO about this breaking
    Jim> make!

I don't understand ld.so (the dynamic linking loader which actually
runs most programs) or ldconfig (which builds the kernel caches
necessary to use ld.so) well.  However, you should not have a problem
with having both libc-5.2.18 and libc-5.0.9 around; recent ld.so
versions understand this (and also automatically recognize a.out
vs. ELF).  (You should have a recent version of ld.so (and its
companions ldd and ldconfig).  I think all ELF systems have pretty
up-to-date loaders.  'ldd -V' (case is important) will tell you what
the version of ld.so is.  For the dynamic linking work properly among
ELF, a.out, and multiple versions of single libraries, you probably
want a 1.7.x version of ld.so.  1.7.14 is working fine for me.  If you
want to replace the ld.so suite, get advice first if you don't fully
understand the instructions; it's quite easy to wedge yourself into a
situation where you can't do anything, and have to boot from a rescue
floppy.)

    Jim> Should I try upgrading GNU make and hope it doesn't break the
    Jim> jdk?

Yes, do upgrade.  No, don't waste any effort worrying about the JDK.
I have not heard of any problems with GNU make in terms of backward
compatibility with Makefiles; GNU make basically is a standalone
program, and is not integrated into any other package (even GNU C) in
any complicated way.  GNU make only cares that (1) the exec calls work
(since it runs other programs), (2) the directory calls to test file
existence and age work, and (3) the Makefile being parsed follow its
syntax.  It was the file system calls that got broken in the library
upgrade.  (1) and (2) are OS features, and (3) is a public interface
that the GNU project is pretty careful not to change.

Probably you already have make 3.7.x, maybe even 3.7.4 (do "make --
version" to find out).  The only difference between the original make
3.7.4 and the fixed distribution is that it was linked against a fixed
library.

Steve

-- 
                           Stephen John Turnbull
University of Tsukuba                                        Yaseppochi-Gumi
Institute of Policy and Planning Sciences  http://turnbull.sk.tsukuba.ac.jp/
Tennodai 1-1-1, Tsukuba, 305 JAPAN                 turnbull@example.com
-----------------------------------------------------------------
a word from the sponsor will appear below
-----------------------------------------------------------------
The TLUG mailing list is proudly sponsored by TWICS - Japan's First
Public-Access Internet System.  Now offering 20,000 yen/year flat
rate Internet access with no time charges.  Full line of corporate
Internet and intranet products are available.   info@example.com
Tel: 03-3351-5977   Fax: 03-3353-6096


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links