Coder Social home page Coder Social logo

gentoo-prefix-libc's People

Contributors

redlizard avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

gentoo-prefix-libc's Issues

ubuntu-12.04 (multiarch system)

Stage3 of the bootstrap finished without a hitch so everything needed for boostrapping must have been present on my system. This is excellent and amazing to get a working gentoo toolchain from the ubuntu multiarch toolchain. For other users I've noticed the following:

  • The glibc-provided ldd script is broken. The RTLDLIST variable in that script is not set correctly for prefix. If edited by hand, the ldd works as expected.
  • The glibc ebuilds provide some heavy duty filtering magic! In prefix all of the -march=* are stripped from the CFLAGS variable. Normally this would not be desired, but not sure of the impact on glibc? See common.eblit under files/eblits.
  • glibc cannot be re-emerged after bootstrapping. Here with glibc-2.15-r2 I get things like:
Inconsistency detected by ld.so: dynamic-link.h: 210: elf_get_dynamic_info: Assertion `inf
o[29] == ((void *)0)' failed!

Apparently, glibc doesn't like having RUNPATH/RPATH variables set in ld.so (see output of objdump -x <path-to-ld.so> | grep RPATH). I'm not sure what's good for prefix? Here I successfully installed glibc-2.16.0 by applying the following patch

--- elf/dynamic-link.h.orig     2013-03-02 17:18:57.252222616 +0000
+++ elf/dynamic-link.h  2013-03-02 17:21:02.828980817 +0000
@@ -207,8 +207,10 @@
   assert (info[DT_FLAGS] == NULL
          || (info[DT_FLAGS]->d_un.d_val & ~DF_BIND_NOW) == 0);
   /* Flags must not be set for ld.so.  */
+/*
   assert (info[DT_RUNPATH] == NULL);
   assert (info[DT_RPATH] == NULL);
+*/
 #else
   if (info[DT_FLAGS] != NULL)
     {

and then at the beginning of the install phase I stripped RUNPATH/RPATH variables from the ld.so in the build directory using chrpath. I could find no eclass that would do this. I suppose they need to be stripped?

Issues on ubuntu 12

These problems should be reproducable using a standard Ubuntu 12 install. You can do that using a vagrant script: https://github.com/valhallasw/gentoo-prefix-libc-vagrant . I'll try to re-run the install on a seperate computer to get more details on the problems below. Sorry, I also forgot to write down the stages >_<...

  1. glibc compile:
make  subdir=iconvdata -C iconvdata ..=../ subdir_lib
make[2]: Entering directory `/home/vagrant/gentoo/var/tmp/portage/sys-libs/glibc-2.15-r2/work/glibc-2.15/iconvdata'
.././scripts/mkinstalldirs /home/vagrant/gentoo/var/tmp/portage/sys-libs/glibc-2.15-r2/work/build-default-x86_64-pc-linux-gnu-nptl/iconvdata
mkdir /home/vagrant/gentoo/var/tmp/portage/sys-libs/glibc-2.15-r2/work/build-default-x86_64-pc-linux-gnu-nptl/iconvdata
{ echo ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 ISO8859-6 ISO8859-7 ISO8859-8 ISO8859-9 ISO8859-10 ISO8859-11 ISO8859-13 ISO8859-14 ISO8859-15 ISO8859-16 T.61 ISO_6937 SJIS KOI-8 HP-ROMAN8 HP-ROMAN9 EBCDIC-AT-DE EBCDIC-AT-DE-A EBCDIC-CA-FR EUC-KR UHC JOHAB BIG5 EUC-JP EUC-CN EUC-TW ISO646 EBCDIC-DK-NO EBCDIC-DK-NO-A EBCDIC-ES EBCDIC-ES-A EBCDIC-ES-S EBCDIC-FI-SE EBCDIC-FI-SE-A EBCDIC-FR EBCDIC-IS-FRISS EBCDIC-IT EBCDIC-PT EBCDIC-UK EBCDIC-US IBM037 IBM038 IBM274 IBM275 IBM423 IBM500 IBM870 IBM871 IBM891 IBM903 IBM904 IBM905 IBM1047 IBM874 CP737 CP775 ISO-2022-KR HP-TURKISH8 HP-THAI8 HP-GREEK8 KOI8-R LATIN-GREEK LATIN-GREEK-1 IBM256 IBM273 IBM277 IBM278 IBM280 IBM281 IBM284 IBM285 IBM290 IBM297 IBM420 IBM424 IBM437 IBM850 IBM851 IBM852 IBM855 IBM857 IBM860 IBM861 IBM862 IBM863 IBM864 IBM865 IBM868 IBM869 IBM875 IBM880 IBM866 CP1258 IBM922 IBM1124 IBM1129 IBM932 IBM943 IBM856 IBM930 IBM933 IBM935 IBM937 IBM939 IBM1046 IBM1132 IBM1133 IBM1160 IBM1161 IBM1162 IBM1163 IBM1164 IBM918 IBM1004 IBM1026 CP1125 CP1250 CP1251 CP1252 CP1253 CP1254 CP1255 CP1256 CP1257 ISO-2022-JP MACINTOSH IEC_P27-1 ASMO_449 ANSI_X3.110 CSN_369103 CWI DEC-MCS ECMA-CYRILLIC GOST_19768-74 GREEK-CCITT GREEK7 GREEK7-OLD INIS INIS-8 INIS-CYRILLIC ISO_6937-2 ISO_2033 ISO_5427 ISO_5427-EXT ISO_5428 ISO_10367-BOX MAC-IS MAC-UK NATS-DANO NATS-SEFI SAMI-WS2 ISO-IR-197 TIS-620 KOI8-U GBK ISIRI-3342 GBGBK ISO-2022-CN UTF-16 UNICODE UTF-32 UTF-7 BIG5HKSCS GB18030 ISO-2022-CN-EXT VISCII GBBIG5 CP10007 KOI8-T GEORGIAN-PS GEORGIAN-ACADEMY ISO-IR-209 MAC-SAMI ARMSCII-8 TCVN5712-1 EUC-JISX0213 SHIFT_JISX0213 ISO-2022-JP-3 TSCII IBM866NAV CP932 EUC-JP-MS PT154 RK1048 IBM1025 IBM1122 IBM1137 IBM1153 IBM1154 IBM1155 IBM1156 IBM1157 IBM1158 IBM803 IBM901 IBM902 IBM921 IBM1008 IBM1008_420 IBM1097 IBM1112 IBM1123 IBM1130 IBM1140 IBM1141 IBM1142 IBM1143 IBM1144 IBM1145 IBM1146 IBM1147 IBM1148 IBM1149 IBM1166 IBM1167 IBM4517 IBM4899 IBM4909 IBM4971 IBM5347 IBM9030 IBM9066 IBM9448 IBM12712 IBM16804 IBM1364 IBM1371 IBM1388 IBM1390 IBM1399 ISO_11548-1 MIK BRF MAC-CENTRALEUROPE KOI8-RU ISO8859-9E CP770 CP771 CP772 CP773 CP774; \
  echo 8bit iso8859-2 iso8859-3 iso8859-4 iso8859-6 iso8859-9 koi-8 ebcdic-at-de ebcdic-at-de-a ebcdic-ca-fr ebcdic-dk-no ebcdic-dk-no-a ebcdic-es-s ebcdic-fi-se ebcdic-fi-se-a ebcdic-fr ebcdic-it ebcdic-pt ebcdic-us ibm037 ibm038 ibm274 ibm275 ibm423 ibm500 ibm870 ibm871 ibm891 ibm903 ibm904 ibm905 ibm1047; \
  echo 8bit-gap koi8-r latin-greek latin-greek-1 ibm256 ibm273 ibm277 ibm278 ibm280 ibm281 ibm284 ibm285 ibm290 ibm297 ibm420 ibm424 ibm437 ibm850 ibm851 ibm852 ibm855 ibm857 ibm860 ibm861 ibm862 ibm863 ibm864 ibm865 ibm868 ibm869 ibm875 ibm880 ibm918 ibm1004 ibm1026 cp1125 cp1250 cp1251 cp1252 cp1253 cp1254 cp1256 cp1257 ibm866 iso8859-5 iso8859-7 iso8859-8 iso8859-10 macintosh iec_p27-1 asmo_449 csn_369103 cwi dec-mcs ecma-cyrillic gost_19768-74 greek-ccitt greek7 greek7-old inis inis-8 inis-cyrillic iso_2033 iso_5427 iso_5427-ext iso_5428 iso_10367-box mac-is nats-dano nats-sefi iso8859-13 iso8859-14 iso8859-15 mac-uk sami-ws2 iso-ir-197 tis-620 koi8-u ibm874 cp10007 koi8-t georgian-ps georgian-academy iso-ir-209 mac-sami iso8859-11 ibm866nav pt154 rk1048 mik brf mac-centraleurope koi8-ru hp-roman8 hp-roman9 ebcdic-es ebcdic-es-a ebcdic-is-friss ebcdic-uk iso8859-16 viscii iso8859-9e hp-turkish8 hp-thai8 hp-greek8 cp770 cp771 cp772 cp773 cp774; } | \
LC_ALL=C \
gawk 'NR == 1 { \
      for (i = 1; i <= NF; i++) { \
        printf "%s-routines := %s\n", $i, tolower($i); \
        printf "%s-map := gconv.map\n", $i; \
      } \
    }; \
    NR > 1 { \
      for (i = 2; i <= NF; i++) { \
        printf "$(objpfx)%s.stmp: ", $i; \
        map = toupper($i); \
        sub(/^ISO8859/, "ISO-8859", map); \
        if (map == "ISO_2033") map = map "-1983"; \
        printf "$(charmaps)/%s ", map; \
        printf "gen-%s.sh\n", $1; \
        printf "\t$(generate-%s-table)\n", $1; \
      } \
    }' > /home/vagrant/gentoo/var/tmp/portage/sys-libs/glibc-2.15-r2/work/build-default-x86_64-pc-linux-gnu-nptl/iconvdata/iconv-rules.new
mv -f /home/vagrant/gentoo/var/tmp/portage/sys-libs/glibc-2.15-r2/work/build-default-x86_64-pc-linux-gnu-nptl/iconvdata/iconv-rules.new /home/vagrant/gentoo/var/tmp/portage/sys-libs/glibc-2.15-r2/work/build-default-x86_64-pc-linux-gnu-nptl/iconvdata/iconv-rules
make[2]: Leaving directory `/home/vagrant/gentoo/var/tmp/portage/sys-libs/glibc-2.15-r2/work/glibc-2.15/iconvdata'
make[2]: Entering directory `/home/vagrant/gentoo/var/tmp/portage/sys-libs/glibc-2.15-r2/work/glibc-2.15/iconvdata'
../Makeconfig:85: ../amd64/config.make: No such file or directory
/bin/sh: 1: cd: can't cd to ../amd64
The GNU C library has not been configured.
Run `configure' to configure it before building.
Try `configure --help' for more details.
make[2]: *** No rule to make target `../amd64/config.status', needed by `../amd64/config.make'.  Stop.
make[2]: Leaving directory `/home/vagrant/gentoo/var/tmp/portage/sys-libs/glibc-2.15-r2/work/glibc-2.15/iconvdata'
make[1]: *** [iconvdata/subdir_lib] Error 2
make[1]: Leaving directory `/home/vagrant/gentoo/var/tmp/portage/sys-libs/glibc-2.15-r2/work/glibc-2.15'
make: *** [all] Error 2
emake failed
 �[31;01m*�[0m ERROR: sys-libs/glibc-2.15-r2 failed (compile phase):
 �[31;01m*�[0m   make for default failed
 �[31;01m*�[0m 
 �[31;01m*�[0m Call stack:
 �[31;01m*�[0m           ebuild.sh, line   85:  Called src_compile
 �[31;01m*�[0m         environment, line 3247:  Called eblit-run 'src_compile'
 �[31;01m*�[0m         environment, line  854:  Called eblit-glibc-src_compile
 �[31;01m*�[0m   src_compile.eblit, line  215:  Called src_compile
 �[31;01m*�[0m         environment, line 3247:  Called eblit-run 'src_compile'
 �[31;01m*�[0m         environment, line  854:  Called eblit-glibc-src_compile
 �[31;01m*�[0m   src_compile.eblit, line  223:  Called toolchain-glibc_src_compile
 �[31;01m*�[0m   src_compile.eblit, line  133:  Called die
 �[31;01m*�[0m The specific snippet of code:
 �[31;01m*�[0m          emake || die "make for ${ABI} failed"
 �[31;01m*�[0m 
 �[31;01m*�[0m If you need support, post the output of `emerge --info '=sys-libs/glibc-2.15-r2'`,
 �[31;01m*�[0m the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.15-r2'`.
 �[31;01m*�[0m This ebuild is from an overlay named 'prefix-with-glibc': '/home/vagrant/gentoo-prefix-libc/overlay/'
 �[31;01m*�[0m The complete build log is located at '/home/vagrant/gentoo/var/tmp/portage/sys-libs/glibc-2.15-r2/temp/build.log'.
 �[31;01m*�[0m The ebuild environment file is located at '/home/vagrant/gentoo/var/tmp/portage/sys-libs/glibc-2.15-r2/temp/environment'.
 �[31;01m*�[0m Working directory: '/home/vagrant/gentoo/var/tmp/portage/sys-libs/glibc-2.15-r2/work/build-default-x86_64-pc-linux-gnu-nptl'
 �[31;01m*�[0m S: '/home/vagrant/gentoo/var/tmp/portage/sys-libs/glibc-2.15-r2/work/glibc-2.15'

Fix/workaround:

cd /home/vagrant/gentoo/var/tmp/portage/sys-libs/glibc-2.15-r2/work/glibc-2.15
ln -s ../build-default-x86_64-pc-linux-gnu-nptl amd64

I'm not sure why 2.15 is built (instead of the more recent 2.16 that has patches in the overlay.

  1. python3 compile
copying and adjusting /home/vagrant/gentoo/var/tmp/portage/dev-lang/python-3.3.0/work/Python-3.3.0/Tools/scripts/pyvenv -> build/scripts-3.3
changing mode of build/scripts-3.3/pydoc3 from 644 to 755
changing mode of build/scripts-3.3/idle3 from 644 to 755
changing mode of build/scripts-3.3/2to3 from 644 to 755
changing mode of build/scripts-3.3/pyvenv from 644 to 755
renaming build/scripts-3.3/pydoc3 to build/scripts-3.3/pydoc3.3
renaming build/scripts-3.3/idle3 to build/scripts-3.3/idle3.3
renaming build/scripts-3.3/2to3 to build/scripts-3.3/2to3-3.3
renaming build/scripts-3.3/pyvenv to build/scripts-3.3/pyvenv-3.3
python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h /usr/include/linux/cdrom.h
Traceback (most recent call last):
  File "../../Tools/scripts/h2py.py", line 169, in <module>
    main()
  File "../../Tools/scripts/h2py.py", line 68, in main
    fp = open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/usr/include/sys/types.h'
make: *** [platformspecificmods] Error 1
emake failed
 ^[[31;01m*^[[0m ERROR: dev-lang/python-3.3.0 failed (compile phase):
 ^[[31;01m*^[[0m   emake failed
 ^[[31;01m*^[[0m
 ^[[31;01m*^[[0m Call stack:
 ^[[31;01m*^[[0m     ebuild.sh, line   93:  Called call-ebuildshell 'src_compile'
 ^[[31;01m*^[[0m   environment, line 1441:  Called src_compile
 ^[[31;01m*^[[0m   environment, line 5995:  Called die
 ^[[31;01m*^[[0m The specific snippet of code:
 ^[[31;01m*^[[0m       emake CPPFLAGS="" CFLAGS="" LDFLAGS="" || die "emake failed";
 ^[[31;01m*^[[0m
 ^[[31;01m*^[[0m If you need support, post the output of `emerge --info '=dev-lang/python-3.3.0'`,
 ^[[31;01m*^[[0m the complete build log and the output of `emerge -pqv '=dev-lang/python-3.3.0'`.
 ^[[31;01m*^[[0m The complete build log is located at '/home/vagrant/gentoo/var/tmp/portage/dev-lang/python-3.3.0/temp/build.log'.
 ^[[31;01m*^[[0m The ebuild environment file is located at '/home/vagrant/gentoo/var/tmp/portage/dev-lang/python-3.3.0/temp/environment'.
 ^[[31;01m*^[[0m Working directory: '/home/vagrant/gentoo/var/tmp/portage/dev-lang/python-3.3.0/work/Python-3.3.0'
 ^[[31;01m*^[[0m S: '/home/vagrant/gentoo/var/tmp/portage/dev-lang/python-3.3.0/work/Python-3.3.0'

This is probably an upstream (Prefix) bug, as there is a hard-coded /usr path instead of the prefixed path. Of course, this normally is not a huge issue as types.h (and the others) will generally be the same for the host and the prefixed system.

Workaround (but really ugly and requires root)

sudo ln -s /home/vagrant/gentoo/usr/include/sys /usr/include/sys

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.