Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 81228 - Need multilib /usr/include to compile multilib apps properly
Summary: Need multilib /usr/include to compile multilib apps properly
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-08 05:31 UTC by Giblets
Modified: 2005-02-14 10:41 UTC (History)
0 users

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 Giblets 2005-02-08 05:31:28 UTC
The numbering of syscalls is different between the multilib emulation glibc libraries and normal glibc libraries. eg:

x86_64:         asm/unistd.h:#define __NR_write           1
i386:           asm/unistd.h:#define __NR_exit            1

This means that you can't compile a multilib application that uses syscalls and expect it to work.  In fact it could be quite destructive to try and run it.  Really, an /emul/usr/include or equivalent is required, that gcc will use instead of /usr/include when it is invoked with -m32.  Arguably -nostdinc -I /emul/usr/include could be passed to gcc instead, but that could screw up search order.  From man gcc:

       -I dir
           Add the directory dir to the list of directories to be searched for
           header files.  Directories named by -I are searched before the
           standard system include directories.  If the directory dir is a
           standard system include directory, the option is ignored to ensure
           that the default search order for system directories and the spe-
           cial treatment of system headers are not defeated .

This affects at least the building of wine.  It requires just this and a minor configure patch to create a working multilib build.

Reproducible: Always
Steps to Reproduce:
Comment 1 Giblets 2005-02-08 06:16:08 UTC
Would it be possible to have all the emul- packages built from scratch on the system they're being installed onto?  This would remove the chance of this sort of incompatibility coming up, and also allow them to optimised for the host cpu.  Or is there something that prevents this?
Comment 2 SpanKY gentoo-dev 2005-02-14 10:41:03 UTC
kernel-2.eclass already does this ...