[rsyslog-notify] Forum Thread: Error: Cross Compiling Rsyslog on Red Hat 4.3.2-7 - (Mode 'post')

noreply at adiscon.com noreply at adiscon.com
Thu Feb 13 03:34:06 CET 2014


User: Mamba! 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=24227#p24227

Message: 
----------
Hi Guys,

I was trying to compile rsyslog-7.4.9 for my ppc(montavista) plateform.

Below are the steps i followed till now on a Red Hat 4.3.2-7 installed
machine.

As i read, rsyslog has a dependency on json.! So...

tar -xzvf json-c-0.10-nodoc.tar.gz
cd json-c-0.10
sudo ./configure --prefix=/usr
sudo make
sudo make install
cp json_object_iterator.h /usr/include/json/

Cross Compilation
---------------------

export PATH=$PATH:/opt/ppc/82xx/bin
export ppc_target=/opt/ppc/82xx/bin/ppc_82xx
export LD="${ppc_target}-ld"
export RANLIB="${ppc_target}-ranlib"
export AR="${ppc_target}-ar"
export CC="${ppc_target}-gcc"
export STRIP="${ppc_target}-strip"
export OBJDUMP="${ppc_target}-objdump"

tar -xzvf rsyslog-7.4.9.tar.gz
cd rsyslog-7.4.9
./configure --disable-uuid --disable-libgcrypt
--prefix=/home/nitin/mfh/rsyslogbin --exec-prefix=/home/nitin/mfh/pawapc
--host=powerpc-montavista-linux
make

During make i found below error.

Making all in compat
make[2]: Entering directory `/home/nitin/mfh/rsyslog-7.4.9/compat'
  CC     compat_la-getifaddrs.lo
cc1: warning: include location "/usr/include/json" is unsafe for
cross-compilation
  CCLD   compat.la
make[2]: Leaving directory `/home/nitin/mfh/rsyslog-7.4.9/compat'
Making all in runtime
make[2]: Entering directory `/home/nitin/mfh/rsyslog-7.4.9/runtime'
  CC     librsyslog_la-rsyslog.lo
cc1: warning: include location "/usr/include/json" is unsafe for
cross-compilation
In file included from obj-types.h:30,
                 from debug.h:28,
                 from rsyslog.h:524,
                 from rsyslog.c:63:
stringbuf.h:36:21: libestr.h: No such file or directory
In file included from obj-types.h:30,
                 from debug.h:28,
                 from rsyslog.h:524,
                 from rsyslog.c:63:
stringbuf.h:58: error: parse error before "es_str_t"
In file included from modules.h:39,
                 from obj-types.h:416,
                 from debug.h:28,
                 from rsyslog.h:524,
                 from rsyslog.c:63:
../grammar/rainerscript.h:74: error: parse error before "es_str_t"
../grammar/rainerscript.h:74: warning: no semicolon at end of struct or
union
../grammar/rainerscript.h:74: warning: no semicolon at end of struct or
union
../grammar/rainerscript.h:78: error: parse error before '}' token
../grammar/rainerscript.h:78: warning: type defaults to `int' in
declaration of `d'
../grammar/rainerscript.h:78: warning: data definition has no type or
storage class
../grammar/rainerscript.h:82: error: parse error before '}' token
../grammar/rainerscript.h:98: error: parse error before "es_str_t"
../grammar/rainerscript.h:98: warning: no semicolon at end of struct or
union
../grammar/rainerscript.h:105: error: parse error before '}' token
../grammar/rainerscript.h:166: error: parse error before "es_str_t"
../grammar/rainerscript.h:166: warning: no semicolon at end of struct or
union
../grammar/rainerscript.h:166: warning: no semicolon at end of struct or
union
../grammar/rainerscript.h:166: warning: no semicolon at end of struct or
union
../grammar/rainerscript.h:169: error: parse error before '}' token
../grammar/rainerscript.h:169: warning: type defaults to `int' in
declaration of `s_call'
../grammar/rainerscript.h:169: warning: data definition has no type or
storage class
../grammar/rainerscript.h:181: error: parse error before "es_str_t"
../grammar/rainerscript.h:181: warning: no semicolon at end of struct or
union
../grammar/rainerscript.h:184: error: parse error before '}' token
../grammar/rainerscript.h:184: warning: type defaults to `int' in
declaration of `s_propfilt'
../grammar/rainerscript.h:184: warning: data definition has no type or
storage class
../grammar/rainerscript.h:186: error: parse error before '}' token
../grammar/rainerscript.h:186: warning: type defaults to `int' in
declaration of `d'
../grammar/rainerscript.h:186: warning: data definition has no type or
storage class
../grammar/rainerscript.h:187: error: parse error before '}' token
../grammar/rainerscript.h:202: error: parse error before "es_str_t"
../grammar/rainerscript.h:202: warning: no semicolon at end of struct or
union
../grammar/rainerscript.h:213: error: parse error before "es_str_t"
../grammar/rainerscript.h:213: warning: no semicolon at end of struct or
union
../grammar/rainerscript.h:238: error: parse error before "es_str_t"
../grammar/rainerscript.h:238: warning: no semicolon at end of struct or
union
../grammar/rainerscript.h:243: error: parse error before '}' token
../grammar/rainerscript.h:280: error: field `val' has incomplete type
../grammar/rainerscript.h:290: error: parse error before "es_str_t"
../grammar/rainerscript.h:294: warning: declaration of 'ar' shadows a
global declaration
../grammar/rainerscript.h:75: warning: shadowed declaration is here
../grammar/rainerscript.h:295: error: parse error before '*' token
../grammar/rainerscript.h:296: error: parse error before "es_str_t"
../grammar/rainerscript.h:300: error: parse error before "es_str_t"
../grammar/rainerscript.h:305: warning: declaration of 'expr' shadows a
global declaration
../grammar/rainerscript.h:242: warning: shadowed declaration is here
../grammar/rainerscript.h:306: warning: declaration of 'expr' shadows a
global declaration
../grammar/rainerscript.h:242: warning: shadowed declaration is here
../grammar/rainerscript.h:307: warning: declaration of 'expr' shadows a
global declaration
../grammar/rainerscript.h:242: warning: shadowed declaration is here
../grammar/rainerscript.h:308: warning: declaration of 'expr' shadows a
global declaration
../grammar/rainerscript.h:242: warning: shadowed declaration is here
../grammar/rainerscript.h:309: warning: declaration of 'val' shadows a
global declaration
../grammar/rainerscript.h:99: warning: shadowed declaration is here
../grammar/rainerscript.h:310: error: parse error before '*' token
../grammar/rainerscript.h:312: error: parse error before '*' token
../grammar/rainerscript.h:313: warning: declaration of 'expr' shadows a
global declaration
../grammar/rainerscript.h:242: warning: shadowed declaration is here
../grammar/rainerscript.h:323: warning: declaration of 'stmt' shadows a
global declaration
../grammar/rainerscript.h:167: warning: shadowed declaration is here
../grammar/rainerscript.h:324: warning: declaration of 'stmt' shadows a
global declaration
../grammar/rainerscript.h:167: warning: shadowed declaration is here
../grammar/rainerscript.h:328: warning: declaration of 't_then' shadows a
global declaration
../grammar/rainerscript.h:182: warning: shadowed declaration is here
../grammar/rainerscript.h:329: warning: declaration of 't_then' shadows a
global declaration
../grammar/rainerscript.h:182: warning: shadowed declaration is here
../grammar/rainerscript.h:332: warning: declaration of 'expr' shadows a
global declaration
../grammar/rainerscript.h:242: warning: shadowed declaration is here
../grammar/rainerscript.h:334: error: parse error before '*' token
../grammar/rainerscript.h:338: error: parse error before '*' token
../grammar/rainerscript.h:340: warning: declaration of 'ar' shadows a
global declaration
../grammar/rainerscript.h:75: warning: shadowed declaration is here
../grammar/rainerscript.h:340: error: parse error before "es_str_t"
../grammar/rainerscript.h:341: warning: declaration of 'ar' shadows a
global declaration
../grammar/rainerscript.h:75: warning: shadowed declaration is here
../grammar/rainerscript.h:348: error: parse error before "es_str_t"
In file included from obj.h:47,
                 from rsyslog.h:525,
                 from rsyslog.c:63:
var.h:41: error: parse error before "es_str_t"
var.h:41: warning: no semicolon at end of struct or union
var.h:41: warning: no semicolon at end of struct or union
var.h:45: error: parse error before '}' token
var.h:45: warning: type defaults to `int' in declaration of `val'
var.h:45: error: conflicting types for 'val'
../grammar/rainerscript.h:99: error: previous declaration of 'val' was here
var.h:45: warning: data definition has no type or storage class
var.h:46: error: parse error before '}' token
var.h:46: warning: type defaults to `int' in declaration of `var_t'
var.h:46: warning: data definition has no type or storage class
var.h:51: error: parse error before '*' token
var.h:52: error: parse error before '*' token
var.h:53: error: parse error before "__attribute__"
var.h:53: warning: no semicolon at end of struct or union
var.h:54: error: parse error before '*' token
var.h:55: warning: type defaults to `int' in declaration of `var_if_t'
var.h:55: warning: data definition has no type or storage class
In file included from prop.h:25,
                 from glbl.h:35,
                 from stream.h:70,
                 from obj.h:48,
                 from rsyslog.h:525,
                 from rsyslog.c:63:
atomic.h: In function `ATOMIC_CAS_VAL':
atomic.h:126: warning: declaration of 'val' shadows a global declaration
var.h:45: warning: shadowed declaration is here
atomic.h: In function `ATOMIC_INC_AND_FETCH_int':
atomic.h:144: warning: declaration of 'val' shadows a global declaration
var.h:45: warning: shadowed declaration is here
atomic.h: In function `ATOMIC_INC_AND_FETCH_unsigned':
atomic.h:153: warning: declaration of 'val' shadows a global declaration
var.h:45: warning: shadowed declaration is here
atomic.h: In function `ATOMIC_DEC_AND_FETCH':
atomic.h:162: warning: declaration of 'val' shadows a global declaration
var.h:45: warning: shadowed declaration is here
atomic.h: In function `ATOMIC_FETCH_32BIT':
atomic.h:171: warning: declaration of 'val' shadows a global declaration
var.h:45: warning: shadowed declaration is here
atomic.h: At top level:
atomic.h:179: warning: declaration of 'val' shadows a global declaration
var.h:45: warning: shadowed declaration is here
atomic.h: In function `ATOMIC_INC_AND_FETCH_uint64':
atomic.h:217: warning: declaration of 'val' shadows a global declaration
var.h:45: warning: shadowed declaration is here
In file included from rsyslog.h:525,
                 from rsyslog.c:63:
obj.h: At top level:
obj.h:122: error: parse error before '*' token
In file included from /usr/include/json/json.h:21,
                 from ../template.h:33,
                 from msg.h:26,
                 from batch.h:30,
                 from wti.h:28,
                 from rsyslog.c:66:
/usr/include/json/debug.h:25: warning: declaration of 'syslog' shadows a
global declaration
/opt/ppc/82xx/bin/../target/usr/include/sys/syslog.h:191: warning: shadowed
declaration is here
In file included from /usr/include/json/linkhash.h:16,
                 from /usr/include/json/json.h:22,
                 from ../template.h:33,
                 from msg.h:26,
                 from batch.h:30,
                 from wti.h:28,
                 from rsyslog.c:66:
/usr/include/json/json_object.h:190: warning: declaration of 'val' shadows
a global declaration
var.h:45: warning: shadowed declaration is here
/usr/include/json/json_object.h:311: warning: declaration of 'val' shadows
a global declaration
var.h:45: warning: shadowed declaration is here
/usr/include/json/json_object.h:329: warning: declaration of 'val' shadows
a global declaration
var.h:45: warning: shadowed declaration is here
/usr/include/json/json_object.h:417: warning: declaration of 'd' shadows a
global declaration
../grammar/rainerscript.h:186: warning: shadowed declaration is here
In file included from msg.h:26,
                 from batch.h:30,
                 from wti.h:28,
                 from rsyslog.c:66:
../template.h:43: error: parse error before "es_str_t"
../template.h:43: warning: no semicolon at end of struct or union
../template.h:56: error: parse error before '}' token
In file included from ../template.h:67,
                 from msg.h:26,
                 from batch.h:30,
                 from wti.h:28,
                 from rsyslog.c:66:
./msg.h:177: error: parse error before "es_str_t"
./msg.h:179: error: parse error before "var_t"
./msg.h:180: error: parse error before '*' token
./msg.h:180: warning: type defaults to `int' in declaration of
`msgGetMsgVarNew'
./msg.h:180: warning: data definition has no type or storage class
./msg.h:186: error: parse error before "var_t"
./msg.h:187: error: parse error before '*' token
./msg.h:187: warning: type defaults to `int' in declaration of
`msgGetCEEVarNew'
./msg.h:187: warning: data definition has no type or storage class
./msg.h:188: warning: declaration of 'json' shadows a global declaration
../grammar/rainerscript.h:77: warning: shadowed declaration is here
./msg.h:189: error: parse error before "es_str_t"
./msg.h:207: error: parse error before "es_str_t"
./msg.h:210: error: parse error before "es_str_t"
In file included from msg.h:26,
                 from batch.h:30,
                 from wti.h:28,
                 from rsyslog.c:66:
../template.h:106: error: parse error before "es_str_t"
../template.h:106: warning: no semicolon at end of struct or union
../template.h:106: warning: no semicolon at end of struct or union
../template.h:106: warning: no semicolon at end of struct or union
../template.h:124: error: parse error before '}' token
../template.h:124: warning: type defaults to `int' in declaration of
`field'
../template.h:124: warning: data definition has no type or storage class
../template.h:125: error: parse error before '}' token
../template.h:125: warning: type defaults to `int' in declaration of `data'
../template.h:125: warning: data definition has no type or storage class
../template.h:126: error: parse error before '}' token
In file included from wti.h:28,
                 from rsyslog.c:66:
batch.h:98: warning: declaration of 'val' shadows a global declaration
var.h:45: warning: shadowed declaration is here
In file included from rsyslog.c:70:
conf.h:66: warning: declaration of 'stmt' shadows a global declaration
../grammar/rainerscript.h:167: warning: shadowed declaration is here
In file included from rsyslog.c:76:
parser.h:46: error: parse error before '*' token
../grammar/rainerscript.h:242: warning: array 'expr' assumed to have one
element
../grammar/rainerscript.h:99: error: storage size of `val' isn't known
make[2]: *** [librsyslog_la-rsyslog.lo] Error 1
make[2]: Leaving directory `/home/nitin/mfh/rsyslog-7.4.9/runtime'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nitin/mfh/rsyslog-7.4.9'
make: *** [all] Error 2


Please help me with some valuable pointers.

Thanks,
Mamba!


More information about the rsyslog-notify mailing list