Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 219623 - Cross compiling: attempting to cross compile will result in installing onto host system
Summary: Cross compiling: attempting to cross compile will result in installing onto h...
Status: RESOLVED DUPLICATE of bug 174552
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-28 20:18 UTC by Dave Bender
Modified: 2008-04-28 21:52 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 Dave Bender 2008-04-28 20:18:16 UTC
I am attempting to cross install baselayout. My build host is x86_64,
target is x86 (specifically c3 processor).
The problem I am running into is that portage wants to install the
unfulfilled dependencies into my host system.
So for example, attempting to install the baselayout-2 will cause
emerge to want to install into my host system.

This behaviour is surprising and does not correspond with what I read
in the gentoo embedded handbook.
I have already posted this problem to gentoo-embedded, solar
recommended I post here.


Here is what I do (play by play):

The xmerge command is an exact duplicate of the one presented in the
gentoo embedded handbook.

export SYSROOT=/usr/i686-pc-linux-gnu
export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_calloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes

I have added the following to SYSROOT directory:

/etc/make.conf
/etc/make.globals -> /etc/make.globals
/etc/make.profile -> /usr/portage/profiles/default-linux/x86/2007.0
/etc/portage/package.keywords

Contents of /etc/make.conf

CFLAGS="-march=c3 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"
ACCEPT_KEYWORDS=""
USE="hal dbus unicode mmx cups jpeg ncurses nls nptl nptlonly pam pdf
pdflib png posix ssl tcpd tiff udev userland_GNU x86 zlib -python
-ipv6 -gtk -gtk2 -gnome -kde -qt -qt3 -qt4 -X -perl"
FEATURES="nodoc"
INPUT_DEVICES=""
VIDEO_CARDS=""
LINGUAS="en_US es_MX zh_CN"

/etc/portage/package.keywords
sys-apps/baselayout ~x86
sys-apps/openrc ~x86

When I run the emerge command:

embedded # ./xmerge baselayout -vp

These are the packages that would be merged, in order:

Calculating dependencies |
!!! All ebuilds that could satisfy ">=sys-apps/baselayout-2.0.0" have
been masked.
!!! One of the following masked packages is required to complete your request:
- sys-apps/baselayout-2.0.0 (masked by: ~amd64 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or
refer to the Gentoo Handbook.
(dependency required by "sys-apps/openrc-0.2.2" [ebuild])


So baselayout appears to be masked by ~amd64 keyword, which should be
irrelevant for cross compiling.

Thanks,
Dave

Other notes:

SYSROOT is populated with a /var and /tmp directory. /var contains
further subdirectories.

Here is the output of xmerge ---info

Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.2.3, unavailable,
2.6.23-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.23-gentoo-r3 x86_64 AMD Athlon(tm) 64 X2 Dual Core
Processor 3800+
Timestamp of tree: Mon, 28 Apr 2008 01:34:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port
3632) [disabled]
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.25-r1
ACCEPT_KEYWORDS="x86"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=c3 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild
/etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=c3 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer nodoc sandbox sfperms strict
unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="en_US es_MX zh_CN"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times
--compress --force --whole-file --delete --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl berkdb cli cracklib crypt cups dbus dri fortran gdbm gpm hal
iconv isdnlog jpeg midi mmx mudflap ncurses nls nptl nptlonly openmp
pam pcre pdf pdflib png posix pppd readline reflection session spl ssl
tcpd tiff udev unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000
atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370
ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3
trident usb-audio via82xx via82xx-modem ymfpci"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty
extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw
multi null plug rate route share shm softvol" APACHE2_MODULES="actions
alias auth_basic authn_alias authn_anon authn_dbm authn_default
authn_file authz_dbm authz_default authz_groupfile authz_host
authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir
disk_cache env expires ext_filter file_cache filter headers include
info log_config logio mem_cache mime mime_magic negotiation rewrite
setenvif speling status unique_id userdir usertrack vhost_alias"
ELIBC="glibc" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk
hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US es_MX zh_CN"
USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG,
LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS,
PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2008-04-28 20:26:45 UTC
Probably same as http://forums.gentoo.org/viewtopic-p-3872156.html#3872156 -> INVALID (keeping this open in case I'm wrong).
Comment 2 Dave Bender 2008-04-28 21:31:54 UTC
(In reply to comment #1)
> Probably same as http://forums.gentoo.org/viewtopic-p-3872156.html#3872156 ->
> INVALID (keeping this open in case I'm wrong).
> 
Marius,
  While I believe that this discussion is relevant to this bug, hagra's solution to the problem was highly dependent on the circumstances. This is does not resolve the question as to why portage installs baselayout (or any other dependencies) into the host system. Look at it this way: the build host should NOT have to have baselayout2 in order to install it onto a target.

While I understand that there are some dependencies that should be in the host system (basic cross compiling tools, perl, etc) those dependencies are distinct from packages that need to be installed in the target system.

Is there any way to distinguish dependencies like this in portage?

Dave
Comment 3 Zac Medico gentoo-dev 2008-04-28 21:52:39 UTC

*** This bug has been marked as a duplicate of bug 174552 ***