djmdjm/flowd

64bit redhat6 installation error

Opened this issue · 1 comments

When build flowd on 64bits redhat6, using command rpmbuild -ba flowd.spec, I 
got loads of warnings and errors as you may find in the bottom, can you please 
confirm that the source code can be build on 64bits redhat6?
Thank you very much!
Shao

FIG_H  -c -o store-v2.o store-v2.c
store-v2.c: In function 'store_v2_flow_convert':
store-v2.c:537: warning: declaration of '__v' shadows a previous local
store-v2.c:537: warning: shadowed declaration is here
store-v2.c:537: warning: declaration of '__x' shadows a previous local
store-v2.c:537: warning: shadowed declaration is here
store-v2.c:538: warning: declaration of '__v' shadows a previous local
store-v2.c:538: warning: shadowed declaration is here
store-v2.c:538: warning: declaration of '__x' shadows a previous local
store-v2.c:538: warning: shadowed declaration is here
store-v2.c:546: warning: declaration of '__v' shadows a previous local
store-v2.c:546: warning: shadowed declaration is here
store-v2.c:546: warning: declaration of '__x' shadows a previous local
store-v2.c:546: warning: shadowed declaration is here
store-v2.c:547: warning: declaration of '__v' shadows a previous local
store-v2.c:547: warning: shadowed declaration is here
store-v2.c:547: warning: declaration of '__x' shadows a previous local
store-v2.c:547: warning: shadowed declaration is here
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -D_GNU_SOURCE -Wall 
-Waggregate-return -Wcast-align -Wcast-qual -Wmissing-declarations 
-Wmissing-prototypes -Wno-conversion -Wpointer-arith -Wshadow -Wuninitialized 
-Wcast-align -Wcast-qual -Wformat=2 -Wformat-nonliteral -Wwrite-strings -I.  
-DSYSCONFDIR="\"/etc\"" -DPIDFILEDIR="\"/var/run\"" -DPROGVER="\"0.9.1\"" 
-DHAVE_CONFIG_H  -c -o crc32.o crc32.c
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -D_GNU_SOURCE -Wall 
-Waggregate-return -Wcast-align -Wcast-qual -Wmissing-declarations 
-Wmissing-prototypes -Wno-conversion -Wpointer-arith -Wshadow -Wuninitialized 
-Wcast-align -Wcast-qual -Wformat=2 -Wformat-nonliteral -Wwrite-strings -I.  
-DSYSCONFDIR="\"/etc\"" -DPIDFILEDIR="\"/var/run\"" -DPROGVER="\"0.9.1\"" 
-DHAVE_CONFIG_H  -c -o strlcpy.o strlcpy.c
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -D_GNU_SOURCE -Wall 
-Waggregate-return -Wcast-align -Wcast-qual -Wmissing-declarations 
-Wmissing-prototypes -Wno-conversion -Wpointer-arith -Wshadow -Wuninitialized 
-Wcast-align -Wcast-qual -Wformat=2 -Wformat-nonliteral -Wwrite-strings -I.  
-DSYSCONFDIR="\"/etc\"" -DPIDFILEDIR="\"/var/run\"" -DPROGVER="\"0.9.1\"" 
-DHAVE_CONFIG_H  -c -o strlcat.o strlcat.c
ar rv libflowd.a atomicio.o addr.o store.o store-v2.o crc32.o strlcpy.o 
strlcat.o
ar: creating libflowd.a
a - atomicio.o
a - addr.o
a - store.o
a - store-v2.o
a - crc32.o
a - strlcpy.o
a - strlcat.o
ranlib libflowd.a
gcc  -L. -o flowd flowd.o privsep_fdpass.o privsep.o filter.o parse.o log.o 
daemon.o peer.o closefrom.o setproctitle.o -lflowd 
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -D_GNU_SOURCE -Wall 
-Waggregate-return -Wcast-align -Wcast-qual -Wmissing-declarations 
-Wmissing-prototypes -Wno-conversion -Wpointer-arith -Wshadow -Wuninitialized 
-Wcast-align -Wcast-qual -Wformat=2 -Wformat-nonliteral -Wwrite-strings -I.  
-DSYSCONFDIR="\"/etc\"" -DPIDFILEDIR="\"/var/run\"" -DPROGVER="\"0.9.1\"" 
-DHAVE_CONFIG_H  -c -o flowd-reader.o flowd-reader.c
gcc  -L. -o flowd-reader flowd-reader.o parse.o log.o filter.o libflowd.a 
+ ./setup.py build
running build
running build_ext
building 'flowd' extension
creating build
creating build/temp.linux-x86_64-2.6
gcc -pthread -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE 
-fPIC -fwrapv -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC 
-DPROGVER="0.9.1" -I/usr/include/python2.6 -c flowd_python.c -o 
build/temp.linux-x86_64-2.6/flowd_python.o
flowd_python.c:17:20: error: Python.h: No such file or directory
flowd_python.c:19:26: error: structmember.h: No such file or directory
In file included from flowd_python.c:20:
store.h:266: error: expected ')' before '*' token
store.h:268: error: expected ')' before '*' token
flowd_python.c:26: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'initflowd'
flowd_python.c:36: error: expected specifier-qualifier-list before 
'PyObject_HEAD'
flowd_python.c:47: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'Flow_Type'
flowd_python.c: In function 'newFlowObject':
flowd_python.c:54: warning: implicit declaration of function 'PyObject_New'
flowd_python.c:54: error: expected expression before 'FlowObject'
flowd_python.c:58: error: 'FlowObject' has no member named 'user_attr'
flowd_python.c:58: warning: implicit declaration of function 'PyDict_New'
flowd_python.c:60: error: 'FlowObject' has no member named 'octets'
flowd_python.c:60: error: 'Py_None' undeclared (first use in this function)
flowd_python.c:60: error: (Each undeclared identifier is reported only once
flowd_python.c:60: error: for each function it appears in.)
flowd_python.c:61: warning: implicit declaration of function 'Py_INCREF'
flowd_python.c:62: error: 'FlowObject' has no member named 'packets'
flowd_python.c:64: error: 'FlowObject' has no member named 'agent_addr'
flowd_python.c:66: error: 'FlowObject' has no member named 'src_addr'
flowd_python.c:68: error: 'FlowObject' has no member named 'dst_addr'
flowd_python.c:70: error: 'FlowObject' has no member named 'gateway_addr'
flowd_python.c:73: error: 'FlowObject' has no member named 'flow'
flowd_python.c:73: error: 'FlowObject' has no member named 'flow'
flowd_python.c:75: error: 'FlowObject' has no member named 'user_attr'
flowd_python.c:77: warning: implicit declaration of function 'Py_XDECREF'
flowd_python.c: In function 'newFlowObject_from_flow':
flowd_python.c:94: error: expected expression before 'FlowObject'
flowd_python.c:98: error: 'FlowObject' has no member named 'user_attr'
flowd_python.c:99: error: 'FlowObject' has no member named 'octets'
flowd_python.c:100: error: 'FlowObject' has no member named 'packets'
flowd_python.c:102: error: 'FlowObject' has no member named 'src_addr'
flowd_python.c:102: error: 'FlowObject' has no member named 'dst_addr'
flowd_python.c:103: error: 'FlowObject' has no member named 'agent_addr'
flowd_python.c:103: error: 'FlowObject' has no member named 'gateway_addr'
flowd_python.c:104: warning: implicit declaration of function 'memcpy'
flowd_python.c:104: warning: incompatible implicit declaration of built-in 
function 'memcpy'
flowd_python.c:104: error: 'FlowObject' has no member named 'flow'
flowd_python.c:104: error: 'FlowObject' has no member named 'flow'
flowd_python.c:106: error: 'FlowObject' has no member named 'flow'
flowd_python.c:119: error: 'FlowObject' has no member named 'flow'
flowd_python.c:119: error: 'FlowObject' has no member named 'flow'
flowd_python.c:119: error: 'FlowObject' has no member named 'src_addr'
flowd_python.c:119: warning: implicit declaration of function 
'PyString_FromString'
flowd_python.c:119: error: 'FlowObject' has no member named 'src_addr'
flowd_python.c:119: error: 'FlowObject' has no member named 'src_addr'
flowd_python.c:119: error: 'Py_None' undeclared (first use in this function)
flowd_python.c:120: error: 'FlowObject' has no member named 'flow'
flowd_python.c:120: error: 'FlowObject' has no member named 'flow'
flowd_python.c:120: error: 'FlowObject' has no member named 'dst_addr'
flowd_python.c:120: error: 'FlowObject' has no member named 'dst_addr'
flowd_python.c:120: error: 'FlowObject' has no member named 'dst_addr'
flowd_python.c:121: error: 'FlowObject' has no member named 'flow'
flowd_python.c:121: error: 'FlowObject' has no member named 'flow'
flowd_python.c:121: error: 'FlowObject' has no member named 'agent_addr'
flowd_python.c:121: error: 'FlowObject' has no member named 'agent_addr'
flowd_python.c:121: error: 'FlowObject' has no member named 'agent_addr'
flowd_python.c:122: error: 'FlowObject' has no member named 'flow'
flowd_python.c:122: error: 'FlowObject' has no member named 'flow'
flowd_python.c:122: error: 'FlowObject' has no member named 'gateway_addr'
flowd_python.c:122: error: 'FlowObject' has no member named 'gateway_addr'
flowd_python.c:122: error: 'FlowObject' has no member named 'gateway_addr'
flowd_python.c:125: error: 'FlowObject' has no member named 'flow'
flowd_python.c:126: error: 'FlowObject' has no member named 'octets'
flowd_python.c:126: warning: implicit declaration of function 
'PyLong_FromUnsignedLongLong'
flowd_python.c:127: error: 'FlowObject' has no member named 'flow'
flowd_python.c:129: error: 'FlowObject' has no member named 'octets'
flowd_python.c:132: error: 'FlowObject' has no member named 'flow'
flowd_python.c:133: error: 'FlowObject' has no member named 'packets'
flowd_python.c:134: error: 'FlowObject' has no member named 'flow'
flowd_python.c:136: error: 'FlowObject' has no member named 'packets'
flowd_python.c:140: error: 'FlowObject' has no member named 'user_attr'
flowd_python.c:142: error: 'FlowObject' has no member named 'user_attr'
flowd_python.c:142: error: 'FlowObject' has no member named 'octets'
flowd_python.c:143: error: 'FlowObject' has no member named 'packets'
flowd_python.c: At top level:
flowd_python.c:153: error: expected ')' before '*' token
flowd_python.c: In function 'flowobj_normalise':
flowd_python.c:173: error: 'FlowObject' has no member named 'octets'
flowd_python.c:173: error: 'FlowObject' has no member named 'octets'
flowd_python.c:173: error: 'Py_None' undeclared (first use in this function)
flowd_python.c:174: warning: implicit declaration of function 'object_to_u64'
flowd_python.c:174: error: 'FlowObject' has no member named 'octets'
flowd_python.c:175: error: 'FlowObject' has no member named 'flow'
flowd_python.c:176: warning: implicit declaration of function 'PyErr_SetString'
flowd_python.c:176: error: 'PyExc_TypeError' undeclared (first use in this 
function)
flowd_python.c:180: error: 'FlowObject' has no member named 'flow'
flowd_python.c:182: error: 'FlowObject' has no member named 'flow'
flowd_python.c:184: error: 'FlowObject' has no member named 'packets'
flowd_python.c:184: error: 'FlowObject' has no member named 'packets'
flowd_python.c:185: error: 'FlowObject' has no member named 'packets'
flowd_python.c:186: error: 'FlowObject' has no member named 'flow'
flowd_python.c:191: error: 'FlowObject' has no member named 'flow'
flowd_python.c:193: error: 'FlowObject' has no member named 'flow'
flowd_python.c:209: error: 'FlowObject' has no member named 'src_addr'
flowd_python.c:209: error: 'FlowObject' has no member named 'src_addr'
flowd_python.c:209: warning: implicit declaration of function 
'PyString_AsString'
flowd_python.c:209: error: 'FlowObject' has no member named 'src_addr'
flowd_python.c:209: error: 'FlowObject' has no member named 'flow'
flowd_python.c:209: error: 'FlowObject' has no member named 'flow'
flowd_python.c:209: error: 'PyExc_ValueError' undeclared (first use in this 
function)
flowd_python.c:209: error: 'FlowObject' has no member named 'flow'
flowd_python.c:210: error: 'FlowObject' has no member named 'dst_addr'
flowd_python.c:210: error: 'FlowObject' has no member named 'dst_addr'
flowd_python.c:210: error: 'FlowObject' has no member named 'dst_addr'
flowd_python.c:210: error: 'FlowObject' has no member named 'flow'
flowd_python.c:210: error: 'FlowObject' has no member named 'flow'
flowd_python.c:210: error: 'FlowObject' has no member named 'flow'
flowd_python.c:211: error: 'FlowObject' has no member named 'agent_addr'
flowd_python.c:211: error: 'FlowObject' has no member named 'agent_addr'
flowd_python.c:211: error: 'FlowObject' has no member named 'agent_addr'
flowd_python.c:211: error: 'FlowObject' has no member named 'flow'
flowd_python.c:211: error: 'FlowObject' has no member named 'flow'
flowd_python.c:211: error: 'FlowObject' has no member named 'flow'
flowd_python.c:212: error: 'FlowObject' has no member named 'gateway_addr'
flowd_python.c:212: error: 'FlowObject' has no member named 'gateway_addr'
flowd_python.c:212: error: 'FlowObject' has no member named 'gateway_addr'
flowd_python.c:212: error: 'FlowObject' has no member named 'flow'
flowd_python.c:212: error: 'FlowObject' has no member named 'flow'
flowd_python.c:212: error: 'FlowObject' has no member named 'flow'
flowd_python.c: In function 'newFlowObject_from_blob':
flowd_python.c:231: error: 'PyExc_ValueError' undeclared (first use in this 
function)
flowd_python.c: In function 'Flow_dealloc':
flowd_python.c:243: error: 'FlowObject' has no member named 'user_attr'
flowd_python.c:244: error: 'FlowObject' has no member named 'octets'
flowd_python.c:245: error: 'FlowObject' has no member named 'packets'
flowd_python.c:246: error: 'FlowObject' has no member named 'src_addr'
flowd_python.c:247: error: 'FlowObject' has no member named 'dst_addr'
flowd_python.c:248: error: 'FlowObject' has no member named 'agent_addr'
flowd_python.c:249: error: 'FlowObject' has no member named 'gateway_addr'
flowd_python.c:250: warning: implicit declaration of function 'PyObject_Del'
flowd_python.c: At top level:
flowd_python.c:254: error: expected ')' before string constant
flowd_python.c:259: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before '*' token
flowd_python.c:280: error: expected ')' before string constant
flowd_python.c:285: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before '*' token
flowd_python.c:308: error: expected ')' before string constant
flowd_python.c:315: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before '*' token
flowd_python.c:338: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'Flow_methods'
flowd_python.c:346: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'Flow_members'
flowd_python.c:389: error: expected ')' before string constant
flowd_python.c:391: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'Flow_Type'
flowd_python.c:441: error: expected specifier-qualifier-list before 
'PyObject_HEAD'
flowd_python.c:445: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'FlowLog_Type'
flowd_python.c: In function 'FlowLog_dealloc':
flowd_python.c:452: error: 'FlowLogObject' has no member named 'flowlog'
flowd_python.c: At top level:
flowd_python.c:457: error: expected ')' before string constant
flowd_python.c:462: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before '*' token
flowd_python.c:483: error: expected ')' before string constant
flowd_python.c:488: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before '*' token
flowd_python.c:518: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before '*' token
flowd_python.c:524: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'FlowLog_members'
flowd_python.c:529: error: expected ')' before string constant
flowd_python.c:531: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'FlowLog_methods'
flowd_python.c:537: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'FlowLog_Type'
flowd_python.c:589: error: expected specifier-qualifier-list before 
'PyObject_HEAD'
flowd_python.c:593: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'FlowLogIter_Type'
flowd_python.c: In function 'newFlowLogIterObject':
flowd_python.c:600: error: expected expression before 'FlowLogIterObject'
flowd_python.c:604: error: 'FlowLogIterObject' has no member named 'parent'
flowd_python.c:605: warning: implicit declaration of function 'Py_XINCREF'
flowd_python.c:605: error: 'FlowLogIterObject' has no member named 'parent'
flowd_python.c: In function 'FlowLogIter_dealloc':
flowd_python.c:615: error: 'FlowLogIterObject' has no member named 'parent'
flowd_python.c: At top level:
flowd_python.c:619: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before '*' token
flowd_python.c:639: error: expected ')' before string constant
flowd_python.c:641: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'FlowLogIter_Type'
flowd_python.c:691: error: expected ')' before string constant
flowd_python.c:697: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before '*' token
flowd_python.c:718: error: expected ')' before string constant
flowd_python.c:723: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before '*' token
flowd_python.c:743: error: expected ')' before string constant
flowd_python.c:748: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before '*' token
flowd_python.c:768: error: expected ')' before string constant
flowd_python.c:774: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before '*' token
flowd_python.c:789: error: expected ')' before string constant
flowd_python.c:794: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before '*' token
flowd_python.c:807: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'flowd_methods'
flowd_python.c:817: error: expected ')' before string constant
flowd_python.c:821: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'initflowd'
error: command 'gcc' failed with exit status 1
error: Bad exit status from /var/tmp/rpm-tmp.BzP4fu (%build)


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

Original issue reported on code.google.com by shaosha...@gmail.com on 26 Aug 2011 at 10:15

This seems to be related to the Python module. I see the same issues on RHEL5, 
with python 2.4.3. I could successfully install without using an RPM, though I 
did not install the python module.

Original comment by wais...@gmail.com on 7 May 2012 at 9:40