Bug 20958 - libXt installs host-built makestrs when cross-compiling
Summary: libXt installs host-built makestrs when cross-compiling
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xt (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-30 14:33 UTC by Sven Rebhan
Modified: 2009-12-07 22:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Automake/autoconf patch (2.01 KB, patch)
2009-03-30 14:33 UTC, Sven Rebhan
no flags Details | Splinter Review
0001-fix-cross-compile-again.patch (2.75 KB, patch)
2009-11-05 03:13 UTC, Rémi Cardona
no flags Details | Splinter Review
0001-Don-t-install-makestrs-on-the-system.patch (2.11 KB, patch)
2009-11-09 03:31 UTC, Rémi Cardona
no flags Details | Splinter Review

Description Sven Rebhan 2009-03-30 14:33:46 UTC
Created attachment 24380 [details] [review]
Automake/autoconf patch

libXt fails to cross-compile because makestrs needs to be called during the build process. For cross-compilation this must fail as makestrs was compiled with the target compiler. The following patch checks if we cross-compile and creates a noinstallable xmakestrs which is used during build.

Created and tested against libXt-1.0.5.
Comment 1 Alan Coopersmith 2009-08-03 21:05:49 UTC
This patch seems to partially duplicate and partially conflict with the
cross-compiling support already committed to git master for 1.0.6 before
this patch was submitted:

http://cgit.freedesktop.org/xorg/lib/libXt/commit/?id=36e9f0d351afbf7fd2595990b2d39e7c551f6420

(Though as bug 23001 points out, what's there now could be better.)
Comment 2 Rémi Cardona 2009-11-05 03:13:21 UTC
Created attachment 30979 [details] [review]
0001-fix-cross-compile-again.patch

Hi Alan,

libXt cross-compile issues regularly pop up in Gentoo land, so I had a look at this patch here and there is value in it.

The idea of this patch was to build 2 different makestrs, one with the host CC and one with the target CC. This patch effectively prevents "make install" from installing a makestrs built for the host arch.

The current libXt code would be fine on as-is if makestrs never left $builddir.

To follow, an updated patch based on the previous one.

I've asked other Gentoo devs involved with cross-compiling environments to confirm whether this patch really works for them.

Thanks
Comment 3 Rémi Cardona 2009-11-05 03:14:30 UTC
Reopening.

Cheers
Comment 4 Alan Coopersmith 2009-11-05 07:38:51 UTC
(In reply to comment #2)
> The current libXt code would be fine on as-is if makestrs never left $builddir.

I have no idea why it does.   As far as I know makestrs is only used
during libXt compilation, and installing it to the resulting system
is a waste of time & disk space.

Comment 5 Rémi Cardona 2009-11-05 08:26:02 UTC
(In reply to comment #4)
> I have no idea why it does.   As far as I know makestrs is only used
> during libXt compilation, and installing it to the resulting system
> is a waste of time & disk space.

That's what I thought too :)

I'll quietly drop it from Gentoo and see if anything breaks.

Thanks
Comment 6 Rémi Cardona 2009-11-09 03:31:44 UTC
Created attachment 31061 [details] [review]
0001-Don-t-install-makestrs-on-the-system.patch

New patch that just marks makestrs and its man page _noinst.

Cheers
Comment 7 Alan Coopersmith 2009-12-07 22:31:14 UTC
Works for me - pushed to git master:

commit 345633dc9c79b32a1b391dfb4dfedf87ae9e291b
Author: Rémi Cardona <remi@gentoo.org>
Date:   Mon Nov 9 12:26:17 2009 +0100

    Don't install makestrs on the system
    
    It has no known outside-libXt users. Let's not install it and its man page.
    
    Signed-off-by: Rémi Cardona <remi@gentoo.org>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.