When I try and cross compile zabbix-agent 1.8 for openwrt kamikaze 8.09 i get the following
./configure --host=mipsel --enable-agent
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for mipsel-strip... no
checking for strip... strip
configure: Configuring
checking whether make sets $(MAKE)... (cached) yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... mipsel-unknown-elf
checking for mipsel-gcc... mipsel-linux-uclibc-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether mipsel-linux-uclibc-gcc accepts -g... yes
checking for mipsel-linux-uclibc-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of mipsel-linux-uclibc-gcc... gcc3
checking whether mipsel-linux-uclibc-gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... mipsel-linux-uclibc-cpp
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking mtent.h usability... no
checking mtent.h presence... no
checking for mtent.h... no
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/mount.h usability... yes
checking sys/mount.h presence... yes
checking for sys/mount.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking sys/vfs.h usability... yes
checking sys/vfs.h presence... yes
checking for sys/vfs.h... yes
checking sys/pstat.h usability... no
checking sys/pstat.h presence... no
checking for sys/pstat.h... no
checking sys/sysinfo.h usability... yes
checking sys/sysinfo.h presence... yes
checking for sys/sysinfo.h... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking for sys/socket.h... (cached) yes
checking sys/loadavg.h usability... no
checking sys/loadavg.h presence... no
checking for sys/loadavg.h... no
checking for arpa/inet.h... (cached) yes
checking sys/swap.h usability... yes
checking sys/swap.h presence... yes
checking for sys/swap.h... yes
checking sys/vmmeter.h usability... no
checking sys/vmmeter.h presence... no
checking for sys/vmmeter.h... no
checking for strings.h... (cached) yes
checking sys/sysctl.h usability... yes
checking sys/sysctl.h presence... yes
checking for sys/sysctl.h... yes
checking vm/vm_param.h usability... no
checking vm/vm_param.h presence... no
checking for vm/vm_param.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking kstat.h usability... no
checking kstat.h presence... no
checking for kstat.h... no
checking sys/syscall.h usability... yes
checking sys/syscall.h presence... yes
checking for sys/syscall.h... yes
checking sys/sysmacros.h usability... yes
checking sys/sysmacros.h presence... yes
checking for sys/sysmacros.h... yes
checking sys/procfs.h usability... yes
checking sys/procfs.h presence... yes
checking for sys/procfs.h... yes
checking for stdint.h... (cached) yes
checking mach/host_info.h usability... no
checking mach/host_info.h presence... no
checking for mach/host_info.h... no
checking mach/mach_host.h usability... no
checking mach/mach_host.h presence... no
checking for mach/mach_host.h... no
checking knlist.h usability... no
checking knlist.h presence... no
checking for knlist.h... no
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking sys/proc.h usability... no
checking sys/proc.h presence... no
checking for sys/proc.h... no
checking sys/var.h usability... no
checking sys/var.h presence... no
checking for sys/var.h... no
checking resolv.h usability... yes
checking resolv.h presence... yes
checking for resolv.h... yes
checking arpa/nameser.h usability... yes
checking arpa/nameser.h presence... yes
checking for arpa/nameser.h... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking sys/dkstat.h usability... no
checking sys/dkstat.h presence... no
checking for sys/dkstat.h... no
checking sys/disk.h usability... no
checking sys/disk.h presence... no
checking for sys/disk.h... no
checking nlist.h usability... no
checking nlist.h presence... no
checking for nlist.h... no
checking net/if.h usability... yes
checking net/if.h presence... yes
checking for net/if.h... yes
checking kvm.h usability... no
checking kvm.h presence... no
checking for kvm.h... no
checking linux/kernel.h usability... yes
checking linux/kernel.h presence... yes
checking for linux/kernel.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking procinfo.h usability... no
checking procinfo.h presence... no
checking for procinfo.h... no
checking sys/dk.h usability... no
checking sys/dk.h presence... no
checking for sys/dk.h... no
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking process.h usability... no
checking process.h presence... no
checking for process.h... no
checking conio.h usability... no
checking conio.h presence... no
checking for conio.h... no
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking winsock2.h usability... no
checking winsock2.h presence... no
checking for winsock2.h... no
checking pdh.h usability... no
checking pdh.h presence... no
checking for pdh.h... no
checking psapi.h usability... no
checking psapi.h presence... no
checking for psapi.h... no
checking sys/sem.h usability... yes
checking sys/sem.h presence... yes
checking for sys/sem.h... yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking Winldap.h usability... no
checking Winldap.h presence... no
checking for Winldap.h... no
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking Winber.h usability... no
checking Winber.h presence... no
checking for Winber.h... no
checking lber.h usability... no
checking lber.h presence... no
checking for lber.h... no
checking ws2tcpip.h usability... no
checking ws2tcpip.h presence... no
checking for ws2tcpip.h... no
checking for inttypes.h... (cached) yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking net/if_mib.h usability... no
checking net/if_mib.h presence... no
checking for net/if_mib.h... no
checking sys/user.h usability... yes
checking sys/user.h presence... yes
checking for sys/user.h... yes
checking sys/ucontext.h usability... yes
checking sys/ucontext.h presence... yes
checking for sys/ucontext.h... yes
checking libperfstat.h usability... no
checking libperfstat.h presence... no
checking for libperfstat.h... no
checking devstat.h usability... no
checking devstat.h presence... no
checking for devstat.h... no
checking sys/systemcfg.h usability... no
checking sys/systemcfg.h presence... no
checking for sys/systemcfg.h... no
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking for library containing socket... none required
checking for library containing kstat_open... no
checking for library containing gethostbyname... none required
checking for library containing perfstat_memory_total... no
checking for library containing devstat_getdevs... no
checking for library containing getdevs... no
checking for main in -lm... yes
checking for main in -lkvm... no
checking for DNS lookup functions... yes
checking for union semun... no
checking for long long format... configure: error: cannot run test program while cross compiling
See `config.log' for more details.
paul@paul-desktop:~/zabbix-1.8.2$
To setup the enviroment i run
. /home/paul/crosscompiling.kam before the configure
This file contains the following
export PATH=/home/paul/8.09/staging_dir/toolchain-mipsel_gcc3.4.6/bin:/home/paul
/8.09/staging_dir/toolchain-mipsel_gcc3.4.6/mipsel-linux-uclibc/lib:$PATH
export AR=/home/paul/8.09/staging_dir/toolchain-mipsel_gcc3.4.6/bin/mipsel-linux
-uclibc-ar
export AS=/home/paul/8.09/staging_dir/toolchain-mipsel_gcc3.4.6/bin/mipsel-linux
-uclibc-as
export LD=/home/paul/8.09/staging_dir/toolchain-mipsel_gcc3.4.6/bin/mipsel-linux
-uclibc-ld
export NM=/home/paul/8.09/staging_dir/toolchain-mipsel_gcc3.4.6/bin/mipsel-linux
-uclibc-nm
export CC=mipsel-linux-uclibc-gcc
export CPP=mipsel-linux-uclibc-cpp
export GCC=mipsel-linux-uclibc-gcc
export CXX=mipsel-linux-uclibc-g++
export RANLIB=mipsel-linux-uclibc-ranlib
export ac_cv_linux_vers=2.4.30
export LDFLAGS="-static"
export CFLAGS="-Os -s"
I successfully cross compiled zabbix for another version of openwrt. Using a similar crosscompiler file with the different settings for CC etc.
Any one know why I get this message. I dont understand why its trying to run the test when it knows its cross compiling.
Any help would be much appreciated.
PS
My development PC is running ubuntu 10.0.4
Paul
./configure --host=mipsel --enable-agent
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for mipsel-strip... no
checking for strip... strip
configure: Configuring
checking whether make sets $(MAKE)... (cached) yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... mipsel-unknown-elf
checking for mipsel-gcc... mipsel-linux-uclibc-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether mipsel-linux-uclibc-gcc accepts -g... yes
checking for mipsel-linux-uclibc-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of mipsel-linux-uclibc-gcc... gcc3
checking whether mipsel-linux-uclibc-gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... mipsel-linux-uclibc-cpp
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking mtent.h usability... no
checking mtent.h presence... no
checking for mtent.h... no
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/mount.h usability... yes
checking sys/mount.h presence... yes
checking for sys/mount.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking sys/vfs.h usability... yes
checking sys/vfs.h presence... yes
checking for sys/vfs.h... yes
checking sys/pstat.h usability... no
checking sys/pstat.h presence... no
checking for sys/pstat.h... no
checking sys/sysinfo.h usability... yes
checking sys/sysinfo.h presence... yes
checking for sys/sysinfo.h... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking for sys/socket.h... (cached) yes
checking sys/loadavg.h usability... no
checking sys/loadavg.h presence... no
checking for sys/loadavg.h... no
checking for arpa/inet.h... (cached) yes
checking sys/swap.h usability... yes
checking sys/swap.h presence... yes
checking for sys/swap.h... yes
checking sys/vmmeter.h usability... no
checking sys/vmmeter.h presence... no
checking for sys/vmmeter.h... no
checking for strings.h... (cached) yes
checking sys/sysctl.h usability... yes
checking sys/sysctl.h presence... yes
checking for sys/sysctl.h... yes
checking vm/vm_param.h usability... no
checking vm/vm_param.h presence... no
checking for vm/vm_param.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking kstat.h usability... no
checking kstat.h presence... no
checking for kstat.h... no
checking sys/syscall.h usability... yes
checking sys/syscall.h presence... yes
checking for sys/syscall.h... yes
checking sys/sysmacros.h usability... yes
checking sys/sysmacros.h presence... yes
checking for sys/sysmacros.h... yes
checking sys/procfs.h usability... yes
checking sys/procfs.h presence... yes
checking for sys/procfs.h... yes
checking for stdint.h... (cached) yes
checking mach/host_info.h usability... no
checking mach/host_info.h presence... no
checking for mach/host_info.h... no
checking mach/mach_host.h usability... no
checking mach/mach_host.h presence... no
checking for mach/mach_host.h... no
checking knlist.h usability... no
checking knlist.h presence... no
checking for knlist.h... no
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking sys/proc.h usability... no
checking sys/proc.h presence... no
checking for sys/proc.h... no
checking sys/var.h usability... no
checking sys/var.h presence... no
checking for sys/var.h... no
checking resolv.h usability... yes
checking resolv.h presence... yes
checking for resolv.h... yes
checking arpa/nameser.h usability... yes
checking arpa/nameser.h presence... yes
checking for arpa/nameser.h... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking sys/dkstat.h usability... no
checking sys/dkstat.h presence... no
checking for sys/dkstat.h... no
checking sys/disk.h usability... no
checking sys/disk.h presence... no
checking for sys/disk.h... no
checking nlist.h usability... no
checking nlist.h presence... no
checking for nlist.h... no
checking net/if.h usability... yes
checking net/if.h presence... yes
checking for net/if.h... yes
checking kvm.h usability... no
checking kvm.h presence... no
checking for kvm.h... no
checking linux/kernel.h usability... yes
checking linux/kernel.h presence... yes
checking for linux/kernel.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking procinfo.h usability... no
checking procinfo.h presence... no
checking for procinfo.h... no
checking sys/dk.h usability... no
checking sys/dk.h presence... no
checking for sys/dk.h... no
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking process.h usability... no
checking process.h presence... no
checking for process.h... no
checking conio.h usability... no
checking conio.h presence... no
checking for conio.h... no
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking winsock2.h usability... no
checking winsock2.h presence... no
checking for winsock2.h... no
checking pdh.h usability... no
checking pdh.h presence... no
checking for pdh.h... no
checking psapi.h usability... no
checking psapi.h presence... no
checking for psapi.h... no
checking sys/sem.h usability... yes
checking sys/sem.h presence... yes
checking for sys/sem.h... yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking Winldap.h usability... no
checking Winldap.h presence... no
checking for Winldap.h... no
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking Winber.h usability... no
checking Winber.h presence... no
checking for Winber.h... no
checking lber.h usability... no
checking lber.h presence... no
checking for lber.h... no
checking ws2tcpip.h usability... no
checking ws2tcpip.h presence... no
checking for ws2tcpip.h... no
checking for inttypes.h... (cached) yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking net/if_mib.h usability... no
checking net/if_mib.h presence... no
checking for net/if_mib.h... no
checking sys/user.h usability... yes
checking sys/user.h presence... yes
checking for sys/user.h... yes
checking sys/ucontext.h usability... yes
checking sys/ucontext.h presence... yes
checking for sys/ucontext.h... yes
checking libperfstat.h usability... no
checking libperfstat.h presence... no
checking for libperfstat.h... no
checking devstat.h usability... no
checking devstat.h presence... no
checking for devstat.h... no
checking sys/systemcfg.h usability... no
checking sys/systemcfg.h presence... no
checking for sys/systemcfg.h... no
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking for library containing socket... none required
checking for library containing kstat_open... no
checking for library containing gethostbyname... none required
checking for library containing perfstat_memory_total... no
checking for library containing devstat_getdevs... no
checking for library containing getdevs... no
checking for main in -lm... yes
checking for main in -lkvm... no
checking for DNS lookup functions... yes
checking for union semun... no
checking for long long format... configure: error: cannot run test program while cross compiling
See `config.log' for more details.
paul@paul-desktop:~/zabbix-1.8.2$
To setup the enviroment i run
. /home/paul/crosscompiling.kam before the configure
This file contains the following
export PATH=/home/paul/8.09/staging_dir/toolchain-mipsel_gcc3.4.6/bin:/home/paul
/8.09/staging_dir/toolchain-mipsel_gcc3.4.6/mipsel-linux-uclibc/lib:$PATH
export AR=/home/paul/8.09/staging_dir/toolchain-mipsel_gcc3.4.6/bin/mipsel-linux
-uclibc-ar
export AS=/home/paul/8.09/staging_dir/toolchain-mipsel_gcc3.4.6/bin/mipsel-linux
-uclibc-as
export LD=/home/paul/8.09/staging_dir/toolchain-mipsel_gcc3.4.6/bin/mipsel-linux
-uclibc-ld
export NM=/home/paul/8.09/staging_dir/toolchain-mipsel_gcc3.4.6/bin/mipsel-linux
-uclibc-nm
export CC=mipsel-linux-uclibc-gcc
export CPP=mipsel-linux-uclibc-cpp
export GCC=mipsel-linux-uclibc-gcc
export CXX=mipsel-linux-uclibc-g++
export RANLIB=mipsel-linux-uclibc-ranlib
export ac_cv_linux_vers=2.4.30
export LDFLAGS="-static"
export CFLAGS="-Os -s"
I successfully cross compiled zabbix for another version of openwrt. Using a similar crosscompiler file with the different settings for CC etc.
Any one know why I get this message. I dont understand why its trying to run the test when it knows its cross compiling.
Any help would be much appreciated.
PS
My development PC is running ubuntu 10.0.4
Paul
Comment