porting monit to yocto compilation error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

porting monit to yocto compilation error

kris duff
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 | Threaded
Open this post in threaded view
|

Re: porting monit to yocto compilation error

Rory Toma-3

When I build on arm under openwrt, here is what I havwe to use:

define Build/Configure
        $(call Build/Configure/Default,libmonit_cv_setjmp_available=yes ac_cv_header_atomic_h=yes libmonit_cv_vsnprintf_c99_conformant=yes --without-ssl --without-pam,CFLAGS="-I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include -I$(LINUX_DIR)/include")
endef


On 7/12/2017 9:52 AM, kris duff wrote:
 -I${S}/libmonit/src/net  \


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: porting monit to yocto compilation error

kris duff
Thank you for your reply.

With your reply, I have seen that it was not needed to add all the -I... So for I ended up using inherit autotools-brokensep instead of inherit autotools ... and it is working now!

Thank you a lot

Kris


On Wednesday, July 12, 2017 1:22 PM, Rory Toma <[hidden email]> wrote:


When I build on arm under openwrt, here is what I havwe to use:
define Build/Configure
        $(call Build/Configure/Default,libmonit_cv_setjmp_available=yes ac_cv_header_atomic_h=yes libmonit_cv_vsnprintf_c99_conformant=yes --without-ssl --without-pam,CFLAGS="-I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include -I$(LINUX_DIR)/include")
endef


On 7/12/2017 9:52 AM, kris duff wrote:
 -I${S}/libmonit/src/net  \




--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general