I was successfull porting monit 5.8 to yocto.
Now I want to use the new feature of 5.20 / 5.23 to the same yocto. 
I have changed the cflags to include the following directories :
-I${STAGING_INCDIR} \   -I${S}/libmonit/src \   -I${S}/libmonit/src/exceptions 
\   -I${S}/libmonit/src/io \   -I${S}/libmonit/src/net  \   
-I${S}/libmonit/src/statistics \   -I${S}/libmonit/src/util \   
-I${S}/libmonit/src/thread \   -I${S}/src \   -I${S}/src/ssl \   
-I${S}/src/notification \   -I${S}/src/process \   -I${S}/src/http \   
-I${S}/src/protocols \   -I${S}/src/terminal \   -I${S}/src/net \   
-I${S}/src/device \
if I omit 1 of these directory the compilation fails because it cannot find an 
header file but when I include all of these I am getting warning about 
redefinition of ELSE and I am getting the following error :
| In file included from 
monit-5.23.0/libmonit/src/exceptions/AssertException.h:29:0,|                  
from monit-5.23.0/libmonit/src/exceptions/assert.h:47,|                  from 
monit-5.23.0/src/monit.h:30,|                  from monit-5.23.0/src/net.h:30,| 
                 from src/p.y:120:| 
monit-5.23.0/libmonit/src/exceptions/Exception.h:269:17: error: expected 
identifier before 'if'|                  if (Exception_flag == 
Exception_entered) pop_exception_stack; \
The gcc command is :
--------------------------------------------------------------- 8< 
--------------------------------------------------
 arm-poky-linux-gnueabi-gcc  -march=armv7-a -mthumb-interwork -mfloat-abi=hard 
-mfpu=neon -mtune=cortex-a8 --sysroot=/build/tmp/sysroots/overo -DHAVE_CONFIG_H 
-I. 
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0
 -I./src    -DLINUX -DSYSCONFDIR="\"/etc\"" -I./src -I./src/device -I./src/http 
-I./src/notification -I./src/process -I./src/protocols -I./src/ssl 
-I./src/terminal -I./libmonit/src   -Wno-address -Wno-pointer-sign  -O2 -pipe 
-g -feliminate-unused-debug-types -I/build/tmp/sysroots/overo/usr/include       
         
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/libmonit/src
       
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/libmonit/src/exceptions
                 
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/libmonit/src/io
             
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/libmonit/src/net
               
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/libmonit/src/statistics
             
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/libmonit/src/util
              
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/libmonit/src/thread
                 
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/src
            
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/src/ssl
             
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/src/notification
   
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/src/process
             
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/src/http
            
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/src/protocols
                  
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/src/terminal
                
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/src/net
                
-I/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/src/device
                   -Wall -Wunused -Wno-unused-label -funsigned-char 
-D_GNU_SOURCE -std=c99 -D _REENTRANT -I/build/tmp/sysroots/overo/usr/include -c 
-o src/alert.o 
/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/monit/5.23.0-r0/monit-5.23.0/src/alert.c

--------------------------------------------------------------- 8< 
--------------------------------------------------

Does anyone has an idea on how to solve the problem ?
Thank you
Regards
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to