Tech Support > Operating Systems > Linux / Variants > [Q] linux-2.6.x compilation
[Q] linux-2.6.x compilation
Posted by root/administrator on February 23rd, 2004


Hi,

I have been trying to configure and compile linux-2.6.3 kernel on my
SuSE-9.0 Pro AMD Athlon machine to no avail. I am wondering if anyone out
here could help. The following is the excerpt from kernel configuration
(using 'make xconfig'):

#####
HOSTCC scripts/fixdep
SHIPPED scripts/kconfig/zconf.tab.h
HOSTCC scripts/kconfig/conf.o
sed < scripts/kconfig/lkc_proto.h > scripts/kconfig/lkc_defs.h
's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
HOSTCC scripts/kconfig/kconfig_load.o
HOSTCC scripts/kconfig/mconf.o
/usr/lib/qt3/bin/moc -i scripts/kconfig/qconf.h -o scripts/kconfig/qconf.moc
HOSTCXX scripts/kconfig/qconf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
HOSTCC -fPIC scripts/kconfig/zconf.tab.o
HOSTLLD -shared scripts/kconfig/libkconfig.so
HOSTLD scripts/kconfig/qconf
scripts/kconfig/qconf arch/Linux/Kconfig
can't find file arch/Linux/Kconfig
make[1]: *** [xconfig] Error 1
make: *** [xconfig] Error 2
#####

The above error said the "make xconfig' couldn't locate the directory of
arch/Linux/Kconfig. Indeed, there is no such arch/Linux directory. The
question is do I manually need to or the 'make xconfig' will automatically
create such a directory? I recalled compiling linux.2.4.x kernel did not
have to do such a thing. Can anyone please help?

Thanks.

--
root/administrator

Posted by Lenard on February 23rd, 2004


On Mon, 23 Feb 2004 18:04:38 +0000, root/administrator wrote:

Step One; http://kerneltrap.org/node/view/799


--
Posted under the XFree86 v.1.0 license
Copyright remains with the author

Posted by root/administrator on February 23rd, 2004


Lenard wrote:

That's has long been read and/or followed when linux-2.6.0 just came out.
The error I got when issuing "make xconfig" is the expectation of the
"arch/Linux" as well as include/asm-Linux directories under the kernel
source tree. The link you mentioned in your post does not explain the
missing directories or links that I have experienced through. I could
continue to configure and compile the kernel without a problem if I had to
manually create the following links under linux source tree:

ln -sf arch/i386 arch/Linux
ln -sf include/asm-i386 include/asm-Linux

I just could not find any reference to the creation of such mussing links or
directories. Obviously, the kernel "make xconfig" does not take into
account of creating such links or directories.

I would appreciate if anyone can make any comment and/or observation
regarding this matter.

--
root/administrator

Posted by Geoff on February 23rd, 2004


On Mon, 23 Feb 2004 20:29:03 +0000, root/administrator wrote:

<snip>

I am not sure how much it will help, because I don't know the answer (and
in any case I use menuconfig), but I have no problems with compiling
2.6.3. To try to get a handle on this I therefore untarred sources again
and ran simple "make xconfig". Here is what I see for you to diff against
your own output:

HOSTCC scripts/fixdep
SHIPPED scripts/kconfig/zconf.tab.h
HOSTCC scripts/kconfig/conf.o
sed < scripts/kconfig/lkc_proto.h > scripts/kconfig/lkc_defs.h
's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
HOSTCC scripts/kconfig/kconfig_load.o HOSTCC scripts/kconfig/mconf.o
/usr/lib/qt-3.2.1/bin/moc -i scripts/kconfig/qconf.h -o
scripts/kconfig/qconf.moc
HOSTCXX scripts/kconfig/qconf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
HOSTCC -fPIC scripts/kconfig/zconf.tab.o HOSTLLD -shared
scripts/kconfig/libkconfig.so HOSTLD scripts/kconfig/qconf
scripts/kconfig/qconf arch/i386/Kconfig

We are obviously using different versions of QT, but apart from that I
can't see where your problem is on the basis only of a quick comparison.

Geoff

Posted by Geoff on February 23rd, 2004


On Mon, 23 Feb 2004 20:46:35 +0000, Geoff wrote:

Following up my own post, this may be the answer :

http://www.osnews.com/comment.php?news_id=5552

Search for kconfig in the page.

Geoff

Posted by root/administrator on February 24th, 2004


I have noticed that the `uname -m` of my machine outputs i686 and the arch
directory does not have i686 (except i386). Anyway, I removed the source
tree and tarred a fresh one. When I do "make mrproper", I got the following
error messages:

make: *** No rule to make target
`/usr/src/linux-2.6.3/arch/Linux/Makefile'. Stop.

Then, I did a " make menuconfig" with the following output:

HOSTCC scripts/fixdep
SHIPPED scripts/kconfig/zconf.tab.h
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/mconf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
HOSTCC -fPIC scripts/kconfig/zconf.tab.o
HOSTLLD -shared scripts/kconfig/libkconfig.so
HOSTLD scripts/kconfig/mconf
HOSTCC scripts/lxdialog/checklist.o
HOSTCC scripts/lxdialog/inputbox.o
HOSTCC scripts/lxdialog/lxdialog.o
HOSTCC scripts/lxdialog/menubox.o
HOSTCC scripts/lxdialog/msgbox.o
HOSTCC scripts/lxdialog/textbox.o
HOSTCC scripts/lxdialog/util.o
HOSTCC scripts/lxdialog/yesno.o
HOSTLD scripts/lxdialog/lxdialog
scripts/kconfig/mconf arch/Linux/Kconfig
can't find file arch/Linux/Kconfig
make[1]: *** [menuconfig] Error 1
make: *** [menuconfig] Error 2


Then, I did "make xconfig" with the following messages:

make[1]: `scripts/fixdep' is up to date.
sed < scripts/kconfig/lkc_proto.h > scripts/kconfig/lkc_defs.h
's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
HOSTCC scripts/kconfig/kconfig_load.o
/usr/lib/qt3/bin/moc -i scripts/kconfig/qconf.h -o scripts/kconfig/qconf.moc
HOSTCXX scripts/kconfig/qconf.o
HOSTLD scripts/kconfig/qconf
scripts/kconfig/qconf arch/Linux/Kconfig
can't find file arch/Linux/Kconfig
make[1]: *** [xconfig] Error 1
make: *** [xconfig] Error 2

The above error messages are different from yours.


Geoff wrote:

--
root/administrator

Posted by Geoff on February 24th, 2004


On Tue, 24 Feb 2004 02:09:50 +0000, root/administrator wrote:

I will comment on this part later.

As I understand it, running "make mrproper" deletes the hidden .config
file from which the Makefile is generated. You should *not* run make
mrproper unless you have a duplicate of a .config somewhere ready to copy
back into the root linux-2.6.x directory. You need to re-untar the
sources (to recreate the default .config) and try again.

<snipped output>

<snipped output>

I don't think we will get valid results until you restore the .config
before running either make menuconfig or make xconfig

Coming back to your first point about uname -m showing i686 - so does
mine. If, however, you look at the kernel Makefile, it actually uses
$(SUBARCH) to define the architecture and it generates that by a sed
operation on the output of uname -m. See lines 123 - 132 of the Makefile.
On my system this gives i386 and so far as I can tell, it should also do
so on yours. I don't understand why it does not do the same for you - or
why it did not do so for the guy whose posts I referred you to. I wonder,
though, whether SuSE sets an environment variable ARCH which overrides the
Makefile? What does < echo $ARCH > show on your system?

I suppose you could also try manually setting ARCH to i386 in line 152 of
the Makefile, but even if it works we would not know why. I am no expert,
and the workings of a kernel makefile are really beyond me.

Can anyone else help?

Geoff

Posted by root/administrator on February 24th, 2004


BINGO!!!!! You are right. My ARCH environment points to "Linux". After a few
investigations, I have located the little culprit that sets the "ARCH"
environment under /etc/csh.cshrc file. I have inherited this file from a
SUN machine back in 1993 when I started using the Linux OS on my i386
machine. Back then, I was not awared of the difference between using "uname
-m" and "uname -s" (or may be old "uname -s" referenced to the machine
architecture rather than the machine OS). After more than a decade, this
little bug finally got caught! ... hew ...

Before I do forget, I certainly have appreciated your help and am thanking
you in helping me to narrow down in solving the problem.

BTW, when I did "make xconfig" on a fresh tarred of kernel source, I did get
the following [error] messages:

#####
#
# using defaults found in arch/i386/defconfig
#
arch/i386/defconfig:371: trying to assign nonexistent symbol
SCSI_QLA2XXX_CONFIG
arch/i386/defconfig:374: trying to assign nonexistent symbol SCSI_QLA23XX
arch/i386/defconfig:979: trying to assign nonexistent symbol USB_SCANNER
#####

I figured such [error] messages are not really important to my system. Does
yours show such [error] messages?

Geoff wrote:

--
root/administrator

Posted by Geoff on February 24th, 2004


On Tue, 24 Feb 2004 16:19:53 +0000, root/administrator wrote:


Excellent :-)

You are welcome. As always in these situations I have benefited by
learning new things in the process of trying to help.

I see the same errors when I use the default .config supplied with the
kernel. They are not present when I use my own custom .config in which I
don't have that SCSI device or a USB scanner defined.

Geoff