public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] problems crosscompiling libXt
@ 2005-12-17 23:20 David Thomas
  2005-12-18  1:37 ` Mike Frysinger
  2005-12-19  5:24 ` Mike Frysinger
  0 siblings, 2 replies; 3+ messages in thread
From: David Thomas @ 2005-12-17 23:20 UTC (permalink / raw
  To: gentoo-dev, gentoo-embedded

Hey all,

Here is a fix for libXt, similar to the problems I had with libX11 
last week.  I don't see an obvious way to patch the Makefile.am.
Please send comments.

Symptom:
../util/makestrs -i ..  < ../util/string.list > StringDefs.c
/bin/sh: ../util/makestrs: cannot execute binary file
make[2]: *** [StringDefs.c] Error 126

For this to work, have a look at the ebuild in the forwarded msg.

Fix patchfile:
--- util/Makefile.in
+++ util/Makefile.in
@@ -48,7 +48,7 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-CC = @CC@
+CC = gcc
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@


On Fri, Dec 09, 2005 at 03:19:28AM -0500, David Thomas (davelists2@peoplemerge.com) wrote:
Subject: [gentoo-embedded] problems crosscompiling libX11
Message ID: <20051209081928.GA11683@peoplemerge.com>

> I've been having problems with libX11.  First it tries to build a binary
> with the crosscompiler then execute it:
> 
> /bin/sh: ../src/util/makekeys: cannot execute binary file
> 
> I wrote a patch that fixes this... See below.
> 
> I'm still having a problem with libtool.  The last step of the build process
> it does the following:
> /bin/sh ../libtool --mode=link armv5l-softfloat-linux-uclibc-gcc ... -L /newroot/usr/lib ...
> ...(much more)... -lXau -lXdmcp -ldl
> 
> This calls the crosscompiler replacing -lXau and -lXdmcp with /usr/lib/libXau.so and
> /usr/lib/libXdmcp.so INSTEAD of the crosscompiled ones in /newroot/usr/lib
> 
> Same thing even if I hardcode values in ../libtool for sys_lib_search_path_spec.
> I also tried setting an LDPATH in /etc/env.d/05crosscompiler.
> 
> Am I missing something in /etc/ld.so.conf environment?
> 
> Thanks!
> Dave Thomas
> 
> Here are the fixes:
> Added to ebuild (is this right? comments? it seems to work):
> src_unpack()
> {
>         x-modular_unpack_source
>         x-modular_patch_source
>         cd ${S}
>         epatch /path/to/patchfile
>         x-modular_reconf_source
> }
> 
> patchfile:
> --- src/util/Makefile.am        
> +++ src/util/Makefile.am        
> @@ -4,7 +4,8 @@
>  
>  makekeys_CFLAGS=$(X11_CFLAGS) $(BIGREQS_CFLAGS)
>  
> -#override CC = gcc
> +#do not override CC, this is needed when using a crosscompiler since this executable is to be run on $build not $host
> +CC = gcc
>  LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
>  
>  EXTRA_DIST = mkks.sh
> --- src/util/Makefile.in
> +++ src/util/Makefile.in
> @@ -189,8 +189,9 @@
>  
>  makekeys_CFLAGS = $(X11_CFLAGS) $(BIGREQS_CFLAGS)
>  
> -#override CC = gcc
> +#no, do not override CC, this is needed when using a crosscompiler since this executable is to be run on $build not $host
> +CC = gcc
>  LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
> 
> __END__
> 
> 
> 
> -- 
> gentoo-embedded@gentoo.org mailing list
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-dev] problems crosscompiling libXt
  2005-12-17 23:20 [gentoo-dev] problems crosscompiling libXt David Thomas
@ 2005-12-18  1:37 ` Mike Frysinger
  2005-12-19  5:24 ` Mike Frysinger
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2005-12-18  1:37 UTC (permalink / raw
  To: gentoo-dev

On Sat, Dec 17, 2005 at 06:20:33PM -0500, David Thomas wrote:
> Here is a fix for libXt, similar to the problems I had with libX11 
> last week.  I don't see an obvious way to patch the Makefile.am.
> Please send comments.

yeah, no good ... you need to add logic for a CC_FOR_BUILD which would
then be used to compile the helper programs like makestrs
-mike
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-dev] problems crosscompiling libXt
  2005-12-17 23:20 [gentoo-dev] problems crosscompiling libXt David Thomas
  2005-12-18  1:37 ` Mike Frysinger
@ 2005-12-19  5:24 ` Mike Frysinger
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2005-12-19  5:24 UTC (permalink / raw
  To: gentoo-dev; +Cc: David Thomas

On Saturday 17 December 2005 18:20, David Thomas wrote:
> Here is a fix for libXt, similar to the problems I had with libX11
> last week.  I don't see an obvious way to patch the Makefile.am.
> Please send comments.

you should startup a bug for this if one hasnt been already
-mike
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-12-19  5:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-17 23:20 [gentoo-dev] problems crosscompiling libXt David Thomas
2005-12-18  1:37 ` Mike Frysinger
2005-12-19  5:24 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox