Questions about unicodedata in python 2.6.2
I am trying to build python 2.6.2 from the source by following the instructions in README that comes with the source. The configure and make steps are fine, but there is an error in "make install" step. This "make install" attempts to build a lot of lib, and it complains about the lack of "unicodedata" shared object, I looked at the source tree and the build result, unicodedata.so does not exist. I further notice that in Modules/Setup.dist, the line for unicodedata.c is commented out by default. So I uncomment it, and experiment with rebuilding everything. This time, with or without re-configure, the "make" step failed with a link-time error when linking for libpython2.6.a due to "undefined reference to 'initunicodedata'. This symbol is defined in unicodedata.c, but unicodedata.o is not used in linking for libpython2.6.a, hence the error. So this is a problem in the generated Makefile. Does anyone know what special things I have to do to avoid such error? Is there any known problems in the configure/make files in the python 2.6.2 source code that require special patch? Is unicodedata.c really needed in python 2.6.2? If it is needed, why it is commented out by default in Modules/Setup.dist? If it is not needed, why "make install" attempts to use it in compiling the libraries? Why those libraries are not designed to be compiled in the make step, but in the install step? Thanks for your help! - Weidong -- http://mail.python.org/mailman/listinfo/python-list
Re: Questions about unicodedata in python 2.6.2
On Jul 28, 9:54 am, Weidong wrote: > I am trying to build python 2.6.2 from the source by following the > instructions in README that comes with the source. The configure and > make steps are fine, but there is an error in "make install" step. > This "make install" attempts to build a lot of lib, and it complains > about the lack of "unicodedata" shared object, > > I looked at the source tree and the build result, unicodedata.so does > not exist. I further notice that in Modules/Setup.dist, the line for > unicodedata.c is commented out by default. So I uncomment it, and > experiment with rebuilding everything. > > This time, with or without re-configure, the "make" step failed with a > link-time error when linking for libpython2.6.a due to "undefined > reference to 'initunicodedata'. This symbol is defined in > unicodedata.c, but unicodedata.o is not used in linking for > libpython2.6.a, hence the error. So this is a problem in the > generated Makefile. > > Does anyone know what special things I have to do to avoid such > error? Is there any known problems in the configure/make files in the > python 2.6.2 source code that require special patch? > > Is unicodedata.c really needed in python 2.6.2? If it is needed, why > it is commented out by default in Modules/Setup.dist? If it is not > needed, why "make install" attempts to use it in compiling the > libraries? Why those libraries are not designed to be compiled in the > make step, but in the install step? > > Thanks for your help! > > - Weidong To add some info: This experiment was done on Linux, Ubuntu 8.x. -- http://mail.python.org/mailman/listinfo/python-list
Re: Questions about unicodedata in python 2.6.2
On Jul 28, 10:17 am, Christian Heimes wrote: > unicodedatais usually build as a shared library and not linked into the > Python core. How did you configure Python? The usual prodecure is: > > ./configure > make > sudo make install > > On Unix the preferred option for ./configure is "--enable-unicode=ucs4". > > Christian Thanks for your response! I configured it in the same way as you said, but without "--enable-unicode=ucs4". The ocnfig.log shows that checking for UCS-4 was failed. So I assume that by default UCS-2 was used. There was no other problme in the "make" step. The problem was in the "sudo make install" step, where there were errors in building libraries / test libraries that need unicodedata.so which did not exist. I also tried to use "make -i" to let it complete the building to ignore that error. In the end, I still did not see unicodedata.so in the build result. It seems that the Makefile did not even try to build unicodedata.so. Maybe something went wrong in my configuration? - Weidong -- http://mail.python.org/mailman/listinfo/python-list
Re: Questions about unicodedata in python 2.6.2
On Jul 28, 12:37 pm, Christian Heimes wrote: > 'make install' shouldn't compile any libraries if you run 'make' prior > to 'make install'. I suggest you start again with a clean build tree of > Python 2.6.2. > > Christian You are perfectly right. I started everything again after a "make distclean". This time I configured it as follows: ./configure --enable-unicode=ucs2 --enable-shared to make things explicit, although I guess that the defaults would be the same even when "--enable-unicode=ucs2 --enable-shared" are not specified (in my case where ucs4 is not available). The Makefile generated then contains meaningful flags in RUNSHARED which was absent before. With this configuration, "make" was fine, except it "only" has the following problems: Failed to find the necessary bits to build these modules: bsddb185 gdbm sunaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name. That was not surprised because I did not have those available on my machine. The unicodedata.so was also created in the "make" process, and "make install" showed no problem. "make test" showed the following problems: test_aepack test_aepack skipped -- No module named aepack test_al test_al skipped -- No module named al test_anydbm Exception bsddb.db.DBRunRecoveryError: DBRunRecoveryError(-30974, 'DB_RUNRECOVERY: Fatal error, run database recovery -- PANIC: fatal region error detected; run recovery') in ignored I guess this is caused by the missing bsddb185. However, the problem is, "make test" seemed to be hanging at that fatal error. Do you know how critical are those failed tests? Thanks for your help! - Weidong -- http://mail.python.org/mailman/listinfo/python-list
Questions on python 2.6.2 installed files
I would like to build a python 2.6.2 for Linux that runs on arm-based embeded devices. After some experiment of building from the python 2.6.2 source, I notice that the installed files from "make install" are much too big for an embedded system. For example, the files it installs to /usr/local/lib/python2.6/ dir is over 350MB. >From the following installed files, /usr/local/bin/python /usr/local/lib/libpython2.6.so.1.0 I do not see they have any "direct" dependency on the files installed in /usr/local/lib/python2.6 dir. What are the use of those files in / usr/local/lib/python2.6? What is the consequence if I do not put them on the embedded system? Is there a good way to directly make an installation "package" (or tarball) of python 2.6.2 from the build result? Any advice on configuration to make the results smaller will be greatly appreciated! - Weidong -- http://mail.python.org/mailman/listinfo/python-list