kqemu - Slackware

This is a discussion on kqemu - Slackware ; hello, I want to install qemu and the kqemu module. So I installed gcc-3 from /pasture to compil qemu (because it is not gcc-4 compliant), and qemu works fine. I'm trying to compil kqemu, but I cannot load it FATAL: ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: kqemu

  1. kqemu

    hello,

    I want to install qemu and the kqemu module.

    So I installed gcc-3 from /pasture to compil qemu (because it is not
    gcc-4 compliant), and qemu works fine.

    I'm trying to compil kqemu, but I cannot load it
    FATAL: Error inserting kqemu (/lib/modules/2.6.21.5/misc/
    kqemu.ko): Invalid module format

    I try to compil with gcc-3 but also with gcc-4 (the one provide in
    slackware, I think the same with the kernel is compiled), and I try to
    use CFLAGS optimisations or not. I all case, I've got the same error.

    What can I do ?

    thx

  2. Re: kqemu

    Jerome Prior wrote:
    > hello,
    >
    > I want to install qemu and the kqemu module.
    >
    > So I installed gcc-3 from /pasture to compil qemu (because it is not
    > gcc-4 compliant), and qemu works fine.
    >
    > I'm trying to compil kqemu, but I cannot load it
    > FATAL: Error inserting kqemu (/lib/modules/2.6.21.5/misc/
    > kqemu.ko): Invalid module format
    >
    > I try to compil with gcc-3 but also with gcc-4 (the one provide in
    > slackware, I think the same with the kernel is compiled), and I try to
    > use CFLAGS optimisations or not. I all case, I've got the same error.
    >
    > What can I do ?
    >
    > thx


    Do you run a non-SMP kernel (2.6.21.5 instead of 2.6.21.5-smp)? If so,
    you need to "patch" your kernel sources in /usr/src/linux-2.6.21.5 so
    that they will build modules for your non-SMP kernel. The
    kernel-source package which was installed by Slackware is for SMP
    kernels. If you use these default kernel sources it will fail to
    produce kernel modules that work with a non-SMP kernel.

    What you need to "fix" your kernel sources, is available in the /extra
    directory of your Slackware DVD / CD set. For an online mirror of this
    "nosmp-sdk", see for instance:
    http://slackware.osuosl.org/slackwar...1.5-nosmp-sdk/
    It comes with instructions.

    By the way, pre-compiled packages for QEMU and kqemu can be found at
    http://www.slackware.com/~alien/slackbuilds/qemu/

    Also, I must mention that you effectively removed your gcc4 compiler
    when you installed gcc3 from the /pasture directory. This may give you
    problems in future.
    If you re-install the gcc4 from Slackware 12.0 CD and then _also_
    install (i.e. use installpkg not upgradepkg) this package:
    http://www.slackware.com/~alien/slackbuilds/gcc34/ you will get a gcc3
    compiler alongside gcc4. The QEMU configure program will detect this
    gcc3 compiler and will use it too. The kqemu (and other programs) will
    keep using the default gcc4 compiler as always.
    Remember to logoff and login again after installing this gcc34
    package, so that your environment variables will be setup correctly.

    Eric

  3. Re: kqemu

    Le Sun, 23 Dec 2007 21:14:22 +0100, Eric Hameleers a √©crit¬*:

    > Jerome Prior wrote:
    >> hello,
    >>
    >> I want to install qemu and the kqemu module.
    >>
    >> So I installed gcc-3 from /pasture to compil qemu (because it is not
    >> gcc-4 compliant), and qemu works fine.
    >>
    >> I'm trying to compil kqemu, but I cannot load it
    >> FATAL: Error inserting kqemu (/lib/modules/2.6.21.5/misc/
    >> kqemu.ko): Invalid module format
    >>
    >> I try to compil with gcc-3 but also with gcc-4 (the one provide in
    >> slackware, I think the same with the kernel is compiled), and I try to
    >> use CFLAGS optimisations or not. I all case, I've got the same error.
    >>
    >> What can I do ?
    >>
    >> thx

    >
    > Do you run a non-SMP kernel (2.6.21.5 instead of 2.6.21.5-smp)? If so,
    > you need to "patch" your kernel sources in /usr/src/linux-2.6.21.5 so
    > that they will build modules for your non-SMP kernel. The kernel-source
    > package which was installed by Slackware is for SMP kernels. If you use
    > these default kernel sources it will fail to produce kernel modules that
    > work with a non-SMP kernel.


    yes I run a non-smp kernel, my proc is a Athlon XP, year 2001, a very
    good year for wine ... and cpu.

    >
    > What you need to "fix" your kernel sources, is available in the /extra
    > directory of your Slackware DVD / CD set. For an online mirror of this
    > "nosmp-sdk", see for instance:
    > http://slackware.osuosl.org/slackwar....6.21.5-nosmp-

    sdk/
    > It comes with instructions.


    thx, I go and try this right now.

    > By the way, pre-compiled packages for QEMU and kqemu can be found at
    > http://www.slackware.com/~alien/slackbuilds/qemu/
    >
    > Also, I must mention that you effectively removed your gcc4 compiler
    > when you installed gcc3 from the /pasture directory. This may give you
    > problems in future.
    > If you re-install the gcc4 from Slackware 12.0 CD and then _also_
    > install (i.e. use installpkg not upgradepkg) this package:
    > http://www.slackware.com/~alien/slackbuilds/gcc34/ you will get a gcc3
    > compiler alongside gcc4. The QEMU configure program will detect this
    > gcc3 compiler and will use it too. The kqemu (and other programs) will
    > keep using the default gcc4 compiler as always. Remember to logoff and
    > login again after installing this gcc34 package, so that your
    > environment variables will be setup correctly.


    I use a different way to use gcc-3 for qemu : I install it on a tempory
    directory, just time to compil :
    installpkg -root /tmp/coincoin gcc-3*tgz
    and I use the option provide by qemu :
    ./configure --cc=/tmp/coincoin/usr/bin/gcc --my-others --options
    It seems to works fine, and I do not act on my system.

    Thx for this kernel tips.

    --
    Jerome Prior

+ Reply to Thread