Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36923 - imake configuration files for xfree-4.3.0-r3 define i386 architecture
Summary: imake configuration files for xfree-4.3.0-r3 define i386 architecture
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-31 16:37 UTC by Michael Richmond
Modified: 2006-02-04 06:05 UTC (History)
3 users (show)

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


Attachments
'script' recording of commands in comment #5 (finding_xmkmf.out,972 bytes, text/plain)
2004-02-23 17:29 UTC, Michael Richmond
Details
another 'script' recording related to commands in comment #5 (testing_xmkmf.out,10.37 KB, text/plain)
2004-02-23 17:29 UTC, Michael Richmond
Details
LOG file produced from commands in comment #5 (see comment #6 for explaination. (XMKMF.LOG,9.66 KB, application/octet-stream)
2004-02-23 17:30 UTC, Michael Richmond
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Richmond 2003-12-31 16:37:47 UTC
The imake configuration files installed during an emerge of xfree-4.3.0-r3 incorrectly specify the cpu architecture for the system. This means that when imake (or xmkmf) is used to configure a source package for compilation, the define -D__i386__ is used as a flag on the compile.

This bug potentially results in an incorrectly compiled executable.

Reproducible: Always
Steps to Reproduce:
1. Take any imake configured source package - I found this when trying to compile xmcd-3.2 from www.ibiblio.org
2. Follow compile/INSTALL instructions. These are essentially: unpack source, run xmkmf, then do make Makefiles followed by make.
3.

Actual Results:  
gcc calls executed by make define -D__i386__ on the command line.

Expected Results:  
__sparc__ or similar should have been defined instead.
Comment 1 Jason Wever (RETIRED) gentoo-dev 2003-12-31 16:43:13 UTC
Re-assigning to the xfree team as it's more up their alley.
Comment 2 Donnie Berkholz (RETIRED) gentoo-dev 2004-01-18 18:29:38 UTC
Hiya bartron, noticed your imake skills on the motif bug, want to help out here?
Comment 3 bartron 2004-02-22 15:47:34 UTC
  Sure (somehow missed this one...sorry for the slow response).
Although I may have an idea, I'm not able to reproduce this here...
Michael, could you run this command (with this exact quoting), 

    xmkmf "-D__dummydef__ -v" -a 2>&1 | tee XMKMF.LOG

or, if using (t)csh,

    xmkmf "-D__dummydef__ -v" -a |& tee XMKMF.LOG

in xmcd-3.2's toplevel dir and attach XMKMF.LOG here, please?

(Since `/usr/X11R6/lib/X11/config/*' should be the same as was used
to build xfree itself, the only other two reasons I can think of is 
either one of the files there has been overwritten since then, or 
there's a problem with cpp's configuration/invocation)
Comment 4 Michael Richmond 2004-02-22 22:16:18 UTC
Hmmm, something wrong with those arguments on xmkmf since xmkmf just spits out the usage string -

usage:  /usr/X11R6/bin/xmkmf [-a] [top_of_sources_pathname [current_directory]]

then exits.
Comment 5 bartron 2004-02-23 15:52:07 UTC
  That doesn't seem right... xfree's xmkmf should pass `-D' switches 
to imake unaltered.  A replacement test would be (run in xmcd's 
source dir)

  ( rm -f Makefile && \
    imake -v -DUseInstalled -I/usr/X11R6/lib/X11/config && \
    make Makefiles && \
    make depend ) 2>&1 | tee XMKMF.LOG

although this one does not catch the case when thers's some other 
xmkmf / imake somewhere earlier in $PATH...not very likely but would
explain above usage message.  What is the output of these commands 
(may have to emerge gentoolkit to get qpkg)

    which xmkmf
    qpkg -f `which xmkmf`
    qpkg -f /usr/X11R6/bin/xmkmf
    qpkg -f /usr/X11R6/lib/X11/config/site.def

    # this all in one line    
    ( cd /usr/X11R6/lib/X11/config ; grep 'define .*i386Architecture' * | grep -v Imake.cf )

?
Comment 6 bartron 2004-02-23 15:56:00 UTC
  Oops, sorry, didn't see the X11R6 part in the usage message at 
first...just ignore that part.
Comment 7 Michael Richmond 2004-02-23 17:27:09 UTC
Ok, I've attached a few script files:

XMKMF.LOG is the output from the first chain of commands listed in comment #5.

testing_xmkmf.out contains a 'script' record of the commands used to produce XMKMF.LOG.

finding_xmkmf.out contatins the 'script' record of the second group of commands in comment #5.

(Note, both of the .out files contain control characters from the console colour-coding. These are easier to read if you 'cat' the files rather than use more/less to view them.)
Comment 8 Michael Richmond 2004-02-23 17:29:05 UTC
Created attachment 26209 [details]
'script' recording of commands in comment #5
Comment 9 Michael Richmond 2004-02-23 17:29:51 UTC
Created attachment 26210 [details]
another 'script' recording related to commands in comment #5
Comment 10 Michael Richmond 2004-02-23 17:30:33 UTC
Created attachment 26211 [details]
LOG file produced from commands in comment #5 (see comment #6 for explaination.
Comment 11 bartron 2004-02-24 15:55:36 UTC
  Hm, not really sure as to why this happened, but that's what I
thought... xmkmf, imake, and a number of imake config files are 
from openmotif rather than xfree.  Another problem is, `site.def'
from openmotif defines `i386Architecture YES' (did this file change 
recently?  It is still dated Feb 15, 2001, but I've never seen this 
define before and there wasn't any problem building openmotif on 
arches other than i386 here...).


  Heinrich: we need a new `openmotif/files/site.def' with this line

    #define i386Architecture        YES

deleted (but don't remove the old file yet) and a new ~arch'd release
that uses the new `site.def'.

  Second question is how openmotif's imake managed to leak into 
/usr/X11R6... ${D}/usr/X11R6/lib/X11/config is deleted using rm -rf, 
which fails on any kind of error except `ENOENT', bins and man pages 
are deleted with plain rm and should die on all problems.
Comment 12 Heinrich Wendel (RETIRED) gentoo-dev 2004-02-25 02:59:48 UTC
fixed in -r5
Comment 13 Donnie Berkholz (RETIRED) gentoo-dev 2004-03-17 11:41:22 UTC
It's fixed.