Open koutheir opened 3 years ago
I'm really not sure there's much I can do to fix this. It's a limitation of GNU autoconfig.
I use Autoconf tools and scripts all the time to cross-compile software. I'm certain this is not a limitation of Autoconf.
If your autoconf scripts aren't testing for setpgrp
, then your assertion isn't supportable.
Is there a way to make this check optional and provide its value through a parameter to configure
?
This would put the responsibility of verifying support for this function on the person who builds the software, and at least allow to produce a binary for the target device.
https://vanducuy.wordpress.com/2009/11/19/libdaemon-0-14-cross-compile-error/
[daemonize]$ AUTOCONFIG_POSTFIX_EXTRAS+= ac_cv_func_getpgrp_void=no ac_cv_func_setpgrp_void=yes ac_cv_func_memcmp_working=yes rb_cv_binary_elf=no rb_cv_negative_time_t=no ./configure --host=arm-linux-gnueabi --build=x86_64-pc-linux-gnu CC=arm-linux-gnueabihf-gcc
checking for arm-linux-gnueabi-gcc... arm-linux-gnueabihf-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-linux-gnueabihf-gcc accepts -g... yes
checking for arm-linux-gnueabihf-gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... arm-linux-gnueabihf-gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/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 minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking for an ANSI C-conforming const... yes
checking for uid_t in sys/types.h... yes
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for 'sig_t' typedef... yes
checking for 'struct passwd'... yes
checking for 'pw_comment' field... no
checking for 'pw_gecos' field... yes
checking for predefined 'bool' type... no
checking for TRUE constant in standard headers... no
checking for FALSE constant in standard headers... no
checking for initgroups... yes
checking for getpgrp... yes
checking for setpgrp... yes
checking for setsid... yes
checking whether getpgrp requires zero arguments... (cached) no
checking whether setpgrp takes no argument... (cached) yes
checking for vprintf... yes
checking for _doprnt... no
checking for vfork... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... (cached) yes
checking for working fork... cross
configure: WARNING: result yes guessed because of cross compilation
checking for working vfork... (cached) yes
checking for strerror... yes
checking for daemon... yes
checking for basename... yes
checking for setenv... yes
checking for flock... yes
checking for long file names... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
***
*** daemonize is released under a BSD-style license.
*** See the LICENSE file distributed with the source code for details.
***
[daemonize]$ make
arm-linux-gnueabihf-gcc -g -O2 -c daemonize.c -I. -I.
arm-linux-gnueabihf-gcc -g -O2 -c getopt.c -I. -I.
arm-linux-gnueabihf-gcc -g -O2 -o daemonize daemonize.o getopt.o
[daemonize]$ file daemonize
daemonize: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=6edf3b1ea73ab553beaa246635a62f20affeaeb4, with debug_info, not stripped
[daemonize]$
Attempting to cross-compile for Android/AArch64 fails with the message:
Full log: