Summary: | dev-lang/python-3.1 fails to build with sys-libs/db headers containing non-UTF-8 characters | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Priit Laes (IRC: plaes) <plaes> |
Component: | [OLD] Unspecified | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alex.pyattaev, alex_pogodin, base-system, caleb, genzilla, it, olekhov, pauldv, rottex |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Priit Laes (IRC: plaes)
2009-08-02 08:09:48 UTC
Hello! I can confirm the bug with exactly the same fail location on AMD64: Portage 2.1.6.13 (default/linux/amd64/2008.0/desktop, gcc-4.3.3, glibc-2.10.1-r0, 2.6.30-gentoo-r4-localbuild x86_64) same bug I also confirm this bug. Please be sure that you have run 'python-updater', assigning to python herd due to multiple confirmations, thanks for reporting. Post the output of: emerge -ptv python:3.1 Same here. AMD64 & if I run python-updater it finds some packages but immed. wants to emerge 3.1 as first action so I'm stuck here.... ---------------------------------------------------- emerge -ptv python:3.1 These are the packages that would be merged, in reverse order: Calculating dependencies ... done! [ebuild NS ] dev-lang/python-3.1 [2.5.4-r2, 2.6.2-r1] USE="gdbm ncurses readline ssl threads xml -build -doc -examples -ipv6 -sqlite -tk -ucs2 -wininst" 0 kB Total: 1 package (1 in new slot), Size of downloads: 0 kB FYI: compiling by hand with debug on found out that in /usr/include/db4.5/db.h char 917 and /usr/include/db4.6/db.h char 902 was März (german word for March) in the #define DB_VERSION_STRING "Berkeley DB 4.6.21: (März 24, 2009)" equery belongs /usr/include/db4.6/db.h * Searching for /usr/include/db4.6/db.h ... sys-libs/db-4.6.21_p4 (/usr/include/db4.6/db.h) so it seems that sys-libs/db renders the version string in german which causes no issues when in Juli , August and so on... I changed LC_ALL to en_us LC_ADDRESS=de_DE.UTF-8 LC_ALL=en_US.UTF-8 LC_COLLATE=de_DE.UTF-8 LC_CTYPE=en_US.UTF-8 LC_IDENTIFICATION=de_DE.UTF-8 LC_MEASUREMENT=de_DE.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_MONETARY=de_DE.UTF-8 LC_NAME=de_DE.UTF-8 LC_NUMERIC=de_DE.UTF-8 LC_PAPER=de_DE.UTF-8 LC_TELEPHONE=de_DE.UTF-8 LC_TIME=de_DE.UTF-8 and reemerged sys-libs/db but realized that we have August :-) (english and german the same...) right now which doesn't trigger a umlaut and I can't change the time on the server easily... temporary fix replace "ä" with "a" in the db.h files Yes I can confirm this. I'm Chinese so the version string in db.h is always different than in English and is not in the ASCII range, so python 3.1 will fail to emerge. My workaround is to re-emerge db with LANG=C emerge -1 sys-libs/db or put "LANG=C" in the file /etc/portage/env/sys-libs/db and then re-emerge db. After re-emerge sys-libs/db, python 3.1 emerged with no error. (In reply to comment #7) > FYI: > compiling by hand with debug on found out that in > /usr/include/db4.5/db.h char 917 > and > /usr/include/db4.6/db.h char 902 > was März (german word for March) in the > #define DB_VERSION_STRING "Berkeley DB 4.6.21: (März 24, 2009)" > > equery belongs /usr/include/db4.6/db.h > * Searching for /usr/include/db4.6/db.h ... > sys-libs/db-4.6.21_p4 (/usr/include/db4.6/db.h) > > so it seems that sys-libs/db renders the version string in german which causes > no issues when in Juli , August and so on... > > I changed LC_ALL to en_us > > LC_ADDRESS=de_DE.UTF-8 > LC_ALL=en_US.UTF-8 > LC_COLLATE=de_DE.UTF-8 > LC_CTYPE=en_US.UTF-8 > LC_IDENTIFICATION=de_DE.UTF-8 > LC_MEASUREMENT=de_DE.UTF-8 > LC_MESSAGES=en_US.UTF-8 > LC_MONETARY=de_DE.UTF-8 > LC_NAME=de_DE.UTF-8 > LC_NUMERIC=de_DE.UTF-8 > LC_PAPER=de_DE.UTF-8 > LC_TELEPHONE=de_DE.UTF-8 > LC_TIME=de_DE.UTF-8 > > and reemerged sys-libs/db > but realized that we have August :-) (english and german the same...) right now > which doesn't trigger a umlaut and I can't change the time on the server > easily... > > temporary fix replace "ä" with "a" in the db.h files > OK, I have tried the proposed fix and it appears to work fine. However, python-updater thinks that I should update to 2.6: "* Starting Python Updater from 3.1 to 2.6". Nice, really. if you have sloted sys-libs/db you need to rebuild all of them with LANG=C hint: equery list sys-libs/db Same problem here, LANG=ru_RU.UTF-8. Re-emerging sys-libs/db helps building python-3.1, but python-updater switches to 2.6. I have no slotted ebuilds installed: # equery list sys-libs/db * Searching for db in sys-libs ... [IP-] [ ~] sys-libs/db-4.7.25_p4 (4.7) This bug should be now fixed in dev-lang/python-3.1. Maintainers of sys-libs/db: You might want to add setting of LC_ALL="C" to build system of sys-libs/db. It appears that the old emerge will not work with python 3. I have looked through the ChangeLog and found out that there are MASSIVE syntax restrictions added. So, we will not see python3 as default python interpreter any time soon (at least until whole portage is rewritten along with other python-based system proggies). So, I propose you DO NOT run python-updater at all and DO NOT switch to python 3 as default interpreter at least for now. *** Bug 280600 has been marked as a duplicate of this bug. *** I'm currently looking at this and figuring out where to fix it. It seems that only the install phase needs to be fixed. In the meantime, I'd like some feedback on which versions of db need to be fixed. I could fix them all and revbump them all, or I could fix them all and just revbump 4.7. Or I could just fix 4.7 and 4.6. In the meantime, while localized version strings are dubious, I think python is a bit braindead as well in actually parsing the stuff as it depends on the actual build date, and thus is variable. (In reply to comment #15) I suggest this line in src_unpack(): sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE |