Talk:Portage-prefix

From Gentoo Linux Wiki

Jump to: navigation, search

[edit] Bootstrapping on x86/amd64

I'm stuck using a rhel4 system that is administered by my university -- I've been manually installing packages in a local directory using the configure --prefix flag, but it is tiresome to deal with the dependencies. I couldn't do a chroot installation because I don't have root access and fakechroot wouldn't work either. portage-prefix comes to the rescue. I followed the MacOS bootstrap instructions with some minor changes:

Gentoo Prefixed Portage Bootstrap Process for Mac OS X.

Emerging portage failed because libpython wasn't found. I think this is because I'm on a 64 bit system, and ${EPREFIX}/usr/lib64 wasn't in my LD_LIBRARY_PATH. Running the following solved the problem

env FEATURES="-collision-protect" LD_LIBRARY_PATH=${EPREFIX}/usr/lib64/ emerge --oneshot --nodeps portage

In emerge -e system, pkgconfig failed with

* QA Notice: Package has poor programming practices which may compile
*            but will almost certainly crash on 64bit architectures.
* Function `strsignal' implicitly converted to pointer at gstrfuncs.c:674
* 
* ERROR: dev-util/pkgconfig-0.21 failed.
* Call stack:
*   misc-functions.sh, line 622:   Called install_qa_check
*   misc-functions.sh, line 370:   Called die
* 
* this code is not 64bit clean

I've used pkg-config before on a 64bit system without any problem, so I just did

ebuild ${EPREFIX}/usr/portage/dev-util/pkgconfig/pkgconfig-0.21-r1.ebuild qmerge

This bypasses the checks emerge does and just merges the built binaries. Note that the version of pkgconfig may be different for you.


--Roman 15:18, 30 August 2007 (EST)

[edit] Bootstrapping on OS X

I'm trying to document here what will hopefully get me bootstrapped ;-) --Tobi 14:35, 31 March 2006 (GMT)

$ cd $GENTOO/usr
$ tar xfj /tmp/portage-alt-prefix-latest.tar.bz2
$ ln -s portage-alt-prefix portage
  • Link a profile. Right now, the symlink must be absolute, i.e. start with /, not ../ or similar, otherwise it is considered invalid.
$ cd $GENTOO/etc
$ ln -s $GENTOO/usr/portage/profiles/default-darwin/macos/10.4/ppc make.profile
  • Export a few variables. These would probably better go in make.conf, but setting $PREFIX in make.conf does not seem to work (yet).
$ export PREFIX=$GENTOO
$ export ACCEPT_KEYWORDS="ppc-macos ~ppc-macos"
$ export DEFAULT_PATH=$PREFIX/bin:$PREFIX/sbin:$PREFIX/usr/bin
$ export DEFAULT_PATH=$DEFAULT_PATH:$PREFIX/usr/sbin:$PREFIX/usr/lib/portage/bin
$ export DEFAULT_PATH=$DEFAULT_PATH:/bin:/sbin:/usr/bin:/usr/sbin
$ mkdir -p $PREFIX/etc/portage/profile
$ echo 0 > $PREFIX/var/cache/edb/counter
  • added sys-apps/portage-2.1.13 to $PREFIX/etc/portage/profile/package.provided.
  • This is my <code>$PREFIX/etc/make.conf:
FETCHCOMMAND="/usr/bin/curl -f --connect-timeout 15 -# -o \${DISTDIR}/\${FILE} \${URI}" 
RESUMECOMMAND="/usr/bin/curl -f --connect-timeout 15 -# -C - -o \$ {DISTDIR}/\${FILE} \${URI}"
  • Now comes the big moment:
$ emerge -av gcc-apple

until now, it's happily compiling... texinfo (and maybe other stuff) breaks because of BSD sed.

  • So the next step is
$ emerge -av sed
$ emerge -av gcc-apple

(actually continues with texinfo.)

  • Next problem is with my portage tree. The Manifest of gnuconfig-20060227 contains digests for gnuconfig-20060227.ebuild~ (note the tilde). Just removing all lines containing a tilde fixes this.
  • gcc-apple-5247 failed.
make[2]: *** No rule to make target `../build-powerpc-apple-darwin8.5.0/libiberty/libiberty.a', needed by `build/genmodes'.  Stop.
  • So I'm trying emerge -av system next. The first problem is that only db-4.3.27 is in the portage tree, but it's hard-masked for testing. So I add it to $PREFIX/etc/portage/package.unmask and let my computer emerge my system.
  • couple of issues getting perl5 emerged. Workaround: manually download [1] and install coreutils in /tmp, include it in DEFAULT_PATH and PATH before /usr/bin. Then, after the first emerge failed:
$ cd $PREFIX
$ chmod 644 usr/lib/perl5/5.8.7/darwin-2level/CORE/libperl.a
$ chmod 644 usr/lib/perl5/5.8.7/darwin-2level/auto/DynaLoader/DynaLoader.a
$ FEATURES="-collision-protect" ebuild usr/portage/dev-lang/perl/perl-5.8.7-r1.ebuild qmerge
  • continuing with emerge -av system.
  • stuck with gcc-apple