LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-29-2003, 11:26 PM   #1
maestro52
Member
 
Registered: Aug 2003
Location: Texas
Distribution: Fedora 9
Posts: 177

Rep: Reputation: 30
Angry I Failed Compiling Again!!!


I sure do9 hope I do not sound too loud, but I have tried and tried adn tried again - for the 16th time now - to compile the damn 2.4.22-21mm.1mdk source so I can have alsa functioning and I just cannot figure why it will not work! OK, OK! YES; I am a and probably a pretty stupid one at that, but I have gotten enough info from the net about how to compile the kernel that I could put together one hell of a book.

Still, the basics follow the same routine of make config or make menuconfig, upon completion of activating everything necessary for my Athlon K7 mb and processor, finally making sure my SB Live! is supported (so to speak), save everything, go to the makefile in /usr/src/linux (which has already been linked to 2.4.22-21mm.1mdk and change the version by adding -my1 to the end (it is suppo9sed to protect the original kernel source).

Then I type, make dep && make clean && make bzImage && make modules && make modules_install and THIS IS WHAT I GET;

vpi2.c:11:2: #error "This doesn't work yet."
make[3]: *** [vpi2.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.4.22-21mm.1mdk/drivers/scsi'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.22-21mm.1mdk/drivers/scsi'
make[1]: *** [_subdir_scsi] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.22-21mm.1mdk/drivers'
make: *** [_dir_drivers] Error 2


Now I have no idea of what I am supposed to do. I have had other errors before, but I did not think to save them. Instead of saving and calling for help, I just deleted what I could and started over. Of course, eventually, 3 times in fact, I had to completely reinstall mdk 9.2. I am hoping I am not going to have to do that again, but I REALLY NEED SOMEONE TO HELP ME: PLEEEEEEAAAAAAAAAAAASSSSSE??
 
Old 11-29-2003, 11:56 PM   #2
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
this usually happens when you have configured it wrong.
what are you using as a base for the configureing ?
are you doing it all youself from the defaults ?
if so, then thats a bad idea, especially your first time...

cd into /boot/
and look for a file called configure, or COnfig, somthing like that.
that file contains all the options that were used to configure the currently running kernel.
configure your kernel source with make xconfig, then click load from file, load the config file from /boot/ then make only the changes you need, (the alsa thing) (plus maybe a few other things, but unly if you are 100% sure what u are changing)
now try compiling, it should go quite smooth.
 
Old 11-30-2003, 02:55 AM   #3
maestro52
Member
 
Registered: Aug 2003
Location: Texas
Distribution: Fedora 9
Posts: 177

Original Poster
Rep: Reputation: 30
OK! I will try, BUT??

I have quite a lot of garbage on my computer at this time from all the darn screw up attempts at compiling this damn thing. All I want is to have my SB Live! functioning well and I need ALSA for that. I have the precompiled kernels for 2.4.21-0.13, 2.4.21-0.25, 2.4.22-21mm, and 2.4.22-21mdk-i686-up-4gb. I had a precompiled and source for 2.4.22-21 but when I attempted to compile the source it (for reasons I am not aware of) deleted most of the precompiled 2.4.22-21.

I have no idea where to find the failed compile, if anything exists from it, although it did change some things that forced me to reinstall KDE (I have no idea what happened). I made about 6 attempts to do the compile over with no success, in fact, changed my cdrw to a cdrom (in the mdk control center) and I do not know how to change it back (cannot find anything to tell me either). As such, my cdrw will only read music cd's. So I am quite desperate right now!!

As I said, I will attempt your suggestion, but I honestly believe I need to know how to clean out the bad compile attempts. I really think that even though the compiles are not complete that they have placed really bad info in my system. What do you think??

I probably should not have placed so many kernels in my computer, but I thought they would not affect each other and it appears that I am wrong.

Oh yes, being impatient, I found another advice column on how to compile the kernel that gave actual step by step diagram of the make menuconfig graphic. I followed it and received errors pertaining to the sound card stuff being incorrect, so I went back in and moduled everything pertaining to SB Live!. then I repeated the compile and received and error pertaining to the cryptography parts. So I went in and totally refused all crypto, but I still got the same error. SO, even though I am completely halting all work on that compile I really need to know what happened in case it happens on the next attempt at using your suggestion.

Here is the error:ME=cryptoapi -c cryptoapi/cryptoapi.c -o cryptoapi/cryptoapi.o
cryptoapi/cryptoapi.c:702: error: syntax error before "this_object_must_be_defined_as_export_objs_in_the_Makefile"
cryptoapi/cryptoapi.c:702: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile'
cryptoapi/cryptoapi.c:702: warning: data definition has no type or storage class
cryptoapi/cryptoapi.c:703: error: syntax error before "this_object_must_be_defined_as_export_objs_in_the_Makefile"
cryptoapi/cryptoapi.c:703: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile'
cryptoapi/cryptoapi.c:703: warning: data definition has no type or storage class
cryptoapi/cryptoapi.c:704: error: syntax error before "this_object_must_be_defined_as_export_objs_in_the_Makefile"
cryptoapi/cryptoapi.c:704: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile'
cryptoapi/cryptoapi.c:704: warning: data definition has no type or storage class
cryptoapi/cryptoapi.c:705: error: syntax error before "this_object_must_be_defined_as_export_objs_in_the_Makefile"
cryptoapi/cryptoapi.c:705: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile'
cryptoapi/cryptoapi.c:705: warning: data definition has no type or storage class
cryptoapi/cryptoapi.c:706: error: syntax error before "this_object_must_be_defined_as_export_objs_in_the_Makefile"
cryptoapi/cryptoapi.c:706: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile'
cryptoapi/cryptoapi.c:706: warning: data definition has no type or storage class
cryptoapi/cryptoapi.c:707: error: syntax error before "this_object_must_be_defined_as_export_objs_in_the_Makefile"
cryptoapi/cryptoapi.c:707: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile'
cryptoapi/cryptoapi.c:707: warning: data definition has no type or storage class
cryptoapi/cryptoapi.c:708: error: syntax error before "this_object_must_be_defined_as_export_objs_in_the_Makefile"
cryptoapi/cryptoapi.c:708: warning: type defaults to `int' in declaration of `this_object_must_be_defined_as_export_objs_in_the_Makefile'
cryptoapi/cryptoapi.c:708: warning: data definition has no type or storage class
make[2]: *** [cryptoapi/cryptoapi.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.22-21mm.1mdk/net'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.22-21mm.1mdk/net'
make: *** [_dir_net] Error 2


I first moduled the cryptography then said I did not want it at all. In both attempts I got the above error message. None of it makes any sense to me. Does it make any sense to you??
 
Old 11-30-2003, 08:11 AM   #4
maestro52
Member
 
Registered: Aug 2003
Location: Texas
Distribution: Fedora 9
Posts: 177

Original Poster
Rep: Reputation: 30
Thumbs up FANTASTIC!! THANKS qwijibow! Please read this.

I wish I had found you 2 weeks ago Your suggestion was perfect!! The compile worked! So I have copied and saved your advice for all my future compiles (at least until I get good at it) and altered the other compile instructions I had. As follows;
________________________________________________________________________________
1- download sources
* install the kernel sources of your distro. they will install in /usr/src/linux-version-number. You can also download a .tar.bz2 file at http://www.kernel.org. Go to /usr/src/, and extract it with "tar jxf linux-2.4.22.tar.bz2"
* create a symlink from /usr/src/linux-version-number to /usr/src/linux, for example:
ls -s /usr/src/linux-2.4.22 /usr/src/linux

2- cd into /boot/
and look for a file called Config,
that file contains all the options that were used to configure the currently running kernel.
configure your kernel source with make xconfig, then click load from file, load the config file from /boot/ then make only the changes you need, (the alsa thing) (plus maybe a few other things, but unly if you are 100% sure what u are changing)
now try compiling, it should go quite smooth.

* open /usr/src/linux/Makefile in a text editor, and upgrade the revision number, for example "-my1". (or you might overwrite your existing kernel modules)

compile it
* type these commands:
make dep
make clean
make bzImage
make modules

install it
make modules_install
cp /usr/src/linux/arch/i386/boot/bzImage /boot/linux-2.4.22-my1
cp /usr/src/linux/System.map /boot/System.map-2.4.22-my1
* create the links to System.map:
cd /boot
ln -s -f System.map-2.4.22-my1 System.map
* You may need to remove System.map first:
rm System.map
* update your boot loader.. (I'll assume it's lilo here)
edit /etc/lilo.conf, add another "image = /boot/linux-2.4.22-my1" line, etc..
* run lilo, and reboot.
________________________________________________________________________________

All of the above was easy as heck until I got to the lilo.conf. Mainly because in lilo.conf all the images are written as "image=/boot/vmlinuz-xxxxxx"

So I assume that the boot will work differently adn as such I have not rebooted yet. For the moment, I created the new image line taking the info I have, but it looks like this,
________________________________________________________________________________
image=/boot/linux-2.4.22-21mm.1mdk-my1
label=2422my1-21mm1
root=/dev/hda1
read-only
optional
vga=788
________________________________________________________________________________
More info on next message........please continue to read. THANKS
 
Old 11-30-2003, 08:28 AM   #5
maestro52
Member
 
Registered: Aug 2003
Location: Texas
Distribution: Fedora 9
Posts: 177

Original Poster
Rep: Reputation: 30
Smile Continued

While the others are like this;
________________________________________________________________________________
image=/boot/vmlinuz-2.4.22-21mm.1mdk
label=2422-21mm1
root=/dev/hda1
read-only
optional
vga=788
append=" quiet devfs=mount hdc=ide-scsi acpi=ht resume=/dev/hda5
splash=silent"
initrd=/boot/initrd-2.4.22-21mm.1mdk.img
________________________________________________________________________________
As the info I have combined states, I did the following,
edit /etc/lilo.conf, add another "image = /boot/linux-2.4.22-my1" line, etc..
and did the * run lilo", but did not reboot. Shouldn't there be a vmlinuz image for my compile to boot properly and how do I cause there to be one?

For the most part, everything has functioned well, but no vmlinuz has been created for my compile I am afraid to reboot until I know what how I can insure it will boot.

I will most certainly be happy to hear from anyone with good advice. I LOVE LINUXQUESTIONS:ORG

 
Old 11-30-2003, 10:13 AM   #6
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
lol... glad i could help

dont worry about the name of the image,
you can re-name it if you like...

i usually call my kernels 'kernel-2.4.xxxx'

and as for the lilo config, maybe you could try 'make install' as the final compile step ?
i use grub, and the make install command coppies all the relevant files into the correct place, AND adds an extra boot option in the grub config to boot the new kernel.
maybe it will detect you are using lilo and configure that accordingly.

some people recomend againsed the make install command, but its never gone wrong for me (redhat 9)

Last edited by qwijibow; 11-30-2003 at 10:15 AM.
 
Old 11-30-2003, 03:48 PM   #7
maestro52
Member
 
Registered: Aug 2003
Location: Texas
Distribution: Fedora 9
Posts: 177

Original Poster
Rep: Reputation: 30
compile worked, but boot did not

I took a chance and after making the lilo entry like this;

image=/boot/linux-2.4.22-21mm.1mdk-my1
label=2422my1-21mm1
root=/dev/hda1
read-only
optional
vga=788

I ran lilo and rebooted.

When the boot menu appeared there wasn't a 2.4.22-21mm.1mdk-my1. So I was not able touse the newly compiled kernel. Oddly enough, I thoguht I would see what the /bot/config file consisted of and it was exactly the way I compiled -my1. Not understanding what was happening I still decided to take care of my sound and such, if I could, and was successfully able to xconfig, but when I was done I did not think about loading that config file again. So it appears that I set up the sound for another config altogether, but while it was making and such I would notice it mention the -my1 kernel. Then when it completed successfully I told it to cp /usr/src/linux/arch/i386/boot/bzImage /boot/linux-2.4.22-my1
cp /usr/src/linux/System.map /boot/System.map-2.4.22-my1
* create the links to System.map:
cd /boot
ln -s -f System.map-2.4.22-my1 System.map
and did not need to place the image line in lilo since it was already there.

So at this point I am supposed to have modules in the kernel for sound, SB Live!, emu10k1, oss, and such. I reboot, but again, no option for my kernel in the menu. I get back to linus and there is still no alsa on my screen, oss functions, but that is it. WHat am I doing wrong that is not allowing the new kernel to be in the boot menu, yet appears to be in the boot config, System.map, and lilo??

I am taking a break now, I have been at this for two weeks but more intensely for 2 and a half days with no sleep this time around (I get quite involved ). Still, I sure hope you can continue to help me figure this out. I know I am missing something, but it sure is hiding well.

One more thought/question! You say I could make install. Would I need to do the compile procedure all over again first at this point? At the same time, if I must recompile can I use the same source I started with and still load the boot/config from the kernel I am in. Then, whether I do need to recompile or not, should I change my boot to grub first?

I have another question, but I will open another thread since this is large enough.
 
Old 11-30-2003, 04:10 PM   #8
maestro52
Member
 
Registered: Aug 2003
Location: Texas
Distribution: Fedora 9
Posts: 177

Original Poster
Rep: Reputation: 30
Another question

After I finally get another successful compile and have it successfully included in the boot, I need to take care of the sound/alsa/oss/emu10k1 modules. However, here is what has happened so far and I have no idea why.

The alsa source folders are in /usr/src. I configure/mak/make install them starting with the drivers, then the libs, then the utils. They appear to install with no errors. So then I type, " modprobe snd-emu10k1;modprobe snd-pcm-oss;modprobe snd-mixer-oss;modprobe snd-seq-oss" and get this,
[root@localhost linux]# modprobe snd-emu10k1;modprobe snd-pcm-oss;modprobe snd-mixer-oss;modprobe snd-seq-oss
/lib/modules/2.4.22-21mm.1mdk/kernel/sound/pci/emu10k1/snd-emu10k1.o.gz: init_module: No such device
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
You may find more information in syslog or the output from dmesg
modprobe: insmod /lib/modules/2.4.22-21mm.1mdk/kernel/sound/pci/emu10k1/snd-emu10k1.o.gz failed
modprobe: insmod snd-emu10k1 failed
/lib/modules/2.4.22-21mm.1mdk/kernel/sound/core/seq/oss/snd-seq-oss.o.gz: init_module: Device or resource busy
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
You may find more information in syslog or the output from dmesg
modprobe: insmod /lib/modules/2.4.22-21mm.1mdk/kernel/sound/core/seq/oss/snd-seq-oss.o.gz failed
modprobe: insmod snd-seq-oss failed

Now what??
 
Old 11-30-2003, 07:26 PM   #9
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
sorry, im lost.
i think its strange the alsa was not compiled into your kernel by default.
the redhat 9 kernel (from the install disk) supports alsa.

anyway.... how did you compile the alsa ?
did you compile into the kernel, or compile as a module ?

try compiling it as a module, some distro's assume certian things are compiled as modules, if you compile them into the source, the insmod will fail and programs may thing that feature is not available.

ohh, and sorry, when i said the /boot/Config file contained the options used to config the running kernel, i meant the kernel that was installed dureing the main linux install.

but anyway, im totally stumped, hopefully an Expert can help with the rest of your problems.
 
Old 12-01-2003, 01:09 AM   #10
Kroenecker
Member
 
Registered: May 2003
Location: The States
Distribution: Gentoo
Posts: 245

Rep: Reputation: 30
Maestro52,

I would go here.

http://www.alsa-project.org/alsa-doc...=emu10k1#intro

Read. Read. Read.

Or google alsa. Go to their website. Look for the creative labs info (that is what the link above is for) or whatever card you are using and then click on the details link. The intall information is very clearly written, I think.

Read. Read. Read.

Good luck!
 
Old 12-01-2003, 02:55 AM   #11
maestro52
Member
 
Registered: Aug 2003
Location: Texas
Distribution: Fedora 9
Posts: 177

Original Poster
Rep: Reputation: 30
Angry Not at all what I hoped for!

First, Kroenecker. I have been using the alsa web page for days now and it's guidelines are exactly what I followed. That data error I presented is from the code the alsa page told me to use. In fact, it oddly states that I do not have modprobe capabilities, yet prior to doing everything, I also did a modinfo soundcore comand and recieved info informing me of having a sound module.



Now, qwijibow. The alsa situation as well as my cdrw problem is a bit strange, but the whole deal goes like this.

I originally installed alsa 0.9.7 into my mdk 9.1 and it was a little rough but great. Then I updated to mdk 9.2 and lost alsa. The mdk 9.2 update had alsa 0.9.6 and somehow screwed the whole thing. Everytime I tried to reinstall the alsa 0.9.7 mdk would complain of conflicts between 0.9.6 and 0.9.7, but would not even attempt to remove anything to install something else. So I then decided to download and install the alsa 0.9.8 but have not been able to get it to function at all.

Here is somethig that may have some if not a lot to do with the problem, but I really do not know what to do other than reinstall mdk 9.2 and start completely from scratch this time, because (if I am correct) I would have to get rid of everything - including - mdk 9.1 to start fresh. I REALLY DO NOT WANT TO DO THAT; but what can I do?? To ge tto the point; Even though there are a few pieces of kernel 2.4.22-21 still in my computer (which was the main kernel from the mdk 9.2 update), it was damamged by rpmdrake and I think it had the modprobe, insmond and such in it. As such, when it was damaged (as I will explain in a sec) I think it left code to state that some things are in my computer (like a list or something) when they are not there anymore.

This is what happened! When I updated, not everything was installed. So I went to a mirror sight and got some rpms I needed. In the process I noticed some precompiled kernels and sources for things like 2.4.22-21mm and 2.4.22-21mdk-i686.up-4gb. To be the curious person I am I downloaded them to see if I might like one of them better than the normal 2.4.22-21. Here is where the problem came in and I did not think about it until it was too late, but before one of the kernels would downloadi rpmdrake said it had to remove 2.4.22-21 (I have no freaking idea why).

THAT IS WHERE THE WHOLE PROBLEM STARTED two weeks ago and I have been trying to get things reestablished (so to speak) ever since. In one case I seem to make things better, but then it gets screwed up more. I am not sure if this would work, because I now have alsa 0.9.8 directories and such in the system, but what do you think would happen if I tried to reinstall 2.4.22-21 from the mdk 9.2 cd's?? Do you think I have to start all over again?
 
Old 12-01-2003, 03:18 AM   #12
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
I have no experiance with Mandrake.
but it sounds like your system is getting very messy, with bits of kernel all over the place.

if i were in you situation, it might be best to cut your losses and re-install, rather than wast anouther 2 weeks trying to fix it.

if you back up all your work, it shouldnt take too long to re-install right ?

but im afraid i have no idea how to advise you. Sorry.
im still a newbie myself. this looks like a job for a GURU.
 
Old 12-01-2003, 01:49 PM   #13
maestro52
Member
 
Registered: Aug 2003
Location: Texas
Distribution: Fedora 9
Posts: 177

Original Poster
Rep: Reputation: 30
Thumbs down Buummmmmmeer!! Maybe one last request??

I was honestly expecting you and everyone else to tell me to start over, but I was praying for a miracle solution. So let me ask one more question. Do I understand the kernel/kernel -source basics correctly

The kernel-source is made so we can tear it apart, put it back together, change it, and do just about anything with it if we are knowlegeable enough to do so. Correct?

On the other hand, what about the precompiled kernel? Does it also have a make menuconfig? i ask that because it appears that while the kernel is precompiled it is almost always set to function with a Pentium 3, 4, or more computer. So while, my computer is a self constructed ASRock k7vm2 Athlon/Duron XL computer it does work, but I would imagine it would work MUCH better if Linux is tagged for Athlon instead.

So the final part of my curiousity is this, for newbies such as myself, wouldn't it be much simpler to take the precompiled kernel and just go to the menuconfig and adjust those particular small although significant areas like the specific CPU?? On the other hand, is that what the source is supposed to be doing, but because I am not a computer geek enough to understand all aspects of the system that I mistakingly module or not module something i shouldn't and it thus doesn't make properly??

If the latter is the case, I suppose I need another computer just to use as my linux experiment unit and use the other one for whatever precompiled system even if it only works the basics. What do you or anyone else think?
 
Old 12-06-2003, 07:59 PM   #14
AwoLtheMighty
LQ Newbie
 
Registered: Nov 2003
Posts: 14

Rep: Reputation: 0
I'm having a problem compiling my kernel on a Redhat 7 computer. I'm still at the beginning of the post however. Apparently I configured my new Kernel incorrectly, but I can't find a Configure or COnfig or anything like that in my /boot directory. Where else might the old kernel configuration be kept? Would it be in a different file name?

By the way, I'm way new to this, this was my first attempt. Also, I'm running kernel 2.2.16 now and I'm trying to recompile with 2.4.23. Thanks.
 
Old 12-06-2003, 10:23 PM   #15
fr0zen
Member
 
Registered: Nov 2003
Location: 127.0.0.1
Distribution: xubuntu
Posts: 217

Rep: Reputation: 30
I read your first post and it looked familiar to what I encountered. I found that if I have my processor OC'd (that is, my FSB running higher than it was intended) GCC would produce compiler errors during particular sections when compiling the kernel.

Wasn't overheating, termperature remained around 39C. But, could have caused memory issues that affected the stability of GCC. I simply restored the settings to a more stable level, and the compile proceeded successfully.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel Filter Failed error while compiling packet capturing code on FC2 Prakhardeep Programming 3 08-10-2011 05:55 AM
Both kernels 2.4 & 2.6 failed loading after compiling 2.6 ernesto_lelo Slackware 12 10-28-2004 06:48 PM
2.6.8 kernel compiling failed kpachopoulos Linux - Newbie 3 08-26-2004 02:48 PM
LEX failed during compiling GIMP, MDK 9.2 Ygarl Linux - Software 1 05-06-2004 09:05 PM
Compiling module-init-tools-3.0 Failed farmerdan Linux - General 4 03-02-2004 07:42 PM


All times are GMT -5. The time now is 06:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration