Permissions problem building RPM?

21 views
Skip to first unread message

Gary Larizza

unread,
Mar 24, 2011, 8:07:27 AM3/24/11
to grok-users
Hey all,

I'm fairly new to building RPMs from a spec file, so forgive me if
this is a common mistake. I was trying to build an RPM from the grok
source tarball and ran into what I think might be a permissions error:

----------------------------------------------------------
[root@ldap RPMs]# rpmbuild -tb grok-1.20101117.3112.tar.gz
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.6445
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd /usr/src/redhat/BUILD
+ rm -rf grok-1.20101117.3112
+ /bin/gzip -dc /var/www/html/huronrepo/RPMs/
grok-1.20101117.3112.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd grok-1.20101117.3112
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.6445
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd grok-1.20101117.3112
+ make
[ -f grok_capture_xdr.h ] && rm grok_capture_xdr.h || true
rpcgen -h grok_capture.x -o grok_capture_xdr.h
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include grok.c -o grok.o
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include grokre.c -o grokre.o
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include grok_capture.c -o
grok_capture.o
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include grok_pattern.c -o
grok_pattern.o
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include stringhelper.c -o
stringhelper.o
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include predicates.c -o
predicates.o
[ -f grok_capture_xdr.c ] && rm grok_capture_xdr.c || true
rpcgen -c grok_capture.x -o grok_capture_xdr.c
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include grok_capture_xdr.c -o
grok_capture_xdr.o
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include grok_match.c -o
grok_match.o
grok_match.c: In function ‘grok_match_get_named_capture’:
grok_match.c:6: warning: passing argument 1 of
‘grok_capture_get_by_name’ discards qualifiers from pointer target
type
grok_match.c:10: warning: passing argument 1 of
‘grok_capture_get_by_subname’ discards qualifiers from pointer target
type
grok_match.c: In function ‘grok_match_walk_init’:
grok_match.c:40: warning: initialization discards qualifiers from
pointer target type
grok_match.c: In function ‘grok_match_walk_next’:
grok_match.c:49: warning: passing argument 1 of
‘grok_capture_walk_next’ discards qualifiers from pointer target type
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include grok_logging.c -o
grok_logging.o
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include grok_program.c -o
grok_program.o
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include grok_input.c -o
grok_input.o
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include grok_matchconf.c -o
grok_matchconf.o
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include libc_helper.c -o
libc_helper.o
/usr/bin/gperf grok_matchconf_macro.gperf > grok_matchconf_macro.c
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include grok_matchconf_macro.c
-o grok_matchconf_macro.o
/usr/bin/gperf filters.gperf > filters.c
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include filters.c -o filters.o
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include grok_discover.c -o
grok_discover.o
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include conf.tab.c -o
conf.tab.o
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include conf.yy.c -o conf.yy.o
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include main.c -o main.o
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include grok_config.c -o
grok_config.o
gcc -ldl -lpcre -levent -rdynamic -ltokyocabinet -L/usr/local/lib -
levent grok.o grokre.o grok_capture.o grok_pattern.o stringhelper.o
predicates.o grok_capture_xdr.o grok_match.o grok_logging.o
grok_program.o grok_input.o grok_matchconf.o libc_helper.o
grok_matchconf_macro.o filters.o grok_discover.o conf.tab.o conf.yy.o
main.o grok_config.o -o grok
cc -c -pipe -fPIC -I. -O2 -I/usr/local/include discover_main.c -o
discover_main.o
gcc -ldl -lpcre -levent -rdynamic -ltokyocabinet -L/usr/local/lib
grok.o grokre.o grok_capture.o grok_pattern.o stringhelper.o
predicates.o grok_capture_xdr.o grok_match.o grok_logging.o
grok_program.o grok_input.o grok_matchconf.o libc_helper.o
grok_matchconf_macro.o filters.o grok_discover.o discover_main.o -o
discogrok
gcc -ldl -lpcre -levent -rdynamic -ltokyocabinet -L/usr/local/lib -
fPIC -shared -Wl,-soname=libgrok.so.1 grok.o grokre.o grok_capture.o
grok_pattern.o stringhelper.o predicates.o grok_capture_xdr.o
grok_match.o grok_logging.o grok_program.o grok_input.o
grok_matchconf.o libc_helper.o grok_matchconf_macro.o filters.o
grok_discover.o -o libgrok.so
ln -s libgrok.so libgrok.so.1
rm filters.c grok_matchconf_macro.c
+ export LD_LIBRARY_PATH=/usr/src/redhat/BUILD/grok-1.20101117.3112
+ LD_LIBRARY_PATH=/usr/src/redhat/BUILD/grok-1.20101117.3112
+ cd ruby
+ ruby ext/extconf.rb
checking for grok.h in /usr/local/include,../../,/usr/include... no
*** ext/extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=ext
--curdir
--ruby=/usr/local/bin/ruby
ext/extconf.rb:8: Could not find grok.h (RuntimeError)
error: Bad exit status from /var/tmp/rpm-tmp.6445 (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.6445 (%build)

----------------------------------------------------------


It looks like it can't find grok.h in the directory two levels up or
on the system. Traversing to that directory, it DOES exist - but the
makefile isn't finding it. I'm running this on a CentOS 5.5 box. Any
pointers?

-Gary
Reply all
Reply to author
Forward
0 new messages