error compiling gradm
Posted: Tue Dec 30, 2003 9:22 am
Im currently running kernel 2.4.23.
When i try to compile gradm 1.9.13 or 1.9.11 o got following 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:136: error: `NR_OPEN' undeclared (first use in this function)
gradm_res.c:136: error: (Each undeclared identifier is reported only once
gradm_res.c:136: error: for each function it appears in.)
make: *** [gradm_res.o] Error 1
linux/limits.h does have NR_OPEN
and its included from gradm.h.
And gradm.h is include from gradm_res.c. to its a bit strange.
So i #define NR_OPEN 1024 in gradm.h.
And got this:
/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+0x11c): In function `show_ip_acl':
: Using 'getprotobynumber' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
gradm.tab.o(.text+0x1af): In function `conv_name_to_type':
: Using 'getprotobyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
gradm_parse.o(.text+0x4ec): In function `add_globbing_file':
: undefined reference to `MINOR'
gradm_parse.o(.text+0x505): In function `add_globbing_file':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0x50e): In function `add_globbing_file':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0x5e5): In function `add_globbing_file':
: undefined reference to `MINOR'
gradm_parse.o(.text+0x5fe): In function `add_globbing_file':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0x607): In function `add_globbing_file':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0x67e): In function `add_globbing_file':
: undefined reference to `MINOR'
gradm_parse.o(.text+0x697): In function `add_globbing_file':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0x6a0): In function `add_globbing_file':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0x76f): In function `add_globbing_file':
: undefined reference to `MINOR'
gradm_parse.o(.text+0x788): In function `add_globbing_file':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0x791): In function `add_globbing_file':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0x882): In function `display_all_dupes':
: undefined reference to `MINOR'
gradm_parse.o(.text+0x895): In function `display_all_dupes':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0x89e): In function `display_all_dupes':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0xa11): In function `add_proc_object_acl':
: undefined reference to `MINOR'
gradm_parse.o(.text+0xa24): In function `add_proc_object_acl':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0xa2d): In function `add_proc_object_acl':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0xdbe): In function `add_proc_subject_acl':
: undefined reference to `MINOR'
gradm_parse.o(.text+0xdd1): In function `add_proc_subject_acl':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0xdda): In function `add_proc_subject_acl':
: undefined reference to `MKDEV'
gradm_arg.o(.text+0x88): In function `conv_name_to_num':
: undefined reference to `MINOR'
gradm_arg.o(.text+0x9b): In function `conv_name_to_num':
: undefined reference to `MAJOR'
gradm_arg.o(.text+0xa4): In function `conv_name_to_num':
: undefined reference to `MKDEV'
collect2: ld returned 1 exit status
make: *** [gradm] Error 1
Any ides how could i solve this problem, since I dont have any.
When i try to compile gradm 1.9.13 or 1.9.11 o got following 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:136: error: `NR_OPEN' undeclared (first use in this function)
gradm_res.c:136: error: (Each undeclared identifier is reported only once
gradm_res.c:136: error: for each function it appears in.)
make: *** [gradm_res.o] Error 1
linux/limits.h does have NR_OPEN
and its included from gradm.h.
And gradm.h is include from gradm_res.c. to its a bit strange.
So i #define NR_OPEN 1024 in gradm.h.
And got this:
/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+0x11c): In function `show_ip_acl':
: Using 'getprotobynumber' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
gradm.tab.o(.text+0x1af): In function `conv_name_to_type':
: Using 'getprotobyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
gradm_parse.o(.text+0x4ec): In function `add_globbing_file':
: undefined reference to `MINOR'
gradm_parse.o(.text+0x505): In function `add_globbing_file':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0x50e): In function `add_globbing_file':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0x5e5): In function `add_globbing_file':
: undefined reference to `MINOR'
gradm_parse.o(.text+0x5fe): In function `add_globbing_file':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0x607): In function `add_globbing_file':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0x67e): In function `add_globbing_file':
: undefined reference to `MINOR'
gradm_parse.o(.text+0x697): In function `add_globbing_file':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0x6a0): In function `add_globbing_file':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0x76f): In function `add_globbing_file':
: undefined reference to `MINOR'
gradm_parse.o(.text+0x788): In function `add_globbing_file':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0x791): In function `add_globbing_file':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0x882): In function `display_all_dupes':
: undefined reference to `MINOR'
gradm_parse.o(.text+0x895): In function `display_all_dupes':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0x89e): In function `display_all_dupes':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0xa11): In function `add_proc_object_acl':
: undefined reference to `MINOR'
gradm_parse.o(.text+0xa24): In function `add_proc_object_acl':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0xa2d): In function `add_proc_object_acl':
: undefined reference to `MKDEV'
gradm_parse.o(.text+0xdbe): In function `add_proc_subject_acl':
: undefined reference to `MINOR'
gradm_parse.o(.text+0xdd1): In function `add_proc_subject_acl':
: undefined reference to `MAJOR'
gradm_parse.o(.text+0xdda): In function `add_proc_subject_acl':
: undefined reference to `MKDEV'
gradm_arg.o(.text+0x88): In function `conv_name_to_num':
: undefined reference to `MINOR'
gradm_arg.o(.text+0x9b): In function `conv_name_to_num':
: undefined reference to `MAJOR'
gradm_arg.o(.text+0xa4): In function `conv_name_to_num':
: undefined reference to `MKDEV'
collect2: ld returned 1 exit status
make: *** [gradm] Error 1
Any ides how could i solve this problem, since I dont have any.