Compiling Python3.1

J

Johannes Bauer

Hello group,

I just wanted to switch from Py3.0 to Py3.1. No luck here:

[...]
ar rc libpython3.1.a Python/_warnings.o Python/Python-ast.o
Python/asdl.o Python/ast.o Python/bltinmodule.o Python/ceval.o
Python/compile.o Python/codecs.o Python/errors.o Python/frozen.o
Python/frozenmain.o Python/future.o Python/getargs.o
Python/getcompiler.o Python/getcopyright.o Python/getplatform.o
Python/getversion.o Python/graminit.o Python/import.o Python/importdl.o
Python/marshal.o Python/modsupport.o Python/mystrtoul.o
Python/mysnprintf.o Python/peephole.o Python/pyarena.o Python/pyctype.o
Python/pyfpe.o Python/pymath.o Python/pystate.o Python/pythonrun.o
Python/structmember.o Python/symtable.o Python/sysmodule.o
Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o
Python/dtoa.o Python/formatter_unicode.o Python/dynload_shlib.o
Python/thread.o
ar rc libpython3.1.a Modules/config.o Modules/getpath.o Modules/main.o
Modules/gcmodule.o
ar rc libpython3.1.a Modules/_threadmodule.o Modules/signalmodule.o
Modules/posixmodule.o Modules/errnomodule.o Modules/pwdmodule.o
Modules/_sre.o Modules/_codecsmodule.o Modules/_weakref.o
Modules/_functoolsmodule.o Modules/_localemodule.o Modules/_iomodule.o
Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o
Modules/textio.o Modules/stringio.o Modules/zipimport.o
Modules/symtablemodule.o Modules/xxsubtype.o
ranlib libpython3.1.a
gcc -pthread -Xlinker -export-dynamic -o python \
Modules/python.o \
libpython3.1.a -lpthread -ldl -lutil -lm
Traceback (most recent call last):
File "./setup.py", line 1675, in <module>
main()
File "./setup.py", line 1670, in main
"Tools/scripts/2to3"]
File "/home/joe/Python-3.1rc1/Lib/distutils/core.py", line 149, in setup
dist.run_commands()
File "/home/joe/Python-3.1rc1/Lib/distutils/dist.py", line 921, in
run_commands
self.run_command(cmd)
File "/home/joe/Python-3.1rc1/Lib/distutils/dist.py", line 940, in
run_command
cmd_obj.run()
File "/home/joe/Python-3.1rc1/Lib/distutils/command/build.py", line
128, in run
self.run_command(cmd_name)
File "/home/joe/Python-3.1rc1/Lib/distutils/cmd.py", line 315, in
run_command
self.distribution.run_command(command)
File "/home/joe/Python-3.1rc1/Lib/distutils/dist.py", line 940, in
run_command
cmd_obj.run()
File "/home/joe/Python-3.1rc1/Lib/distutils/command/build_ext.py",
line 347, in run
self.build_extensions()
File "./setup.py", line 102, in build_extensions
missing = self.detect_modules()
File "./setup.py", line 728, in detect_modules
f = open(f).read()
File "/home/joe/Python-3.1rc1/Lib/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
917: ordinal not in range(128)
make: *** [sharedmods] Fehler 1

What can I do about that?

Kind regards,
Johannes
 
M

Martin v. Löwis

What can I do about that?

Remove the non-ASCII characters from db.h.

Regards,
Martin
 
J

Johannes Bauer

Martin said:
Remove the non-ASCII characters from db.h.

Ehh...

$ find -type f | grep -i db.h
../Modules/unicodename_db.h
../Modules/unicodedata_db.h
../Objects/unicodetype_db.h

There's no db.h file in the Python-3.1rc1 distribution. The ones above
contain thousands of lines (~15k, 5k and 2k) all of which consist of
endless arrays of unsigned characters - I really would not know what to
remove from those.

Kind regards,
Johannes
 
M

Martin v. Löwis

Johannes said:
Ehh...

$ find -type f | grep -i db.h
./Modules/unicodename_db.h
./Modules/unicodedata_db.h
./Objects/unicodetype_db.h

There's no db.h file in the Python-3.1rc1 distribution.

Correct. I was referring to the db.h from your operating system.
See line 728 of setup.py.

Regards,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top