Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 305495 - dev-libs/glib-1.2.10-r5 failed: cannot run test program while cross compiling
Summary: dev-libs/glib-1.2.10-r5 failed: cannot run test program while cross compiling
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: ARM Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2010-02-17 09:11 UTC by Marcel Selhorst
Modified: 2017-02-10 18:32 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Selhorst 2010-02-17 09:11:07 UTC
When cross-compiling glib for ARM using the crossdev-wrappers provided by Gentoo, building of glib fails, since the test program cannot be executed on the host machine.

Reproducible: Always

Steps to Reproduce:
1. emerge crossdev
2. crossdev -t armv7l-none-linux-gnueabi
3. emerge-wrapper --init
4. armv7l-none-linux-gnueabi-emerge glib

Actual Results:  
 * CPV:  dev-libs/glib-1.2.10-r5                                                                                                   
 * REPO: gentoo                                                                                                                    
 * USE:  arm kernel_linux userland_GNU                                                                                             
 * Applying glib-1.2.10-automake.patch ...                                [ ok ]                                                   
 * Applying glib-1.2.10-m4.patch ...                                      [ ok ]                                                   
 * Applying glib-1.2.10-configure-LANG.patch ...                          [ ok ]                                                   
 * Applying glib-1.2.10-gcc34-fix.patch ...                               [ ok ]                                                   
 * Applying glib-1.2.10-r1-as-needed.patch.bz2 ...                        [ ok ]                                                   
 * Appending a library link instruction (-ldl); libraries to link to should not be passed through LDFLAGS                          
 * Running eautoreconf in '/usr/armv7l-none-linux-gnueabi/tmp/portage/dev-libs/glib-1.2.10-r5/work/glib-1.2.10' ...                
 * Running aclocal ...                                                    [ ok ]                                                   
 * Running libtoolize --copy --force --install --automake ...             [ ok ]                                                   
 * Running aclocal ...                                                    [ ok ]                                                   
 * Running autoconf ...                                                   [ ok ]                                                   
 * Running autoheader ...                                                 [ ok ]                                                   
 * Running automake --add-missing --copy ...                              [ ok ]                                                   
 * Running elibtoolize in: glib-1.2.10                                                                                             
 *   Applying portage-2.2.patch ...                                                                                                
 *   Applying sed-1.5.6.patch ...                                                                                                  
 *   Applying cross-link-ROOT.patch ...                                                                                            
 *   Applying as-needed-2.2.6.patch ...                                                                                            
 *   Applying uclibc-ltconf-1.3.0.patch ...                                                                                        
configure: loading site script /usr/share/config.site                                                                              
configure: loading site script /usr/share/crossdev/include/site/linux                                                              
configure: loading site script /usr/share/crossdev/include/site/linux-gnueabi                                                      
configure: loading site script /usr/share/crossdev/include/site/arm-linux-gnueabi                                                  
checking build system type... i686-pc-linux-gnu                                                                                    
checking host system type... armv7l-none-linux-gnueabi                                                                             
checking target system type... armv7l-none-linux-gnueabi                                                                           
checking for a BSD-compatible install... /usr/bin/install -c                                                                       
checking whether build environment is sane... yes                                                                                  
/usr/armv7l-none-linux-gnueabi/tmp/portage/dev-libs/glib-1.2.10-r5/work/glib-1.2.10/missing: Unknown `--run' option                
Try `/usr/armv7l-none-linux-gnueabi/tmp/portage/dev-libs/glib-1.2.10-r5/work/glib-1.2.10/missing --help' for more information      
configure: WARNING: `missing' script is too old or missing                                                                         
checking for armv7l-none-linux-gnueabi-strip... armv7l-none-linux-gnueabi-strip                                                    
checking for a thread-safe mkdir -p... /bin/mkdir -p                                                                               
checking for gawk... gawk                                                                                                          
checking whether make sets $(MAKE)... yes                                                                                          
checking for style of include used by make... GNU                                                                                  
checking for armv7l-none-linux-gnueabi-gcc... armv7l-none-linux-gnueabi-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 armv7l-none-linux-gnueabi-gcc accepts -g... yes                                                                   
checking for armv7l-none-linux-gnueabi-gcc option to accept ISO C89... none needed                                                 
checking dependency style of armv7l-none-linux-gnueabi-gcc... gcc3                                                                 
checking for a sed that does not truncate output... /bin/sed                                                                       
checking for grep that handles long lines and -e... /bin/grep                                                                      
checking for egrep... /bin/grep -E                                                                                                 
checking for fgrep... /bin/grep -F                                                                                                 
checking for ld used by armv7l-none-linux-gnueabi-gcc... /usr/libexec/gcc/armv7l-none-linux-gnueabi/ld                             
checking if the linker (/usr/libexec/gcc/armv7l-none-linux-gnueabi/ld) is GNU ld... yes                                            
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/armv7l-none-linux-gnueabi-nm -B                                    
checking the name lister (/usr/bin/armv7l-none-linux-gnueabi-nm -B) interface... BSD nm                                            
checking whether ln -s works... yes                                                                                                
checking the maximum length of command line arguments... 1572864                                                                   
checking whether the shell understands some XSI constructs... yes                                                                  
checking whether the shell understands "+="... yes                                                                                 
checking for /usr/libexec/gcc/armv7l-none-linux-gnueabi/ld option to reload object files... -r                                     
checking for armv7l-none-linux-gnueabi-objdump... armv7l-none-linux-gnueabi-objdump                                                
checking how to recognize dependent libraries... pass_all                                                                          
checking for armv7l-none-linux-gnueabi-ar... armv7l-none-linux-gnueabi-ar                                                          
checking for armv7l-none-linux-gnueabi-strip... (cached) armv7l-none-linux-gnueabi-strip                                           
checking for armv7l-none-linux-gnueabi-ranlib... armv7l-none-linux-gnueabi-ranlib                                                  
checking command to parse /usr/bin/armv7l-none-linux-gnueabi-nm -B output from armv7l-none-linux-gnueabi-gcc object... ok          
checking how to run the C preprocessor... armv7l-none-linux-gnueabi-gcc -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 for dlfcn.h... yes
checking for objdir... .libs
checking if armv7l-none-linux-gnueabi-gcc supports -fno-rtti -fno-exceptions... no
checking for armv7l-none-linux-gnueabi-gcc option to produce PIC... -fPIC -DPIC
checking if armv7l-none-linux-gnueabi-gcc PIC flag -fPIC -DPIC works... yes
checking if armv7l-none-linux-gnueabi-gcc static flag -static works... yes
checking if armv7l-none-linux-gnueabi-gcc supports -c -o file.o... yes
checking if armv7l-none-linux-gnueabi-gcc supports -c -o file.o... (cached) yes
checking whether the armv7l-none-linux-gnueabi-gcc linker (/usr/libexec/gcc/armv7l-none-linux-gnueabi/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether to enable memory checking... no
checking whether to enable memory profiling... no
checking for armv7l-none-linux-gnueabi-gcc... (cached) armv7l-none-linux-gnueabi-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether armv7l-none-linux-gnueabi-gcc accepts -g... (cached) yes
checking for armv7l-none-linux-gnueabi-gcc option to accept ISO C89... (cached) none needed
checking dependency style of armv7l-none-linux-gnueabi-gcc... (cached) gcc3
checking for armv7l-none-linux-gnueabi-gcc... (cached) armv7l-none-linux-gnueabi-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether armv7l-none-linux-gnueabi-gcc accepts -g... (cached) yes
checking for armv7l-none-linux-gnueabi-gcc option to accept ISO C89... (cached) none needed
checking dependency style of armv7l-none-linux-gnueabi-gcc... (cached) gcc3
checking for extra flags to get ANSI library prototypes... configure: error: in `/usr/armv7l-none-linux-gnueabi/tmp/portage/dev-libs/glib-1.2.10-r5/work/glib-1.2.10':
configure: error: cannot run test program while cross compiling
See `config.log' for more details.

!!! Please attach the following file when seeking support:
!!! /usr/armv7l-none-linux-gnueabi/tmp/portage/dev-libs/glib-1.2.10-r5/work/glib-1.2.10/config.log
 * ERROR: dev-libs/glib-1.2.10-r5 failed:
 *   econf failed
 *
 * Call stack:
 *     ebuild.sh, line   54:  Called src_compile
 *   environment, line 3119:  Called econf '--with-threads=posix' '--enable-debug=yes'
 *     ebuild.sh, line  544:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 *
 * If you need support, post the output of 'emerge --info =dev-libs/glib-1.2.10-r5',
 * the complete build log and the output of 'emerge -pqv =dev-libs/glib-1.2.10-r5'.
 * The complete build log is located at '/usr/armv7l-none-linux-gnueabi/tmp/portage/dev-libs/glib-1.2.10-r5/temp/build.log'.
 * The ebuild environment file is located at '/usr/armv7l-none-linux-gnueabi/tmp/portage/dev-libs/glib-1.2.10-r5/temp/environment'.
 * S: '/usr/armv7l-none-linux-gnueabi/tmp/portage/dev-libs/glib-1.2.10-r5/work/glib-1.2.10'


Expected Results:  
compile...

Portage 2.1.7.17 (embedded, gcc-4.4.3, glibc-2.11-r1, 2.6.31-14-generic i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.31-14-generic-i686-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Wed, 17 Feb 2010 08:30:01 +0000
app-shells/bash:     4.1_p2
dev-lang/python:     2.6.4-r1, 3.1.1-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20
sys-devel/gcc:       3.4.6-r2, 4.3.4, 4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.32
ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -pipe  -fomit-frame-pointer -I/usr/armv7l-none-linux-gnueabi/usr/include/ -I/usr/armv7l-none-linux-gnueabi/include/"
CHOST="armv7l-none-linux-gnueabi"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-Os -pipe  -fomit-frame-pointer -I/usr/armv7l-none-linux-gnueabi/usr/include/ -I/usr/armv7l-none-linux-gnueabi/include/"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests buildpkg distlocks fixpackages news nodoc noinfo noman parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-L/usr/armv7l-none-linux-gnueabi/lib -L/usr/armv7l-none-linux-gnueabi/usr/lib"
LINGUAS="en"
MAKEOPTS="-j4"
PKGDIR="/usr/armv7l-none-linux-gnueabi/packages/"
PORTAGE_CONFIGROOT="/usr/armv7l-none-linux-gnueabi/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/usr/armv7l-none-linux-gnueabi/tmp/"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="arm bindist kdrive make-symlinks minimal modules multicall zlib" ELIBC="glibc" INPUT_DEVICES="evdev mouse keyboard tslib" KERNEL="linux" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Pacho Ramos gentoo-dev 2011-06-19 10:45:13 UTC
Maybe arm team knows how to handle this cases :-|
Comment 2 Siarhei Siamashka 2012-04-07 22:07:30 UTC
Seems like dev-libs/glib-2.32.0 can be successfully crosscompiled as long as the same version of glib is installed on the host computer (needed for glib-compile-resources tool).
Comment 3 Pacho Ramos gentoo-dev 2012-04-08 11:28:58 UTC
This is for old glib-1
Comment 4 Siarhei Siamashka 2012-04-09 18:12:23 UTC
(In reply to comment #3)
> This is for old glib-1

glib-2 also has a track record of crosscompilation issues.

The ebuild for 2.28.8 wants python (which is a PITA to crosscompile), 2.30.x is affected by http://git.gnome.org/browse/glib/commit/?id=6bb8fdaa5fad07713b189ea53e6c5afd67ad9b4e and fails with "configure: error: cannot run test program while cross compiling" error message. But luckily glib-2.32.0 builds fine with crosscompilation.

Based on the "Steps to Reproduce" information, the original reporter did not seem to be interested specifically in old glib-1. Sorry if I commented on the wrong bug.
Comment 5 Pacho Ramos gentoo-dev 2017-02-10 18:32:12 UTC
this was dropped from the tree