Menu

#14 mtrr.c bug

open
nobody
CPU Backend (2)
5
2012-12-11
2004-05-23
Anonymous
No

in mtrr.c the file asm/mtrr.h is included. in kernel
2.4 it contained the
mtrr_strings array. in 2.6, the array is not there any
more, so the compile fails.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    the mtrr.c is src/backends/CPU/mtrr.c
    the mtrr_string array in kernel 2.6 is now an extern char**
    only available
    if #define __KERNEL__

     
  • Dennis

    Dennis - 2004-07-15

    Logged In: YES
    user_id=53417

    I get the same (I think) error. This on 2.6.8-rc1-beta. The relevant
    part follows;

    gcc -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -Wall -W -O2
    -g -Wall -W -fno-common -I/usr/include/libxml2
    -DPT_DATADIR=\"/usr/share/powertweak\"
    -I/usr/include/libxml2/libxml -c mtrr.c -fPIC -DPIC -o .libs/mtrr.lo
    mtrr.c: In function `ShowMTRRInfo':
    mtrr.c:68: warning: long int format, unsigned int arg (arg 3)
    mtrr.c:76: error: `mtrr_strings' undeclared (first use in this function)
    mtrr.c:76: error: (Each undeclared identifier is reported only once
    mtrr.c:76: error: for each function it appears in.)
    make[5]: *** [mtrr.lo] Error 1
    make[5]: Leaving directory
    `/usr/src/powertweak-0.99.5/src/backends/CPU/x86'
    make[4]: *** [all-recursive] Error 1
    make[4]: Leaving directory
    `/usr/src/powertweak-0.99.5/src/backends/CPU/x86'
    make[3]: *** [all-recursive] Error 1
    make[3]: Leaving directory
    `/usr/src/powertweak-0.99.5/src/backends/CPU'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory
    `/usr/src/powertweak-0.99.5/src/backends'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/usr/src/powertweak-0.99.5/src'
    make: *** [all-recursive] Error 1

     
  • Dennis

    Dennis - 2004-08-13

    Logged In: YES
    user_id=53417

    On 2.6.8-rc4-beta I get a similar error;

    gcc -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -Wall -W -O2
    -g -Wall -W -fno-common -I/usr/include/libxml2
    -DPT_DATADIR=\"/usr/share/powertweak\"
    -I/usr/include/libxml2/libxml -c mtrr.c -fPIC -DPIC -o .libs/mtrr.lo
    mtrr.c: In function `ShowMTRRInfo':
    mtrr.c:68: warning: long int format, unsigned int arg (arg 3)
    mtrr.c:76: error: `mtrr_strings' undeclared (first use in this
    function)
    mtrr.c:76: error: (Each undeclared identifier is reported only once
    mtrr.c:76: error: for each function it appears in.)
    make[5]: *** [mtrr.lo] Error 1
    make[5]: Leaving directory
    `/usr/src/powertweak-0.99.5/src/backends/CPU/x86'
    make[4]: *** [all-recursive] Error 1
    make[4]: Leaving directory
    `/usr/src/powertweak-0.99.5/src/backends/CPU/x86'
    make[3]: *** [all-recursive] Error 1
    make[3]: Leaving directory
    `/usr/src/powertweak-0.99.5/src/backends/CPU'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory
    `/usr/src/powertweak-0.99.5/src/backends'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/usr/src/powertweak-0.99.5/src'
    make: *** [all-recursive] Error 1

     

Log in to post a comment.