This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Python 2.5.1 compile failed with configure option "--enable-unicode=no"
Type: compile error Stage:
Components: Build, Interpreter Core Versions: Python 2.6, Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, songma
Priority: normal Keywords:

Created on 2008-01-23 09:23 by songma, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg61573 - (view) Author: Song Ma (songma) Date: 2008-01-23 09:23
In my platform I have to disable Unicode support in Python 2.5.1. The
"configure" file provided a option "--enable-unicode=no" to allow me to
do so. However, If I ran the configure with that option and then make,
the following error showed:
Python/ast.c:3168: undefined reference to `PyUnicode_DecodeRawUnicodeEscape'
Python/ast.c:3170: undefined reference to `PyUnicode_DecodeUnicodeEscape'
collect2: ld returned 1 exit status
make: *** [python] Error 1

Python 2.4.4 can be compiled with this option and works well. Since
"ast.c" was newly introduced in 2.5.1. Maybe we need put MACRO
"Py_USING_UNICODE" in ast.c for function "decode_unicode()". Otherwise
it needs to modify the "configure" file to forbid "--enable-unicode=no".

However in ast.c "decode_utf8()" is using "Py_USING_UNICODE" to make it
"pluggable" for not supporting utf8. Why not do the same thing for
"decode_unicode()"?
msg61576 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-01-23 09:37
Python/ast.c has been fixed but more code needs to be fixed:

gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes  -I. -IInclude -I./Include   -DPy_BUILD_CORE -o
Parser/tokenizer.o Parser/tokenizer.c
Parser/tokenizer.c: In function 'decode_str':
Parser/tokenizer.c:607: warning: assignment discards qualifiers from
pointer target type
Parser/tokenizer.c: In function 'dec_utf8':
Parser/tokenizer.c:1550: warning: implicit declaration of function
'PyUnicode_DecodeUTF8'
Parser/tokenizer.c:1550: warning: initialization makes pointer from
integer without a cast
Parser/tokenizer.c:1552: warning: implicit declaration of function
'PyUnicode_AsEncodedString'
Parser/tokenizer.c:1552: warning: assignment makes pointer from integer
without a cast

/home/heimes/dev/python/release25-maint/Parser/tokenizer.c:1550:
undefined reference to `PyUnicode_DecodeUTF8'
/home/heimes/dev/python/release25-maint/Parser/tokenizer.c:1552:
undefined reference to `PyUnicode_AsEncodedString'
/home/heimes/dev/python/release25-maint/Parser/tokenizer.c:1550:
undefined reference to `PyUnicode_DecodeUTF8'
/home/heimes/dev/python/release25-maint/Parser/tokenizer.c:1552:
undefined reference to `PyUnicode_AsEncodedString'
msg61583 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-01-23 14:34
I fixed it for Python 2.5 and 2.6. However several extensions and
modules don't work w/o unicode support. Please contribute fixes if you
need more support.

r60215 r60216
History
Date User Action Args
2022-04-11 14:56:30adminsetgithub: 46210
2008-01-23 14:34:39christian.heimessetstatus: open -> closed
priority: high -> normal
resolution: fixed
messages: + msg61583
2008-01-23 09:37:14christian.heimessetpriority: high
nosy: + christian.heimes
messages: + msg61576
components: + Interpreter Core, - Unicode
versions: + Python 2.6
2008-01-23 09:23:44songmacreate