LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Errors compiling 2.4 kernel on slackware 11 for openmosix (http://www.linuxquestions.org/questions/slackware-14/errors-compiling-2-4-kernel-on-slackware-11-for-openmosix-600506/)

Falcon006 11-17-2007 11:29 PM

Errors compiling 2.4 kernel on slackware 11 for openmosix
 
So basically I want to be able to compile the 2.4.26 kernel on my laptop to connect to a cluster. My laptop is running Slackware 11. Hereís the story...

The cluster is good to go, it is using Slackware 10.2 which has gcc 3.3.6. I tried to compile the 2.4 kernel on my Slackware 11 and it wouldnít get very far. It complains about a _exit(). I did a little research and found that the newer GCC 4.x cant compile the older 2.4.x. So I looked into compiling the older GCC (3.3.6). That compiles fine. I installed it into a separate location so it wonít screw with my current compiler. I used export to set CC.

Code:

export CC=/opt/gcc-3.3.6/bin/gcc
This didnít seem to change anything when I tried to compile 2.4 kernel. I then change the current gcc symbolic link to the gcc 3.3.6 location.

This works a little differently. I now get a message like this:

Code:

{standard input}:1797 Error: suffix or operands invalid for `mov`
I think this is the AS (portable GNU assembler) or is it still the compiler?

I moved on to a different approach, maybe I can just copy the precompiled kernel from the 10.2 machine. This will boot, but it stops right at the Freeing unused kernel memory. No errors or warning. I then tried passing in a parameter to the kernel
Code:

        init = /bin/bash
Right after the Freeing unused memory it will give a error: Kernel too old!


I understand that there is some kind of dependencies between libc and the kernel, but Iím kind of confused on how this works. I know the easiest way is to go back to the old 10.2 Slackware, but I would like to keep Slackware 11 if it is at all possible. You guys have any ideas on how I should go about this? Thanks

-Nick

Simon Bridge 11-18-2007 02:58 AM

Quote:

I did a little research and found that the newer GCC 4.x cant compile the older 2.4.x.
Doesn't seem to apply to 2.4.34 or later though.

Usually, configure has options which allow you to modify the compile for things like different compilers.

But, basically, we need the command you issues as well as the exact error message.
Here's commentary on the last message you supplied:
http://kerneltrap.org/node/5785

Kernel too old?
http://osdir.com/ml/bbc.general/2003-03/msg00015.html
... like that?

Do your headers match the kernel?

Falcon006 11-19-2007 03:14 PM

I'm trying to compile the 2.4.26 kernel so i used the following commands to compile it.

Code:

Make mrproper
Make menuconfig
make dep
make bzimage
make modules
make modules_install

make bzImage is as far as i can get. The error looks like this.
Code:

{standard input}: Assembler messages:
{standard input}:843: Error: suffix or operands invalid for `mov'
{standard input}:844: Error: suffix or operands invalid for `mov'
{standard input}:938: Error: suffix or operands invalid for `mov'
{standard input}:939: Error: suffix or operands invalid for `mov'
{standard input}:989: Error: suffix or operands invalid for `mov'
{standard input}:990: Error: suffix or operands invalid for `mov'
{standard input}:992: Error: suffix or operands invalid for `mov'
{standard input}:1004: Error: suffix or operands invalid for `mov'
make[1]: *** [process.o] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.26/arch/i386/kernel'
make: *** [_dir_arch/i386/kernel] Error 2


I looked at your link and it seems like AS (assembler) handles that code execution. I'm going to try patching it. Hopefully it wont take to much modifying.

Alien_Hominid 11-19-2007 03:38 PM

Why can't you go up to 2.4.34. It's better than patching.

Falcon006 11-19-2007 10:05 PM

Yeah, I agree. unfortunately there is no support for that kernel. The openMosix team disbanded. They have a 2.6 version, but it is a beta.

Simon Bridge 11-20-2007 02:20 AM

http://linuxfromscratch.org/pipermai...er/002444.html
... binutils?

gnashley 11-20-2007 03:32 AM

If you are using Slack-11.0, then you should be able to run the standard gcc-3.4.6 compiler to compile the older. Also instead of doing this:

export CC=/opt/gcc-3.3.6/bin/gcckernel

do this:

export PATH=/opt/gcc-3.3.6/bin/gcckernel:$PATH

Falcon006 11-21-2007 02:13 AM

I got it to compile! But when i boot off the newly builded kernel it just stops right after "freed memory".

I installed a older binutil and linked AS to where I installed it. I also got a older depmod. After running install_modules it would complain about depmod not being old enough.

I'm kind of at a lost. Is GCC version the same as a kernel header? The kernel was builded with GCC 3.4 and everything else was built with GCC 4.X. Is this not allowed?


All times are GMT -5. The time now is 12:08 AM.