GNOME Bugzilla – Bug 467416
impossible to cross build
Last modified: 2011-08-25 04:55:37 UTC
As described in Gentoo's bugzilla, http://bugs.gentoo.org/show_bug.cgi?id=185684, Because libart_lgpl tries to run the result of the compiled gen_art_config.c to generate art_config.h, libart fails to cross compile (since is trying to run an ARM binary on an Intel machine). ====================================== ./configure --prefix=/usr --host=arm-softfloat-linux-uclibc --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --build=i486-pc-linux-gnu checking for arm-softfloat-linux-uclibc-gcc... arm-softfloat-linux-uclibc-gcc checking whether arm-softfloat-linux-uclibc-gcc accepts -g... yes checking for arm-softfloat-linux-uclibc-gcc option to accept ISO C89... none needed checking build system type... i486-pc-linux-gnu checking host system type... arm-softfloat-linux-uclibc checking for arm-softfloat-linux-uclibc-g++... arm-softfloat-linux-uclibc-g++ checking whether we are using the GNU C++ compiler... yes checking for gfortran... gfortran configure: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org. configure: creating ./config.status config.status: creating libart-features.h config.status: creating Makefile config.status: creating libart-2.0.pc config.status: creating libart-2.0-uninstalled.pc config.status: creating libart-zip config.status: creating libart-config config.status: creating config.h config.status: executing depfiles commands arm-softfloat-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I. -I. -DLIBART_COMPILATION -Os -pipe -Wall -Wmissing-prototypes -MT gen_art_config.o -MD -MP -MF .deps/gen_art_config.Tpo -c -o gen_art_config.o gen_art_config.c mv -f .deps/gen_art_config.Tpo .deps/gen_art_config.Po /bin/sh ./libtool --tag=CC --mode=link arm-softfloat-linux-uclibc-gcc -Os -pipe -Wall -Wmissing-prototypes -o gen_art_config gen_art_config.o mkdir .libs arm-softfloat-linux-uclibc-gcc -Os -pipe -Wall -Wmissing-prototypes -o gen_art_config gen_art_config.o ./gen_art_config > art_config.h /bin/sh: ./gen_art_config: cannot execute binary file make: *** [art_config.h] Error 126 ========================================= The header is pretty simple and it can be avoided entirely by using stdint.h or inttypes.h in art_misc.h, but I fear that some apps include this file directly (as a search for 'include art_config.h' suggests. This is what the generated header looks like on Intel x86: /* Automatically generated by gen_art_config.c */ #define ART_SIZEOF_CHAR 1 #define ART_SIZEOF_SHORT 2 #define ART_SIZEOF_INT 4 #define ART_SIZEOF_LONG 4 typedef unsigned char art_u8; typedef unsigned short art_u16; typedef unsigned int art_u32; The ART_SIZEOF_* definitions are not used at all in the source so I commented them out in the patch I proposed. The new art_config.h file loks like this: $ cat art_config.h #include <stdint.h> /* it looks like these definitions are not used at all */ /* #define ART_SIZEOF_CHAR 1 #define ART_SIZEOF_SHORT 2 #define ART_SIZEOF_INT 4 #define ART_SIZEOF_LONG 4 */ typedef uint8_t art_u8; typedef uint16_t art_u16; typedef uint32_t art_u32; I made a patch and applied it over trunk. After that, the package cross compiled fine.
Created attachment 93805 [details] [review] minmalist patch to allow cross compiling without removing art_config.h This patch creates an art_config.h.keep file which is copied to art_config.h during the build via the modified Makefile.am. The definitions of art_u* are done now using definitions from stdint.h, which is included in art_config.h. It also removes the definitions for ART_SIZEOF_* since they seem to be unused in the source.
Of course the gen_art_config.c file should be removed from the source.
libart development has been stalled and it has been unmaintained now. Maintainers don't have future development plan so i am closing all the bugs as WONTFIX. Please feel free to reopen the bugs in future if anyone takes the responsibility for active development.