#16 Compile problem Edit

audigy
closed
Rui Sousa
install (14)
5
2012-07-08
2002-03-09
Anonymous
No

Hi,
The code assumes CONFIG_SMP is set in midi.c. It just
does a kernel_lock and kernel_unlock which uses the
kernel_flag. This flag is not available in a non SMP
kernel. #if CONFIG_SMP && (LINU... will make it compile
and work.
Thanks,
Andy

Discussion

  • Rui Sousa
    Rui Sousa
    2002-04-03

    Logged In: YES
    user_id=3329

    This is all controlled by the kernel headers.
    No modifications are needed.
    Which kernel source are you compiling againt?

     
  • Logged In: NO

    Hi,
    That's not true.
    The code always calles the lock and unlock functions.
    Linking these in will not work for non-SMP kernels. I
    just put an ifdef around the lock and unlock calls and
    then it works. It's true that it will compile but you won't
    be able to do insmod, because of kernel_flag being
    undefined.
    Thanks,
    Andy

     
  • Logged In: NO

    Hi,
    Yes I am using 2.4.9-31 sources from the RedHat
    Dristribution. Sorry I wanted to put this info into the last
    message.
    Thanks,
    Andy

     
  • Rui Sousa
    Rui Sousa
    2002-04-03

    Logged In: YES
    user_id=3329

    The actual lock, unlock function definition will change
    depending on your kernel config. Have a look at:

    /usr/src/linux-2.4/include/linux/smp_lock.h

    So, I believe there is still something screwed up in your
    setup...

    What's the output of:
    rpm -qa |grep kernel
    uname -a
    make clean && make (just the "KERNEL_VERSION := xxx" bit)
    what file did you use has /usr/src/linux-2.4/.config?

     
  • Logged In: NO

    Hi,
    Ok I give. I can no longer reproduce it. The problem
    however was not smp_lock.h, but somehow asm/
    smplock has been include from somewhere. I don't
    remember where. I know it's normally included from
    smp_lock.h. Sorry for the bother. I banged my head on
    this one for a while before I initially posted it, but now I
    can't make a repeatable failure anymore. My config.h
    specifically has #undef CONFIG_SMP in it, but when I
    hacked the sources I has put #if CONFIG_SMP so I
    may have have put #define CONFIG_SMP 0 to disable
    it instead of #undef. I don't recall.
    Thanks,
    Andy

     


Anonymous


Cancel   Add attachments