[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: configure: error: cannot run test program while cross compiling (arm
From: |
Martin Pala |
Subject: |
Re: configure: error: cannot run test program while cross compiling (arm linux uclibc) |
Date: |
Wed, 28 Mar 2012 15:03:10 +0200 |
Hi,
the configure error during cross-compilation occurs because of the
AC_RUN_IFELSE which tries to execute the test program for setjmp() and
vsnprintf() C99 compliance. The problem will be fixed in the next Monit release.
Regarding the geloadavg() problem - your libc probably doesn't have the
geloadavg. It is present in glibc since version 2.2, but some libraries which
are usually used on embedded systems like uclibc doesn't implement
getloadavg(). Workaround could be to modify the getloadavg_sysdep() in
src/process/sysdep_LINUX.c - either implement the functionality on top of
/proc/loadavg or if you don't need to test load average, remove the getloadavg
call or add dummy getloadavg function or macro.
For the next Monit release we will implement the getloadavg_sysdep() for LINUX
on top of /proc/loadavg => it won't require the libc support for it and will
work fine with uclibc and similar libraries.
Regards,
martin
On Mar 28, 2012, at 11:22 AM, Arreche wrote:
> Hi,
>
> I'm trying to cross compile monit for arm linux uclibc in this way:
>
> export CC=arm-linux-uclibc-gcc
> ./configure --without-ssl --host=arm-linux-uclibc
>
> But got this error:
>
> configure: error: in `/home/aentos/Descargas/monit-5.3.2/libmonit':
> configure: error: cannot run test program while cross compiling
> See `config.log' for more details.
> configure: error: ./configure failed for libmonit
>
> So I commented those checks in libmonit/configure and try again getting this
> error:
>
> src/process/sysdep_LINUX.o: In function `getloadavg_sysdep':
> sysdep_LINUX.c:(.text+0x4ac): undefined reference to `getloadavg'
> collect2: ld returned 1 exit status
>
> Any idea?
>
> Thanks!
>
> --
> .
>
> <config.log>--
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general