Page 1 of 1
problem compiling gradm
Posted:
Tue Nov 18, 2003 7:20 pm
by msw
Hi.
I'm using a debian system with an grsecurity 2.0-rc3 enabled 2.4.22 kernel, gradm is version 2.0-rc3.
grsecurity for itself runs fine.
Recently i updated libc6 from 2.3.2-7 to 2.3.2.ds1-10.
I tried to compile gradm after the update.
It gave me the following error:
[...]
/usr/include/linux/compiler.h:17: warning: `__attribute_used__' redefined
/usr/include/sys/cdefs.h:195: warning: this is the location of the previous definition
gradm_res.c: In function `add_res_acl':
gradm_res.c:143: `NR_OPEN' undeclared (first use in this function)
gradm_res.c:143: (Each undeclared identifier is reported only once
gradm_res.c:143: for each function it appears in.)
make: *** [gradm_res.o] Error 1
This shows up with gcc 2.95.4 as well as with gcc 3.3.2.
did i forget something while updating libc6?
the old gradm-binary does run fine with the new libc, i just can't compile.
thank you for you time/help
Posted:
Wed Nov 19, 2003 10:23 am
by spender
add #include <linux/limits.h> to gradm.h
it's fixed in current CVS.
-Brad
Posted:
Fri Nov 28, 2003 1:33 pm
by msw
Thank you for the help.
Posted:
Tue Dec 09, 2003 7:04 am
by spiekey
I have the follwing:
Debian unstable uptodate
gradm-2.0-rc3
grsecurity-2.0-rc3-2.4.22
Kernel: 2.4.22
And i added #include <linux/limits.h> to gradm.h
I still get the same error:
---------------------------------------
/usr/bin/gcc -O2 -DGRSEC_DIR=\"/etc/grsec\" -c -o gradm_res.o gradm_res.c
gradm_res.c: In function `add_res_acl':
gradm_res.c:143: error: `NR_OPEN' undeclared (first use in this function)
gradm_res.c:143: error: (Each undeclared identifier is reported only once
gradm_res.c:143: error: for each function it appears in.)
make: *** [gradm_res.o] Error 1
Any ideas?
Thanks, Mario
Posted:
Wed Jan 07, 2004 6:21 am
by pharazon
I've got the same problem with Debian sid (testing). The NR_OPEN is solved by adding #define NR_OPEN 1024 to gradm.h, but then it gives a new set of errors:
romenna:~/gradm# make
/usr/bin/gcc -O2 -DGRSEC_DIR=\"/etc/grsec\" -o gradm gradm.tab.o lex.gradm.o learn.tab.o lex.learn.o gradm_misc.o gradm_parse.o gradm_arg.o gradm_pw.o gradm_opt.o gradm_cap.o gradm_sha256.o gradm_adm.o gradm_analyze.o gradm_res.o gradm_human.o gradm_learn.o gradm_net.o -lfl -static
gradm_human.o(.text+0x142): In function `show_ip_acl':
: warning: Using 'getprotobynumber' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
gradm.tab.o(.text+0x169): In function `conv_name_to_type':
: warning: Using 'getprotobyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
gradm_parse.o(.text+0x3a5): In function `add_globbing_file':
: undefined reference to `MINOR'
gradm_parse.o(.text+0x3bf): In function `add_globbing_file':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0x3cb): In function `add_globbing_file':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0x4b3): In function `add_globbing_file':
: undefined reference to `MINOR'
gradm_parse.o(.text+0x4cd): In function `add_globbing_file':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0x4d9): In function `add_globbing_file':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0x6e0): In function `add_globbing_file':
: undefined reference to `MINOR'
gradm_parse.o(.text+0x6fa): In function `add_globbing_file':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0x706): In function `add_globbing_file':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0x7f1): In function `add_globbing_file':
: undefined reference to `MINOR'
gradm_parse.o(.text+0x80b): In function `add_globbing_file':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0x817): In function `add_globbing_file':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0x947): In function `display_all_dupes':
: undefined reference to `MINOR'
gradm_parse.o(.text+0x95b): In function `display_all_dupes':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0x967): In function `display_all_dupes':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0xaea): In function `add_proc_object_acl':
: undefined reference to `MINOR'
gradm_parse.o(.text+0xafe): In function `add_proc_object_acl':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0xb0a): In function `add_proc_object_acl':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0xee5): In function `add_proc_subject_acl':
: undefined reference to `MINOR'
gradm_parse.o(.text+0xef9): In function `add_proc_subject_acl':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0xf05): In function `add_proc_subject_acl':
: undefined reference to `MKDEV'
gradm_arg.o(.text+0x95): In function `conv_name_to_num':
: undefined reference to `MINOR'
gradm_arg.o(.text+0xa9): In function `conv_name_to_num':
: undefined reference to `MAJOR'
gradm_arg.o(.text+0xb5): In function `conv_name_to_num':
: undefined reference to `MKDEV'
collect2: ld returned 1 exit status
make: *** [gradm] Error 1