Ticket #102 (new task)
Domains and packages with more deps than libc
| Reported by: | duff0097@… | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | pkgcore | Version: | |
| Keywords: | Cc: |
Description
1. With a domain (even a cross-compile one) you don't need deps that are needed for building only. So autotools.eclass needs editing; otherwise everything that inherits that eclass wants to install autoconf, automake, or libtool. Thus, whatever the pkgcore equivalent of the following is required:
$ diff -Nur /usr/portage/eclass/autotools.eclass autotools.eclass
--- /usr/portage/eclass/autotools.eclass 2007-07-13 01:06:10.000000000 -0500
+++ autotools.eclass 2007-07-13 01:06:04.000000000 -0500
@@ -35,9 +35,9 @@
[[ ${WANT_AUTOCONF} == "latest" ]] && WANT_AUTOCONF="2.5"
export WANT_AUTOCONF
fi
-DEPEND="${_automake_atom}
- ${_autoconf_atom}
- sys-devel/libtool"
+#DEPEND="${_automake_atom}
+# ${_autoconf_atom}
+# sys-devel/libtool"
RDEPEND=""
unset _automake_atom _autoconf_atom
This isn't a probably solution, but all that is required is using the tools already installed on the system (which is done automatically anyway) - a version check on the 'livefs domain' vdb for those packages is all that is needed.
Fixing this problem allows the resolver to resolve the deps correctly and merge the correct packages (there are more exceptions I'm sure - like perl).
2. The next problem is headers and linking on the rootfs: both are required for compile, but currently the simple case of ROOT/usr/lib or ROOT/usr/include won't work. So time for another hacked script:
$ diff -Nur /usr/lib/python2.4/site-packages/pkgcore/bin/ebuild-env/ebuild-functions.sh ebuild-functions.sh
--- /usr/lib/python2.4/site-packages/pkgcore/bin/ebuild-env/ebuild-functions.sh2007-07-13 01:02:26.000000000 -0500
+++ ebuild-functions.sh 2007-07-13 01:01:58.000000000 -0500
@@ -127,6 +127,9 @@
EXTRA_ECONF="--libdir=${CONF_LIBDIR_RESULT} ${EXTRA_ECONF}"
fi
local EECONF_CACHE
+ export LDFLAGS="-L/mnt/root2/lib"
+ export CFLAGS="${CFLAGS} -I/mnt/root2/usr/include"
+ export ac_cv_func_malloc_0_nonnull=yes
echo ${ECONF_SOURCE}/configure \
--prefix=/usr \
--host=${CHOST} \
This "fantastic" econf() hack allows the compilation of packages correctly. I've yet to test whether they actually run - but they should. This is necessary for any package that has a dependency on a package in the root of the domain.
3. The last issue is for trimming the install image. INSTALL_MASK only works at merge time. But that won't work. With an 'INSTALL_MASK="*.h"' it simply doesn't install header files at merge time. But if I have a package that depends on one with that INSTALL_MASK set, it won't find the heads, and it will fail. Either the mask simply diverts "*.h" files to an alternate directory to be included at build time, or have it stripped out of root once all packages have been installed. The latter has issues with adding packages to the image at a later time, where the former (an alternate root or temporary root) would still have the files and cause no issues with adding packages after an image has been created.
On top of this I've already seen examples of stripping directories that are unnecessary (e.g. /usr/share/man or /usr/share/doc).
With these changes in mind it will make cross-compile setup and execution very easy, imho.
My current domain setup and these changes has allowed me to rather easily create a usable image for my embedded computer. Thanks.
-duffolonious
