LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared
@ 2018-04-14  9:41 Teck Choon Giam
  2018-04-14 17:29 ` Akemi Yagi
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Teck Choon Giam @ 2018-04-14  9:41 UTC (permalink / raw)
  To: LKML

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared
  2018-04-14  9:41 kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared Teck Choon Giam
@ 2018-04-14 17:29 ` Akemi Yagi
  2018-04-20  9:29 ` Teck Choon Giam
  2018-04-27 17:28 ` Randy Dunlap
  2 siblings, 0 replies; 9+ messages in thread
From: Akemi Yagi @ 2018-04-14 17:29 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared
  2018-04-14  9:41 kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared Teck Choon Giam
  2018-04-14 17:29 ` Akemi Yagi
@ 2018-04-20  9:29 ` Teck Choon Giam
  2018-04-27 17:28 ` Randy Dunlap
  2 siblings, 0 replies; 9+ messages in thread
From: Teck Choon Giam @ 2018-04-20  9:29 UTC (permalink / raw)
  To: LKML

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared
  2018-04-14  9:41 kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared Teck Choon Giam
  2018-04-14 17:29 ` Akemi Yagi
  2018-04-20  9:29 ` Teck Choon Giam
@ 2018-04-27 17:28 ` Randy Dunlap
  2018-04-28  5:00   ` Greg Kroah-Hartman
  2 siblings, 1 reply; 9+ messages in thread
From: Randy Dunlap @ 2018-04-27 17:28 UTC (permalink / raw)
  To: Teck Choon Giam, LKML
  Cc: Peter Zijlstra, Ingo Molnar, acme, Alexander Shishkin, Jiri Olsa,
	Jiri Olsa, Greg Kroah-Hartman

[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 <namhyung@kernel.org>
Date:   Thu Jun 8 16:31:03 2017 +0900

    perf tools: Introduce dso__decompress_kmodule_{fd,path}


-- 
~Randy

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared
  2018-04-27 17:28 ` Randy Dunlap
@ 2018-04-28  5:00   ` Greg Kroah-Hartman
  2018-04-28  6:09     ` Randy Dunlap
  0 siblings, 1 reply; 9+ messages in thread
From: Greg Kroah-Hartman @ 2018-04-28  5:00 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Teck Choon Giam, LKML, Peter Zijlstra, Ingo Molnar, acme,
	Alexander Shishkin, Jiri Olsa

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 <namhyung@kernel.org>
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared
  2018-04-28  5:00   ` Greg Kroah-Hartman
@ 2018-04-28  6:09     ` Randy Dunlap
  2018-04-28  8:11       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 9+ messages in thread
From: Randy Dunlap @ 2018-04-28  6:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Teck Choon Giam, LKML, Peter Zijlstra, Ingo Molnar, acme,
	Alexander Shishkin, Jiri Olsa

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 <namhyung@kernel.org>
>> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared
  2018-04-28  6:09     ` Randy Dunlap
@ 2018-04-28  8:11       ` Greg Kroah-Hartman
  2018-04-28 11:54         ` Teck Choon Giam
  0 siblings, 1 reply; 9+ messages in thread
From: Greg Kroah-Hartman @ 2018-04-28  8:11 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Teck Choon Giam, LKML, Peter Zijlstra, Ingo Molnar, acme,
	Alexander Shishkin, Jiri Olsa

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 <namhyung@kernel.org>
> >> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared
  2018-04-28  8:11       ` Greg Kroah-Hartman
@ 2018-04-28 11:54         ` Teck Choon Giam
  2018-04-28 11:58           ` Greg Kroah-Hartman
  0 siblings, 1 reply; 9+ messages in thread
From: Teck Choon Giam @ 2018-04-28 11:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Randy Dunlap, LKML, Peter Zijlstra, Ingo Molnar, acme,
	Alexander Shishkin, Jiri Olsa

>> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared
  2018-04-28 11:54         ` Teck Choon Giam
@ 2018-04-28 11:58           ` Greg Kroah-Hartman
  0 siblings, 0 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2018-04-28 11:58 UTC (permalink / raw)
  To: Teck Choon Giam
  Cc: Randy Dunlap, LKML, Peter Zijlstra, Ingo Molnar, acme,
	Alexander Shishkin, Jiri Olsa

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-04-28 11:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-14  9:41 kernel-4.9.94 compile error: 'KMOD_DECOMP_LEN' undeclared Teck Choon Giam
2018-04-14 17:29 ` Akemi Yagi
2018-04-20  9:29 ` Teck Choon Giam
2018-04-27 17:28 ` Randy Dunlap
2018-04-28  5:00   ` Greg Kroah-Hartman
2018-04-28  6:09     ` Randy Dunlap
2018-04-28  8:11       ` Greg Kroah-Hartman
2018-04-28 11:54         ` Teck Choon Giam
2018-04-28 11:58           ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).