I try to bootstrap Gentoo-prefix on a Linux x86_64 server(I am using a special release of Linux, PUIAS Linux release 6.3, http://springdale.math.ias.edu/, and I don't know if it is related.) The bootstrap fails when emerging glib-2.34.1. It seems to complain about 2 things: 1. /home/linpengt/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lffi 2. * Messages for package dev-libs/glib-2.34.1: * Unable to find kernel sources at /usr/src/linux * Unable to calculate Linux Kernel version for build, attempting to use running version * ERROR: dev-libs/glib-2.34.1 failed (compile phase): * emake failed Reproducible: Always Steps to Reproduce: 1. run bootstrap-prefix.sh 2. 3. Actual Results: The last part of the build log: /home/linpengt/gentoo/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lffi collect2: ld returned 1 exit status make[4]: *** [libgobject-2.0.la] Error 1 make[4]: Leaving directory `/home/linpengt/gentoo/var/tmp/portage/dev-libs/glib-2.34.1/work/glib-2.34.1/gobject' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/linpengt/gentoo/var/tmp/portage/dev-libs/glib-2.34.1/work/glib-2.34.1/gobject' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/linpengt/gentoo/var/tmp/portage/dev-libs/glib-2.34.1/work/glib-2.34.1/gobject' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/linpengt/gentoo/var/tmp/portage/dev-libs/glib-2.34.1/work/glib-2.34.1' make: *** [all] Error 2 * ERROR: dev-libs/glib-2.34.1 failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=dev-libs/glib-2.34.1'`, * the complete build log and the output of `emerge -pqv '=dev-libs/glib-2.34.1'`. * The complete build log is located at '/home/linpengt/gentoo/var/tmp/portage/dev-libs/glib-2.34.1/temp/build.log'. * The ebuild environment file is located at '/home/linpengt/gentoo/var/tmp/portage/dev-libs/glib-2.34.1/temp/environment'. * Working directory: '/home/linpengt/gentoo/var/tmp/portage/dev-libs/glib-2.34.1/work/glib-2.34.1' * S: '/home/linpengt/gentoo/var/tmp/portage/dev-libs/glib-2.34.1/work/glib-2.34.1' >>> Failed to emerge dev-libs/glib-2.34.1, Log file: >>> '/home/linpengt/gentoo/var/tmp/portage/dev-libs/glib-2.34.1/temp/build.log' * Messages for package dev-libs/glib-2.34.1: * Unable to find kernel sources at /usr/src/linux * Unable to calculate Linux Kernel version for build, attempting to use running version * ERROR: dev-libs/glib-2.34.1 failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=dev-libs/glib-2.34.1'`, * the complete build log and the output of `emerge -pqv '=dev-libs/glib-2.34.1'`. * The complete build log is located at '/home/linpengt/gentoo/var/tmp/portage/dev-libs/glib-2.34.1/temp/build.log'. * The ebuild environment file is located at '/home/linpengt/gentoo/var/tmp/portage/dev-libs/glib-2.34.1/temp/environment'. * Working directory: '/home/linpengt/gentoo/var/tmp/portage/dev-libs/glib-2.34.1/work/glib-2.34.1' * S: '/home/linpengt/gentoo/var/tmp/portage/dev-libs/glib-2.34.1/work/glib-2.34.1'
Created attachment 339706 [details] build.log
Created attachment 339708 [details] info.log
Created attachment 339710 [details] pqv.log
OK, I solved the problem myself. It turns out that for some reason libffi.so is not generated. Solution: 1. cd $(PREFIX)/usr/lib 2. ln -s libffi.so.6.0.0 libffi.so