You are not logged in.

#1 2016-10-02 17:23:14

suscyn
Member
Registered: 2016-10-02
Posts: 3

[SOLVED]linux-grsec failed to build

I'm trying to build myself the linux-grsec kernel from community repo and it fails. Building in clean chroot didn't help. Already reported bug here. Logs attached in same directory. End of buildlog is quite enigmatic to me:

net/wireless/lib80211.o: warning: objtool: lib80211_exit(): can't find starting instruction
  CC [M]  net/wireless/lib80211_crypt_tkip.o
  LD      net/wireless/built-in.o
net/wireless/lib80211_crypt_ccmp.o: warning: objtool: lib80211_crypto_ccmp_exit(): can't find starting instruction
net/wireless/lib80211_crypt_tkip.o: warning: objtool: lib80211_crypto_tkip_exit(): can't find starting instruction
  LD [M]  net/wireless/cfg80211.o
  LD      net/built-in.o
[1m[31m==> ERROR:(B[m[1m A failure occurred in build().(B[m
[1m    Aborting...(B[m

Last edited by suscyn (2016-10-02 20:36:25)

Offline

#2 2016-10-02 17:40:32

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,860
Website

Re: [SOLVED]linux-grsec failed to build

For a start, you're looking for an error during compilation. The output you've posted only has warnings.

Looking at the build log you posted on the bug tracker, this is your error:

  CC      fs/pstore/platform.o
In file included from drivers/gpu/drm/i915/intel_opregion.c:34:0:
drivers/gpu/drm/i915/intel_opregion.c: In function ‘intel_opregion_get_panel_type’:
drivers/gpu/drm/i915/intel_opregion.c:1074:17: error: ‘dev_priv’ undeclared (first use in this function)
  if (IS_SKYLAKE(dev_priv) || IS_BROADWELL(dev)) {
                 ^
drivers/gpu/drm/i915/i915_drv.h:2499:43: note: in definition of macro ‘__I915__’
  if (__builtin_types_compatible_p(typeof(*p), struct drm_i915_private)) \
                                           ^
drivers/gpu/drm/i915/i915_drv.h:2546:26: note: in expansion of macro ‘INTEL_INFO’
 #define IS_SKYLAKE(dev) (INTEL_INFO(dev)->is_skylake)
                          ^~~~~~~~~~
drivers/gpu/drm/i915/intel_opregion.c:1074:6: note: in expansion of macro ‘IS_SKYLAKE’
  if (IS_SKYLAKE(dev_priv) || IS_BROADWELL(dev)) {
      ^~~~~~~~~~
drivers/gpu/drm/i915/intel_opregion.c:1074:17: note: each undeclared identifier is reported only once for each function it appears in
  if (IS_SKYLAKE(dev_priv) || IS_BROADWELL(dev)) {
                 ^
drivers/gpu/drm/i915/i915_drv.h:2499:43: note: in definition of macro ‘__I915__’
  if (__builtin_types_compatible_p(typeof(*p), struct drm_i915_private)) \
                                           ^
drivers/gpu/drm/i915/i915_drv.h:2546:26: note: in expansion of macro ‘INTEL_INFO’
 #define IS_SKYLAKE(dev) (INTEL_INFO(dev)->is_skylake)
                          ^~~~~~~~~~
drivers/gpu/drm/i915/intel_opregion.c:1074:6: note: in expansion of macro ‘IS_SKYLAKE’
  if (IS_SKYLAKE(dev_priv) || IS_BROADWELL(dev)) {
      ^~~~~~~~~~
make[4]: *** [scripts/Makefile.build:289: drivers/gpu/drm/i915/intel_opregion.o] Error 1
make[3]: *** [scripts/Makefile.build:440: drivers/gpu/drm/i915] Error 2
make[3]: *** Waiting for unfinished jobs....

A quick search brings up some results around the 15th June, including one hit on patchwork.kernel.org that has a patch to fix this. However, I can't test it works because one or more of the grsecurity patches are 404. Add the patch to the sources array and apply it in prepare, see how you get on.

EDIT: Wait, this patch is the opposite of what you need.

EDIT2: Looking at the linux 4.7 source code, dev_priv isn't used at the place where the error is occurring for you, so presumably one of the patches is changing the code.

Last edited by WorMzy (2016-10-02 17:55:52)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2016-10-02 18:29:51

suscyn
Member
Registered: 2016-10-02
Posts: 3

Re: [SOLVED]linux-grsec failed to build

Yeah, it makes sense now. I made mistake in my patch but can't find it in log because I expected that error will by at the very end of file not somewhere in the middle. How did you found it? wink

I'll try to build it now. Thx very much.

Offline

#4 2016-10-02 19:55:04

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,860
Website

Re: [SOLVED]linux-grsec failed to build

It's not at the end because you're running multiple jobs to speed up compilation, so although one job failed, the others continued to produce output until they terminated (which is why it says "make[3]: *** Waiting for unfinished jobs...."). You just need to search the log for "error".

It sounds like you're rolling your own patch? This is starting to sound like an X-Y problem. What is it you are trying to do?

BTW: Updating the PKGBUILD for 4.7.6 / 201609301918 results in a working package for me in a clean chroot.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2016-10-02 20:34:58

suscyn
Member
Registered: 2016-10-02
Posts: 3

Re: [SOLVED]linux-grsec failed to build

It works for me too, thx again.

I needed patch to fix some regression which isn't solved yet upstream. I know that after the fact my first post lacks of information about this but if knew that the patch was the issue I  wouldn't post it in the first place.

Anyway, You solved my problem.

Offline

Board footer

Powered by FluxBB