linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [4.8-rc1] make bindeb-pkg O= fails
@ 2016-08-08 17:22 frank paulsen
  2016-08-09  8:19 ` Christian Kujau
  0 siblings, 1 reply; 3+ messages in thread
From: frank paulsen @ 2016-08-08 17:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-kbuild

in 4.8-rc1 "make bindeb-pkg O=../debian" fails:
| find: `scripts/gcc-plugins': No such file or directory
| /usr/src/linus/scripts/package/Makefile:97: recipe for target
'bindeb-pkg' failed

this is due to a missing directory scripts/gcc-plugins if using O=

removing line 335 of scripts/package/builddeb helps:
| (cd $objtree; find scripts/gcc-plugins -name \*.so -o -name
gcc-common.h) >> "$objtree/debian/hdrobjfiles"

this clearly isn't the right fix, but i checked it anyway and the
paket gets built.

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

* Re: [4.8-rc1] make bindeb-pkg O= fails
  2016-08-08 17:22 [4.8-rc1] make bindeb-pkg O= fails frank paulsen
@ 2016-08-09  8:19 ` Christian Kujau
       [not found]   ` <alpine.DEB.2.20.14.1608141150220.8131@trent.utfs.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Kujau @ 2016-08-09  8:19 UTC (permalink / raw)
  Cc: linux-kernel, linux-kbuild, Emese Revfy

[re-send]

On Mon, 8 Aug 2016, frank paulsen wrote:
> in 4.8-rc1 "make bindeb-pkg O=../debian" fails:
> | find: `scripts/gcc-plugins': No such file or directory
> | /usr/src/linus/scripts/package/Makefile:97: recipe for target
> 'bindeb-pkg' failed
> 
> this is due to a missing directory scripts/gcc-plugins if using O=
> 
> removing line 335 of scripts/package/builddeb helps:
> | (cd $objtree; find scripts/gcc-plugins -name \*.so -o -name
> gcc-common.h) >> "$objtree/debian/hdrobjfiles"
> 
> this clearly isn't the right fix, but i checked it anyway and the
> paket gets built.

This was introduced in 6b90bd4ba40b38dc13c2782469c1c77e4ed79915 ("GCC
plugin infrastructure"). Not failing hard when scripts/gcc-plugins
cannot be found, does the trick as well. But that too just papers over
the issue. Hopefully Emese has a better idea on how to solve this :-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index e1c09e2..89757f6 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -332,7 +332,7 @@ if grep -q '^CONFIG_STACK_VALIDATION=y'
$KCONFIG_CONFIG ; then
 	(cd $objtree; find tools/objtool -type f -executable) >>
"$objtree/debian/hdrobjfiles"
 fi
 (cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts
-type f) >> "$objtree/debian/hdrobjfiles"
-(cd $objtree; find scripts/gcc-plugins -name \*.so -o -name
gcc-common.h) >> "$objtree/debian/hdrobjfiles"
+(cd $objtree; find scripts/gcc-plugins -name \*.so -o -name
gcc-common.h) >> "$objtree/debian/hdrobjfiles" || true
 destdir=$kernel_headers_dir/usr/src/linux-headers-$version
 mkdir -p "$destdir"
 (cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd
$destdir; tar -xf -)


Thanks,
Christian.
-- 
BOFH excuse #269:

Melting hard drives

-- 
make bzImage, not war

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

* Re: [4.8-rc1] make bindeb-pkg O= fails
       [not found]   ` <alpine.DEB.2.20.14.1608141150220.8131@trent.utfs.org>
@ 2016-08-14 19:46     ` Kees Cook
  0 siblings, 0 replies; 3+ messages in thread
From: Kees Cook @ 2016-08-14 19:46 UTC (permalink / raw)
  To: Christian Kujau; +Cc: Emese Revfy, linux-kbuild, LKML, Michal Marek

On Sun, Aug 14, 2016 at 11:53 AM, Christian Kujau <lists@nerdbynature.de> wrote:
> [CC'ing Michal, Kees]
>
> On Tue, 9 Aug 2016, Christian Kujau wrote:
>> On Mon, 8 Aug 2016, frank paulsen wrote:
>> > in 4.8-rc1 "make bindeb-pkg O=../debian" fails:
>> > | find: `scripts/gcc-plugins': No such file or directory
>> > | /usr/src/linus/scripts/package/Makefile:97: recipe for target
>> > 'bindeb-pkg' failed
>> >
>> > this is due to a missing directory scripts/gcc-plugins if using O=
>> >
>> > removing line 335 of scripts/package/builddeb helps:
>> > | (cd $objtree; find scripts/gcc-plugins -name \*.so -o -name
>> > gcc-common.h) >> "$objtree/debian/hdrobjfiles"
>> >
>> > this clearly isn't the right fix, but i checked it anyway and the
>> > paket gets built.
>>
>> This was introduced in 6b90bd4ba40b38dc13c2782469c1c77e4ed79915 ("GCC
>> plugin infrastructure"). Not failing hard when scripts/gcc-plugins
>> cannot be found, does the trick as well. But that too just papers over
>> the issue. Hopefully Emese has a better idea on how to solve this :-)

(Sorry for white-space damaging...)

Does this fix it?

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index e1c09e2f9be7..8ea9fd2b6573 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -332,7 +332,9 @@ if grep -q '^CONFIG_STACK_VALIDATION=y'
$KCONFIG_CONFIG ; then
        (cd $objtree; find tools/objtool -type f -executable) >>
"$objtree/debian/hdrobjfiles"
 fi
 (cd $objtree; find arch/$SRCARCH/include Module.symvers include
scripts -type f) >> "$objtree/debian/hdrobjfiles"
-(cd $objtree; find scripts/gcc-plugins -name \*.so -o -name
gcc-common.h) >> "$objtree/debian/hdrobjfiles"
+if grep -q '^CONFIG_GCC_PLUGINS=y' $KCONFIG_CONFIG ; then
+       (cd $objtree; find scripts/gcc-plugins -name \*.so -o -name
gcc-common.h) >> "$objtree/debian/hdrobjfiles"
+fi
 destdir=$kernel_headers_dir/usr/src/linux-headers-$version
 mkdir -p "$destdir"
 (cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd
$destdir; tar -xf -)

(i.e. only attempt the find when CONFIG_GCC_PLUGINS has been selected
in the .config)

-Kees

>
> Emese, do you have a better approach here?
>
> Thanks,
> Christian.
>
>>
>> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
>> index e1c09e2..89757f6 100755
>> --- a/scripts/package/builddeb
>> +++ b/scripts/package/builddeb
>> @@ -332,7 +332,7 @@ if grep -q '^CONFIG_STACK_VALIDATION=y'
>> $KCONFIG_CONFIG ; then
>>       (cd $objtree; find tools/objtool -type f -executable) >>
>> "$objtree/debian/hdrobjfiles"
>>  fi
>>  (cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts
>> -type f) >> "$objtree/debian/hdrobjfiles"
>> -(cd $objtree; find scripts/gcc-plugins -name \*.so -o -name
>> gcc-common.h) >> "$objtree/debian/hdrobjfiles"
>> +(cd $objtree; find scripts/gcc-plugins -name \*.so -o -name
>> gcc-common.h) >> "$objtree/debian/hdrobjfiles" || true
>>  destdir=$kernel_headers_dir/usr/src/linux-headers-$version
>>  mkdir -p "$destdir"
>>  (cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd
>> $destdir; tar -xf -)
>>
>>
>> Thanks,
>> Christian.
> --
> BOFH excuse #382:
>
> Someone was smoking in the computer room and set off the halon systems.



-- 
Kees Cook
Nexus Security

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

end of thread, other threads:[~2016-08-14 19:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-08 17:22 [4.8-rc1] make bindeb-pkg O= fails frank paulsen
2016-08-09  8:19 ` Christian Kujau
     [not found]   ` <alpine.DEB.2.20.14.1608141150220.8131@trent.utfs.org>
2016-08-14 19:46     ` Kees Cook

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