2018-04-14 09:45:11

by Teck Choon Giam

[permalink] [raw]
Subject: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared

Hi,

Compile linux-4.9.94 will have error related to KMOD_DECOMP_LEN
undeclared. Searching string related to KMOD_DECOMP_LEN in
linux-4.9.94 and linux-4.15.17 sources as below:

<mock-chroot>sh-4.2# grep -r KMOD_DECOMP_LEN ./linux-4.15.17
./linux-4.15.17/tools/perf/tests/code-reading.c: char
decomp_name[KMOD_DECOMP_LEN];
./linux-4.15.17/tools/perf/util/dso.h:#define KMOD_DECOMP_LEN
sizeof(KMOD_DECOMP_NAME)
./linux-4.15.17/tools/perf/util/annotate.c: char tmp[KMOD_DECOMP_LEN];
./linux-4.15.17/tools/perf/util/dso.c: char newpath[KMOD_DECOMP_LEN];
sh-4.2# grep -r KMOD_DECOMP_LEN ./linux-4.9.94
./linux-4.9.94/tools/perf/tests/code-reading.c: char
decomp_name[KMOD_DECOMP_LEN];
./linux-4.9.94/tools/perf/util/dso.c: char newpath[KMOD_DECOMP_LEN];

So I guess for linux-4.9.94 has not define KMOD_DECOMP_LEN in
tools/perf/util/dso.h?

Thanks.

Regards,
Giam Teck Choon


2018-04-14 17:33:50

by Akemi Yagi

[permalink] [raw]
Subject: Re: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared

On Sat, 14 Apr 2018 17:41:13 +0800, Teck Choon Giam wrote:

> Hi,
>
> Compile linux-4.9.94 will have error related to KMOD_DECOMP_LEN
> undeclared. Searching string related to KMOD_DECOMP_LEN in
> linux-4.9.94 and linux-4.15.17 sources as below:
>
> <mock-chroot>sh-4.2# grep -r KMOD_DECOMP_LEN ./linux-4.15.17
> ./linux-4.15.17/tools/perf/tests/code-reading.c: char
> decomp_name[KMOD_DECOMP_LEN];
> ./linux-4.15.17/tools/perf/util/dso.h:#define KMOD_DECOMP_LEN
> sizeof(KMOD_DECOMP_NAME)
> ./linux-4.15.17/tools/perf/util/annotate.c: char tmp[KMOD_DECOMP_LEN];
> ./linux-4.15.17/tools/perf/util/dso.c: char newpath[KMOD_DECOMP_LEN];
> sh-4.2# grep -r KMOD_DECOMP_LEN ./linux-4.9.94
> ./linux-4.9.94/tools/perf/tests/code-reading.c: char
> decomp_name[KMOD_DECOMP_LEN];
> ./linux-4.9.94/tools/perf/util/dso.c: char newpath[KMOD_DECOMP_LEN];
>
> So I guess for linux-4.9.94 has not define KMOD_DECOMP_LEN in
> tools/perf/util/dso.h?
>
> Thanks.
>
> Regards,
> Giam Teck Choon

Just a note to say that we (ELRepo) see the same error when building kernel-4.4.128 on RHEL 6 and RHEL 7. Kernel 4.4.127 built fine.

Akemi
The ELRepo Project


2018-04-20 09:30:41

by Teck Choon Giam

[permalink] [raw]
Subject: Re: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared

HI,

> <mock-chroot>sh-4.2# grep -r KMOD_DECOMP_LEN ./linux-4.15.17
> ./linux-4.15.17/tools/perf/tests/code-reading.c: char
> decomp_name[KMOD_DECOMP_LEN];
> ./linux-4.15.17/tools/perf/util/dso.h:#define KMOD_DECOMP_LEN
> sizeof(KMOD_DECOMP_NAME)
> ./linux-4.15.17/tools/perf/util/annotate.c: char tmp[KMOD_DECOMP_LEN];
> ./linux-4.15.17/tools/perf/util/dso.c: char newpath[KMOD_DECOMP_LEN];
> sh-4.2# grep -r KMOD_DECOMP_LEN ./linux-4.9.94
> ./linux-4.9.94/tools/perf/tests/code-reading.c: char
> decomp_name[KMOD_DECOMP_LEN];
> ./linux-4.9.94/tools/perf/util/dso.c: char newpath[KMOD_DECOMP_LEN];
>
> So I guess for linux-4.9.94 has not define KMOD_DECOMP_LEN in
> tools/perf/util/dso.h?

grep -r KMOD_DECOMP_LEN ./linux-4.9.95
./linux-4.9.95/tools/perf/util/dso.c: char newpath[KMOD_DECOMP_LEN];

linux-4.9.95 still can't compile for tools/perf:

util/dso.c:370:16: error: 'KMOD_DECOMP_LEN' undeclared (first use in
this function)
make[3]: *** [util/dso.o] Error 1
make[2]: *** [util] Error 2
make[1]: *** [libperf-in.o] Error 2
make: *** [all] Error 2

Thanks.

Regards,
Giam Teck Choon

2018-04-27 17:30:02

by Randy Dunlap

[permalink] [raw]
Subject: Re: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared

[adding some Cc:]

On 04/14/2018 02:41 AM, Teck Choon Giam wrote:
> Hi,
>
> Compile linux-4.9.94 will have error related to KMOD_DECOMP_LEN
> undeclared. Searching string related to KMOD_DECOMP_LEN in
> linux-4.9.94 and linux-4.15.17 sources as below:
>
> <mock-chroot>sh-4.2# grep -r KMOD_DECOMP_LEN ./linux-4.15.17
> ./linux-4.15.17/tools/perf/tests/code-reading.c: char
> decomp_name[KMOD_DECOMP_LEN];
> ./linux-4.15.17/tools/perf/util/dso.h:#define KMOD_DECOMP_LEN
> sizeof(KMOD_DECOMP_NAME)
> ./linux-4.15.17/tools/perf/util/annotate.c: char tmp[KMOD_DECOMP_LEN];
> ./linux-4.15.17/tools/perf/util/dso.c: char newpath[KMOD_DECOMP_LEN];
> sh-4.2# grep -r KMOD_DECOMP_LEN ./linux-4.9.94
> ./linux-4.9.94/tools/perf/tests/code-reading.c: char
> decomp_name[KMOD_DECOMP_LEN];
> ./linux-4.9.94/tools/perf/util/dso.c: char newpath[KMOD_DECOMP_LEN];
>
> So I guess for linux-4.9.94 has not define KMOD_DECOMP_LEN in
> tools/perf/util/dso.h?


4.9.9[456] lack:
#define KMOD_DECOMP_NAME "/tmp/perf-kmod-XXXXXX"
#define KMOD_DECOMP_LEN sizeof(KMOD_DECOMP_NAME)


However, the commit that added those macros does not apply cleanly to 4.9.96.

commit 42b3fa670825983fc8bd0ac7b80cc84ae3abb75b
Author: Namhyung Kim <[email protected]>
Date: Thu Jun 8 16:31:03 2017 +0900

perf tools: Introduce dso__decompress_kmodule_{fd,path}


--
~Randy

2018-04-28 05:02:02

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared

On Fri, Apr 27, 2018 at 10:28:27AM -0700, Randy Dunlap wrote:
> [adding some Cc:]
>
> On 04/14/2018 02:41 AM, Teck Choon Giam wrote:
> > Hi,
> >
> > Compile linux-4.9.94 will have error related to KMOD_DECOMP_LEN
> > undeclared. Searching string related to KMOD_DECOMP_LEN in
> > linux-4.9.94 and linux-4.15.17 sources as below:
> >
> > <mock-chroot>sh-4.2# grep -r KMOD_DECOMP_LEN ./linux-4.15.17
> > ./linux-4.15.17/tools/perf/tests/code-reading.c: char
> > decomp_name[KMOD_DECOMP_LEN];
> > ./linux-4.15.17/tools/perf/util/dso.h:#define KMOD_DECOMP_LEN
> > sizeof(KMOD_DECOMP_NAME)
> > ./linux-4.15.17/tools/perf/util/annotate.c: char tmp[KMOD_DECOMP_LEN];
> > ./linux-4.15.17/tools/perf/util/dso.c: char newpath[KMOD_DECOMP_LEN];
> > sh-4.2# grep -r KMOD_DECOMP_LEN ./linux-4.9.94
> > ./linux-4.9.94/tools/perf/tests/code-reading.c: char
> > decomp_name[KMOD_DECOMP_LEN];
> > ./linux-4.9.94/tools/perf/util/dso.c: char newpath[KMOD_DECOMP_LEN];
> >
> > So I guess for linux-4.9.94 has not define KMOD_DECOMP_LEN in
> > tools/perf/util/dso.h?
>
>
> 4.9.9[456] lack:
> #define KMOD_DECOMP_NAME "/tmp/perf-kmod-XXXXXX"
> #define KMOD_DECOMP_LEN sizeof(KMOD_DECOMP_NAME)
>
>
> However, the commit that added those macros does not apply cleanly to 4.9.96.
>
> commit 42b3fa670825983fc8bd0ac7b80cc84ae3abb75b
> Author: Namhyung Kim <[email protected]>
> Date: Thu Jun 8 16:31:03 2017 +0900
>
> perf tools: Introduce dso__decompress_kmodule_{fd,path}

This should now be fixed in the latest 4.9.y -rc release, right?

If not, please let me know as I though I resolved this problem there...

thanks,

greg k-h

2018-04-28 06:11:33

by Randy Dunlap

[permalink] [raw]
Subject: Re: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared

On 04/27/2018 10:00 PM, Greg Kroah-Hartman wrote:
> On Fri, Apr 27, 2018 at 10:28:27AM -0700, Randy Dunlap wrote:
>> [adding some Cc:]
>>
>> On 04/14/2018 02:41 AM, Teck Choon Giam wrote:
>>> Hi,
>>>
>>> Compile linux-4.9.94 will have error related to KMOD_DECOMP_LEN
>>> undeclared. Searching string related to KMOD_DECOMP_LEN in
>>> linux-4.9.94 and linux-4.15.17 sources as below:
>>>
>>> <mock-chroot>sh-4.2# grep -r KMOD_DECOMP_LEN ./linux-4.15.17
>>> ./linux-4.15.17/tools/perf/tests/code-reading.c: char
>>> decomp_name[KMOD_DECOMP_LEN];
>>> ./linux-4.15.17/tools/perf/util/dso.h:#define KMOD_DECOMP_LEN
>>> sizeof(KMOD_DECOMP_NAME)
>>> ./linux-4.15.17/tools/perf/util/annotate.c: char tmp[KMOD_DECOMP_LEN];
>>> ./linux-4.15.17/tools/perf/util/dso.c: char newpath[KMOD_DECOMP_LEN];
>>> sh-4.2# grep -r KMOD_DECOMP_LEN ./linux-4.9.94
>>> ./linux-4.9.94/tools/perf/tests/code-reading.c: char
>>> decomp_name[KMOD_DECOMP_LEN];
>>> ./linux-4.9.94/tools/perf/util/dso.c: char newpath[KMOD_DECOMP_LEN];
>>>
>>> So I guess for linux-4.9.94 has not define KMOD_DECOMP_LEN in
>>> tools/perf/util/dso.h?
>>
>>
>> 4.9.9[456] lack:
>> #define KMOD_DECOMP_NAME "/tmp/perf-kmod-XXXXXX"
>> #define KMOD_DECOMP_LEN sizeof(KMOD_DECOMP_NAME)
>>
>>
>> However, the commit that added those macros does not apply cleanly to 4.9.96.
>>
>> commit 42b3fa670825983fc8bd0ac7b80cc84ae3abb75b
>> Author: Namhyung Kim <[email protected]>
>> Date: Thu Jun 8 16:31:03 2017 +0900
>>
>> perf tools: Introduce dso__decompress_kmodule_{fd,path}
>
> This should now be fixed in the latest 4.9.y -rc release, right?
>
> If not, please let me know as I though I resolved this problem there...

It still fails in 4.9.96. (not #defined there)

--
~Randy

2018-04-28 08:12:58

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared

On Fri, Apr 27, 2018 at 11:09:56PM -0700, Randy Dunlap wrote:
> On 04/27/2018 10:00 PM, Greg Kroah-Hartman wrote:
> > On Fri, Apr 27, 2018 at 10:28:27AM -0700, Randy Dunlap wrote:
> >> [adding some Cc:]
> >>
> >> On 04/14/2018 02:41 AM, Teck Choon Giam wrote:
> >>> Hi,
> >>>
> >>> Compile linux-4.9.94 will have error related to KMOD_DECOMP_LEN
> >>> undeclared. Searching string related to KMOD_DECOMP_LEN in
> >>> linux-4.9.94 and linux-4.15.17 sources as below:
> >>>
> >>> <mock-chroot>sh-4.2# grep -r KMOD_DECOMP_LEN ./linux-4.15.17
> >>> ./linux-4.15.17/tools/perf/tests/code-reading.c: char
> >>> decomp_name[KMOD_DECOMP_LEN];
> >>> ./linux-4.15.17/tools/perf/util/dso.h:#define KMOD_DECOMP_LEN
> >>> sizeof(KMOD_DECOMP_NAME)
> >>> ./linux-4.15.17/tools/perf/util/annotate.c: char tmp[KMOD_DECOMP_LEN];
> >>> ./linux-4.15.17/tools/perf/util/dso.c: char newpath[KMOD_DECOMP_LEN];
> >>> sh-4.2# grep -r KMOD_DECOMP_LEN ./linux-4.9.94
> >>> ./linux-4.9.94/tools/perf/tests/code-reading.c: char
> >>> decomp_name[KMOD_DECOMP_LEN];
> >>> ./linux-4.9.94/tools/perf/util/dso.c: char newpath[KMOD_DECOMP_LEN];
> >>>
> >>> So I guess for linux-4.9.94 has not define KMOD_DECOMP_LEN in
> >>> tools/perf/util/dso.h?
> >>
> >>
> >> 4.9.9[456] lack:
> >> #define KMOD_DECOMP_NAME "/tmp/perf-kmod-XXXXXX"
> >> #define KMOD_DECOMP_LEN sizeof(KMOD_DECOMP_NAME)
> >>
> >>
> >> However, the commit that added those macros does not apply cleanly to 4.9.96.
> >>
> >> commit 42b3fa670825983fc8bd0ac7b80cc84ae3abb75b
> >> Author: Namhyung Kim <[email protected]>
> >> Date: Thu Jun 8 16:31:03 2017 +0900
> >>
> >> perf tools: Introduce dso__decompress_kmodule_{fd,path}
> >
> > This should now be fixed in the latest 4.9.y -rc release, right?
> >
> > If not, please let me know as I though I resolved this problem there...
>
> It still fails in 4.9.96. (not #defined there)

Should be fixed in 4.9.97-r1, I know .96 still had the issue.

thanks,

greg k-h

2018-04-28 11:56:56

by Teck Choon Giam

[permalink] [raw]
Subject: Re: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared

>> It still fails in 4.9.96. (not #defined there)
>
> Should be fixed in 4.9.97-r1, I know .96 still had the issue.
>

Test compiled without issue for 4.9.97-rc1:

wget https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/snapshot/linux-stable-rc-linux-4.9.y.tar.gz
tar zxvfp linux-stable-rc-linux-4.9.y.tar.gz
cd linux-stable-rc-linux-4.9.y/
make mrproper
cp -pvf ~/config-x86_64 .config
make oldconfig
make bzImage
make V=1 -j 2 modules
make -C tools/perf V=1 HAVE_CPLUS_DEMANGLE=1 NO_DWARF=1 WERROR=0

Thanks Greg.

Regards,
Giam Teck Choon

2018-04-28 11:59:46

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared

On Sat, Apr 28, 2018 at 07:54:36PM +0800, Teck Choon Giam wrote:
> >> It still fails in 4.9.96. (not #defined there)
> >
> > Should be fixed in 4.9.97-r1, I know .96 still had the issue.
> >
>
> Test compiled without issue for 4.9.97-rc1:
>
> wget https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/snapshot/linux-stable-rc-linux-4.9.y.tar.gz
> tar zxvfp linux-stable-rc-linux-4.9.y.tar.gz
> cd linux-stable-rc-linux-4.9.y/
> make mrproper
> cp -pvf ~/config-x86_64 .config
> make oldconfig
> make bzImage
> make V=1 -j 2 modules
> make -C tools/perf V=1 HAVE_CPLUS_DEMANGLE=1 NO_DWARF=1 WERROR=0

Wonderful, thanks for testing.

greg k-h