Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 4 Feb 2018 16:07:02 +0000
From: Kamil Kapturkiewicz <horizn@...pl>
To: lkrg-users@...ts.openwall.com
Subject: Re: How to compile?

On 04/02/18 13:09, Solar Designer wrote:
> On Sun, Feb 04, 2018 at 02:01:10PM +0100, Solar Designer wrote:
>> On Sat, Feb 03, 2018 at 08:39:08PM +0000, Kamil Kapturkiewicz wrote:
>>> mkdir -p "output"
>>> mv /p_lkrg.ko "output"
>> Makefile uses $(PWD), and the above suggests that it's not defined.
>>
>> Try:
>>
>> make PWD=.
> This fails because $(PWD) is then passed into sub-makes, which may
> change the current directory.
>
>> or:
>>
>> make PWD=`pwd`
> This works for me, tested with:
>
> unset PWD # to invoke the problem reported by Kamil
> make clean PWD=`pwd` && make -j8 PWD=`pwd`
>
>> Adam will probably want to fix the Makefile to remove the dependency on
>> PWD being previously defined.
> Alexander

Still no luck:

As root:

15:57 root@...esktop: /home/horizn/Downloads/lkrg-main # make clean 
PWD=`pwd` && make -j8 PWD=`pwd`
make -C /lib/modules/4.4.111/build M=/home/horizn/Downloads/lkrg-main clean
make[1]: Entering directory '/usr/src/linux-4.4.111'
make[1]: Leaving directory '/usr/src/linux-4.4.111'
rm -f Module.markers modules.order
rm -f 
/home/horizn/Downloads/lkrg-main/src/modules/kmod/client/kmod/Module.markers
rm -f 
/home/horizn/Downloads/lkrg-main/src/modules/kmod/client/kmod/modules.order
rm -f -rf "output"
make -C /lib/modules/4.4.111/build M=/home/horizn/Downloads/lkrg-main 
modules
make[1]: Entering directory '/usr/src/linux-4.4.111'
   CC [M] 
/home/horizn/Downloads/lkrg-main/src/modules/ksyms/p_resolve_ksym.o
   CC [M] 
/home/horizn/Downloads/lkrg-main/src/modules/hashing/p_lkrg_fast_hash.o
   CC [M] /home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.o
   CC [M] 
/home/horizn/Downloads/lkrg-main/src/modules/comm_channel/p_comm_channel.o
   CC [M] 
/home/horizn/Downloads/lkrg-main/src/modules/integrity_timer/p_integrity_timer.o
   CC [M] /home/horizn/Downloads/lkrg-main/src/modules/kmod/p_kmod.o
   CC [M] 
/home/horizn/Downloads/lkrg-main/src/modules/database/arch/x86/IDT_MSR_CRx.o
   CC [M] /home/horizn/Downloads/lkrg-main/src/modules/database/CPU.o
In file included from 
/home/horizn/Downloads/lkrg-main/src/modules/integrity_timer/p_integrity_timer.c:23:0:
/home/horizn/Downloads/lkrg-main/src/modules/integrity_timer/p_stext_diff.c:82:18: 
error: 'JUMP_LABEL_NOP_SIZE' undeclared here (not in a function)
  char p_white_nop[JUMP_LABEL_NOP_SIZE] = { STATIC_KEY_INIT_NOP };
                   ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_module_core':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:88:16: 
error: 'struct module' has no member named 'core_layout'
     return p_mod->core_layout.base;
                 ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_core_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:92:16: 
error: 'struct module' has no member named 'core_layout'
     return p_mod->core_layout.size;
                 ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_core_text_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:96:16: 
error: 'struct module' has no member named 'core_layout'
     return p_mod->core_layout.text_size;
                 ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_init_text_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:100:16: 
error: 'struct module' has no member named 'init_layout'
     return p_mod->init_layout.text_size;
                 ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_module_core':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:89:1: 
warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_core_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:93:1: 
warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_core_text_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:97:1: 
warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_init_text_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:101:1: 
warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
scripts/Makefile.build:258: recipe for target 
'/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.o' failed
make[2]: *** 
[/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.o] Error 1
make[2]: *** Waiting for unfinished jobs....
scripts/Makefile.build:258: recipe for target 
'/home/horizn/Downloads/lkrg-main/src/modules/integrity_timer/p_integrity_timer.o' 
failed
make[2]: *** 
[/home/horizn/Downloads/lkrg-main/src/modules/integrity_timer/p_integrity_timer.o] 
Error 1
Makefile:1408: recipe for target 
'_module_/home/horizn/Downloads/lkrg-main' failed
make[1]: *** [_module_/home/horizn/Downloads/lkrg-main] Error 2
make[1]: Leaving directory '/usr/src/linux-4.4.111'
Makefile:66: recipe for target 'all' failed
make: *** [all] Error 2

As normal user:

16:01 horizn@...esktop: ~/Downloads/lkrg-main $ unset PWD

16:01 horizn@...esktop: ~/Downloads/lkrg-main $ make clean PWD=`pwd` && 
make -j8 PWD=`pwd`
make -C /lib/modules/4.4.111/build M=/home/horizn/Downloads/lkrg-main clean
make[1]: Entering directory '/usr/src/linux-4.4.111'
   CLEAN   /home/horizn/Downloads/lkrg-main/.tmp_versions
make[1]: Leaving directory '/usr/src/linux-4.4.111'
rm -f Module.markers modules.order
rm -f 
/home/horizn/Downloads/lkrg-main/src/modules/kmod/client/kmod/Module.markers
rm -f 
/home/horizn/Downloads/lkrg-main/src/modules/kmod/client/kmod/modules.order
rm -f -rf "output"
make -C /lib/modules/4.4.111/build M=/home/horizn/Downloads/lkrg-main 
modules
make[1]: Entering directory '/usr/src/linux-4.4.111'
   CC [M] 
/home/horizn/Downloads/lkrg-main/src/modules/ksyms/p_resolve_ksym.o
   CC [M] /home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.o
   CC [M] 
/home/horizn/Downloads/lkrg-main/src/modules/comm_channel/p_comm_channel.o
   CC [M] 
/home/horizn/Downloads/lkrg-main/src/modules/hashing/p_lkrg_fast_hash.o
   CC [M] 
/home/horizn/Downloads/lkrg-main/src/modules/integrity_timer/p_integrity_timer.o
   CC [M] /home/horizn/Downloads/lkrg-main/src/modules/kmod/p_kmod.o
   CC [M] /home/horizn/Downloads/lkrg-main/src/modules/database/CPU.o
   CC [M] 
/home/horizn/Downloads/lkrg-main/src/modules/database/arch/x86/IDT_MSR_CRx.o
In file included from 
/home/horizn/Downloads/lkrg-main/src/modules/integrity_timer/p_integrity_timer.c:23:0:
/home/horizn/Downloads/lkrg-main/src/modules/integrity_timer/p_stext_diff.c:82:18: 
error: 'JUMP_LABEL_NOP_SIZE' undeclared here (not in a function)
  char p_white_nop[JUMP_LABEL_NOP_SIZE] = { STATIC_KEY_INIT_NOP };
                   ^
   CC [M] /home/horizn/Downloads/lkrg-main/src/modules/database/p_database.o
   CC [M] 
/home/horizn/Downloads/lkrg-main/src/modules/notifiers/p_notifiers.o
scripts/Makefile.build:258: recipe for target 
'/home/horizn/Downloads/lkrg-main/src/modules/integrity_timer/p_integrity_timer.o' 
failed
make[2]: *** 
[/home/horizn/Downloads/lkrg-main/src/modules/integrity_timer/p_integrity_timer.o] 
Error 1
make[2]: *** Waiting for unfinished jobs....
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_module_core':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:88:16: 
error: 'struct module' has no member named 'core_layout'
     return p_mod->core_layout.base;
                 ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_core_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:92:16: 
error: 'struct module' has no member named 'core_layout'
     return p_mod->core_layout.size;
                 ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_core_text_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:96:16: 
error: 'struct module' has no member named 'core_layout'
     return p_mod->core_layout.text_size;
                 ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_init_text_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:100:16: 
error: 'struct module' has no member named 'init_layout'
     return p_mod->init_layout.text_size;
                 ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_module_core':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:89:1: 
warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_core_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:93:1: 
warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_core_text_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:97:1: 
warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_init_text_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:101:1: 
warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
scripts/Makefile.build:258: recipe for target 
'/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.o' failed
make[2]: *** 
[/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.o] Error 1
Makefile:1408: recipe for target 
'_module_/home/horizn/Downloads/lkrg-main' failed
make[1]: *** [_module_/home/horizn/Downloads/lkrg-main] Error 2
make[1]: Leaving directory '/usr/src/linux-4.4.111'
Makefile:66: recipe for target 'all' failed
make: *** [all] Error 2

With sudo:

16:05 horizn@...esktop: ~/Downloads/lkrg-main $ sudo make clean 
PWD=`pwd` && make -j8 PWD=`pwd`
make -C /lib/modules/4.4.111/build M=/home/horizn/Downloads/lkrg-main clean
make[1]: Entering directory '/usr/src/linux-4.4.111'
   CLEAN   /home/horizn/Downloads/lkrg-main/.tmp_versions
make[1]: Leaving directory '/usr/src/linux-4.4.111'
rm -f Module.markers modules.order
rm -f 
/home/horizn/Downloads/lkrg-main/src/modules/kmod/client/kmod/Module.markers
rm -f 
/home/horizn/Downloads/lkrg-main/src/modules/kmod/client/kmod/modules.order
rm -f -rf "output"
make -C /lib/modules/4.4.111/build M=/home/horizn/Downloads/lkrg-main 
modules
make[1]: Entering directory '/usr/src/linux-4.4.111'
   CC [M] 
/home/horizn/Downloads/lkrg-main/src/modules/ksyms/p_resolve_ksym.o
   CC [M] 
/home/horizn/Downloads/lkrg-main/src/modules/hashing/p_lkrg_fast_hash.o
   CC [M] 
/home/horizn/Downloads/lkrg-main/src/modules/comm_channel/p_comm_channel.o
   CC [M] /home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.o
   CC [M] /home/horizn/Downloads/lkrg-main/src/modules/kmod/p_kmod.o
   CC [M] 
/home/horizn/Downloads/lkrg-main/src/modules/integrity_timer/p_integrity_timer.o
   CC [M] /home/horizn/Downloads/lkrg-main/src/modules/database/CPU.o
   CC [M] 
/home/horizn/Downloads/lkrg-main/src/modules/database/arch/x86/IDT_MSR_CRx.o
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_module_core':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:88:16: 
error: 'struct module' has no member named 'core_layout'
     return p_mod->core_layout.base;
                 ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_core_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:92:16: 
error: 'struct module' has no member named 'core_layout'
     return p_mod->core_layout.size;
                 ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_core_text_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:96:16: 
error: 'struct module' has no member named 'core_layout'
     return p_mod->core_layout.text_size;
                 ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_init_text_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:100:16: 
error: 'struct module' has no member named 'init_layout'
     return p_mod->init_layout.text_size;
                 ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_module_core':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:89:1: 
warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_core_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:93:1: 
warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_core_text_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:97:1: 
warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c: In 
function 'p_init_text_size':
/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.c:101:1: 
warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
scripts/Makefile.build:258: recipe for target 
'/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.o' failed
make[2]: *** 
[/home/horizn/Downloads/lkrg-main/src/modules/wrap/p_struct_wrap.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from 
/home/horizn/Downloads/lkrg-main/src/modules/integrity_timer/p_integrity_timer.c:23:0:
/home/horizn/Downloads/lkrg-main/src/modules/integrity_timer/p_stext_diff.c:82:18: 
error: 'JUMP_LABEL_NOP_SIZE' undeclared here (not in a function)
  char p_white_nop[JUMP_LABEL_NOP_SIZE] = { STATIC_KEY_INIT_NOP };
                   ^
scripts/Makefile.build:258: recipe for target 
'/home/horizn/Downloads/lkrg-main/src/modules/integrity_timer/p_integrity_timer.o' 
failed
make[2]: *** 
[/home/horizn/Downloads/lkrg-main/src/modules/integrity_timer/p_integrity_timer.o] 
Error 1
Makefile:1408: recipe for target 
'_module_/home/horizn/Downloads/lkrg-main' failed
make[1]: *** [_module_/home/horizn/Downloads/lkrg-main] Error 2
make[1]: Leaving directory '/usr/src/linux-4.4.111'
Makefile:66: recipe for target 'all' failed
make: *** [all] Error 2

16:05 horizn@...esktop: ~/Downloads/lkrg-main $ env | grep PWD
OLDPWD=/home/horizn
PWD=/home/horizn/Downloads/lkrg-main

-- 
skype. kamil.kapturkiewicz
tel/signal. +44 758 306 8467

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.