Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96113 - multilib creating bad links
Summary: multilib creating bad links
Status: VERIFIED DUPLICATE of bug 87560
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-14 12:15 UTC by Jon Mason
Modified: 2005-06-14 13:37 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 Jon Mason 2005-06-14 12:15:27 UTC
The contents of /usr/include/asm/ are linked to /usr/include/asm-x86_64 by
multilib.  However, they are defined as user includes and not system includes. 
For example, /usr/include/asm/errno.h contains the following:
/* Common header file autogenerated by create_ml_includes in multilib.eclass */
#ifdef __i386__
#include "../asm-i386/errno.h"
#endif /* __i386__ */

#ifdef __x86_64__
#include "../asm-x86_64/errno.h"
#endif /* __x86_64__ */

However, on my x86 system it has the following:
#ifndef _I386_ERRNO_H
#define _I386_ERRNO_H

#include <asm-generic/errno.h>

#endif

The significance of the above is the the <> denotes a system include and the ""
denotes a user include.  If anyone passes the "-I-" flag into gcc, the user
include files will not be included and gcc will not be able to find the files 
(Xen is currently doing this).  I hand patched some of the files, and the
problem is fixed.  Multilib needs to be changed to generate the files properly.

Reproducible: Always
Steps to Reproduce:
To reproduce this problem with Xen:
1.  Download the latest source tarball from
http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-unstable-src.tgz
and un-tar the file.
2.  build Xen ("make all")
Actual Results:  
The make will break in mbootpack with the following error:
gcc -Wp,-MD,.mbootpack.o.d -Wall -Wpointer-arith -Wcast-qual -Wno-unused
-Wno-format -Wmissing-prototypes -pipe -O3  -I. -I-   -c mbootpack.c -o mbootpack.o
In file included from /usr/include/linux/errno.h:4,
                 from /usr/include/bits/errno.h:25,
                 from /usr/include/errno.h:36,
                 from mbootpack.c:37:
/usr/include/asm/errno.h:7:33: ../asm-x86_64/errno.h: No such file or directory
In file included from mbootpack.c:45:
/usr/include/asm/page.h:7:32: ../asm-x86_64/page.h: No such file or directory
make: *** [mbootpack.o] Error 1

If you modify errno.h and page.h to be <asm-x86_64/page.h> (and 
<asm-x86_64/errno.h>) instead of "../asm-x86_64/page.h", then everything works. 

Expected Results:  
the compile should complete properly
Comment 1 Herbie Hopkins (RETIRED) gentoo-dev 2005-06-14 12:28:58 UTC
This was fixed some time ago, please re-emerge linux-headers and/or glibc as
neccessary.

*** This bug has been marked as a duplicate of 87560 ***
Comment 2 Jon Mason 2005-06-14 13:36:33 UTC
linux-headers fixed it.  Sorry for the dupe.
Comment 3 Jon Mason 2005-06-14 13:37:03 UTC
Closing bug