Questions about unicodedata in python 2.6.2

W

Weidong

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
 
W

Weidong

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.
 
W

Weidong

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
 
W

Weidong

'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
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top