[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Building eglibc with alternate install directory



Hi,

I hope this is the right mailing list for this type of question.

I am attempting to build specific binary packages from the debian eglibc source package, and in particular I want to change the install root, i.e. from /lib, etc. to /some_root/lib, etc. (The reason behind this is to install more than one libc on my machine for some compatibility testing I need to perform.)

I'm afraid I am not too familiar with the dpkg-* tools, but this is what I have attempted so far:

I've downloaded the source package with 'apt-get source eglibc' and checked for the necessary build dependencies. In 'debian/rules' I have modified the paths for prefix, sysconfdir, rootsbindir, slibdir, libdir. I found that I also needed to alter the libc configure step in 'debian/rules.d/build.mk' since a hard-coded --prefix=/usr is there, and in the locales-all step, where there is a hard-coded path to .../usr/lib/locale.

This is a diff of the changes I have made:

--- debian.old/rules
+++ debian/rules
@@ -78,19 +78,19 @@
# Default setup
EGLIBC_PASSES ?= libc

-prefix=/usr
+prefix=$(DEB_INSTALL_ROOT)/usr
bindir=$(prefix)/bin
datadir=$(prefix)/share
localedir=$(prefix)/lib/locale
-sysconfdir=/etc
+sysconfdir=$(DEB_INSTALL_ROOT)/etc
libexecdir=$(prefix)/lib
-rootsbindir=/sbin
+rootsbindir=$(DEB_INSTALL_ROOT)/sbin
includedir=$(prefix)/include
docdir=$(prefix)/share/doc
mandir=$(prefix)/share/man
sbindir=$(prefix)/sbin
-slibdir=/lib
-libdir=/usr/lib
+slibdir=$(DEB_INSTALL_ROOT)/lib
+libdir=$(DEB_INSTALL_ROOT)/usr/lib

BUILD_CC = gcc
BUILD_CXX = g++
--- debian.old/rules.d/build.mk
+++ debian/rules.d/build.mk
@@ -72,7 +72,7 @@
  MAKEINFO=: \
  $(CURDIR)/configure \
  --host=$(call xx,configure_target) \
-  --build=$$configure_build --prefix=/usr --without-cvs \
+  --build=$$configure_build --prefix=$(prefix) --without-cvs \
  --enable-add-ons=$(standard-add-ons)"$(call xx,add-ons)" \
  --enable-profile \
  --without-selinux \
@@ -91,7 +91,7 @@
   $(MAKE) -C $(DEB_BUILDDIR) $(NJOBS) \
     objdir=$(DEB_BUILDDIR) install_root=$(CURDIR)/build-tree/locales-all \
     localedata/install-locales; \
- tar --use-compress-program /usr/bin/lzma --owner root --group root -cf $(CURDIR)/build-tree/locales-all/supported.tar.lzma -C $(CURDIR)/build-tree/locales-all/usr/lib/locale .; \ + tar --use-compress-program /usr/bin/lzma --owner root --group root -cf $(CURDIR)/build-tree/locales-all/supported.tar.lzma -C $(CURDIR)/build-tree/locales-all/$(localedir) .; \
 fi
 touch $@


I have then started the build process with the command 'DEB_INSTALL_ROOT=/some_root dpkg-buildpackage -rfakeroot -uc -b'.

The question I have is, is this the right way to go about changing the install paths? Also, how can I instruct dpkg-buildpackage to just build libc-bin, libc6 and locales packages, which I believe is the minimum necessary for a working libc installation.

The method I've been using above doesn't work and "hangs" the build process at this point:

make[2]: Target `check' not remade because of errors.
make[2]: Leaving directory `/home/andy/test/eglibc-2.11.2'
make[1]: *** [check] Error 2
make[1]: Leaving directory `/home/andy/test/eglibc-2.11.2/build-tree/i386-libc'

(according to ps, its hanging inside the code block from line 100 to 127 in debian/build.mk, specifically executing 'LANG="" TIMEOUTFACTOR="50" /usr/bin/make -C build-tree/i386-libc -k check 2>&1')

Thank you!

Andy



Reply to: