Discussion:
[Bitpim-devel] Various installation problems on Debian-testing
Mike Schiraldi
2004-09-04 19:27:21 UTC
Permalink
(Note: This is a continuation of a discussion started on bitpim-user; as
Roger pointed out, it would probably be more appropriate to discuss it here)

In a nutshell, i run Debian-testing, and i'd like to use BitPim. Looking for
the quickest, easiest way to get it installed, i first tried using alien to
convert the .rpm to .deb and install that. But when i do that, i run into a
The situation at the moment is that the pre-packaged RPM doesn't work on
some Debian machines due to some wierd voodoo with them and not finding
one symbol in a shared library shipped with BitPim.
[...]
Note that someone is already working on a proper dpkg for Debian.
Since i'm excited to get started using BitPim to hack around with my phone,
i didn't want to wait that long. So i decided to see if i could get the CVS
version working. I've been having trouble with that, too.

I wish there were a HOWTO that i, as a user of a fairly vanilla installation
of a fairly common Linux distribution, could just follow step-by-step to get
things up and running. And so i'm making one. The start of it is at
http://schiraldi.org/bitpim-installation-howto.html

Currently i'm getting an exception ending with:

File "/usr/lib/python2.3/site-packages/wx/_core.py", line 4, in ?
import _core_
ImportError: /usr/lib/python2.3/site-packages/wx/_core_.so: undefined symbol:
PyUnicodeUCS2_AsWideChar

I imagine that means something's screwed up with my wxPython's UniCode, but
i did the best i could to install wxPython according to the instructions on
the BitPim and wxPython sites. Further details are available at the link
above.

Does anyone know what i'm doing wrong?

Thanks
Roger Binns
2004-09-04 20:06:47 UTC
Permalink
Post by Mike Schiraldi
I wish there were a HOWTO that i, as a user of a fairly vanilla
installation of a fairly common Linux distribution, could just follow
step-by-step to get things up and running. And so i'm making one. The
start of it is at http://schiraldi.org/bitpim-installation-howto.html
For people who just want to *use* BitPim, the answer is to
use the supplied RPM. Seperately there are some people trying
to make ebuilds for Gentoo and dpkg for Debian.

If you want to run from source, then the instructions are on
the developer page:

http://bitpim.org/developer.html
Post by Mike Schiraldi
I imagine that means something's screwed up with my wxPython's
UniCode, but i did the best i could to install wxPython according to
the instructions on the BitPim and wxPython sites. Further details
are available at the link above.
For some reason Python defaults to using 4 bytes per unicode character,
but many places (especially Redhat) build it using 2 bytes per unicode
character. Python extensions are built using whatever the Python
they are linked against uses.

For wxPython, the supplied binary RPM is built against a 2 bytes
per unicode character Python. Your system (and mine for that matter
and even the build environment I use) all have 4 bytes per unicode
character. Consequently you see the error you got.

You will have to rebuild wxPython to fix this. Note that if you
have multiple Pythons on your system then you need to be careful
to ensure that you build and run against the correct one.

Unfortunately it is one of those current issues with Linux that
it is almost impossible to produce a single program that can
just run everywhere. Note for example that the Windows version
of BitPim will actually run on everything from Windows 95 onwards!
Other projects handle this by mass building. For example see
Gaim:

http://gaim.sourceforge.net/downloads.php

For people who do want to do the builds for their platform and
are prepared to upload them to SourceForge or otherwise integrate
them into their package system I am always willing to help.

Roger
Mike Schiraldi
2004-09-04 21:39:52 UTC
Permalink
For people who just want to *use* BitPim, the answer is to use the
supplied RPM.
[...]
The situation at the moment is that the pre-packaged RPM doesn't work on
some Debian machines
[...]
I don't know *why* that happens, but can do a workaround.
If i could just use the RPM, that would definitely be a solution for me. But
i'm having the problem you describe above. Can you tell me more about the
workaround, or direct me to a post where you explain what to do? I've
searched for "bitpim Crypto.PublicKey.RSA" and "bitpim deb rpm" but didn't
find anything.

Also, i'd suggest posting this information in the sidebar on the main BitPim
page. (Near the part which says, "On Debian use alien to convert it and then
dpkg to install.") If the workaround is too complex to put in the sidebar,
maybe put in on a seperate page and link to it from the sidebar.
If you want to run from source, then the instructions are on
http://bitpim.org/developer.html
I'm still doing my best to follow those instructions. You were right that
there was a stale version of wxPython somewhere on my system -- i used the
"locate" command to find and eradicate anything on my system containing
"wxp", "wxP", or "wx-p", then repeated the wxPython installation and got a
little further.

I'm getting a new exception now, though:

Traceback (most recent call last):
File "bp.py", line 93, in ?
import gui
File "/tmp/bitpim/gui.py", line 23, in ?
import wx
File "/opt/wx/2.5.2.8/wxPython/wx/__init__.py", line 42, in ?
from wx._core import *
File "/opt/wx/2.5.2.8/wxPython/wx/_core.py", line 4, in ?
import _core_
ImportError: /opt/wx/2.5.2.8/wxPython/wx/_core_.so: undefined symbol:
_ZN5wxApp10InitializeERiPPw

I searched Google for ZN5wxApp10InitializeERiPPw, but couldn't find
anything.

Thanks again for your quick and helpful responses, and your patience.
Roger Binns
2004-09-05 00:11:51 UTC
Permalink
Can you tell me more about the workaround,
It is a code change I would have to make, basically disable BitFling
if that error happens.

To understand what is happening behind the scenes, read this:

http://bitpim.org/papers/baypiggies/

Especially slides 11 through 13 and 18 through 23.

The final distribution is just a directory of files (see
/usr/lib/bitpim-version)

The file bp is the Python interpretter with a launcher
that then loads the Python code which is in a zip file
appended to bp. (That is why the file is so big and
doesn't match running 'size' on it).

The other .so files are Python binary modules. What is
happening in your particular case is that the binary module
for Crypto.PublicKey._fastmath is claiming that it has
no error attribute. The funny thing is that the *exact*
same file on the build machine as well as run almost anywhere
else does have that attribute. It is also present in
"strings" output.

So there is something wierd about some Debian machines
and I think one or two others that somehow cause the
shared library file to behave differently.
Also, i'd suggest posting this information in the sidebar on the main
BitPim page. (Near the part which says, "On Debian use alien to
convert it and then dpkg to install.") If the workaround is too
complex to put in the sidebar, maybe put in on a seperate page and
link to it from the sidebar.
I don't want a workaround. I want a fix. Silently trapping this
merely makes it look like the problem doesn't exist. If I knew
why this is happening I would be happy to silently trap it,
but until that point I really want to get to the bottom of it
first. Note also that this only affects *some* Debian machines.
_ZN5wxApp10InitializeERiPPw
That is an incorrectly built wxPython. If you run ldd on _core.so you
will see it linking to some libraries in /usr/lib/wxPython-version
but they don't match the file above. (wxPython does compile them
together).

Roger
Vic Heintz
2004-09-07 16:27:28 UTC
Permalink
Because there is no 0.7.17 Jaguar binary available yet and Stephen
seems to have a lot on his plate, I was going to try to see if I could
do it myself. Here is what happened:

[Vic-iBook:~/Projects/bitpim] vic% /usr/local/bin/pythonw makedist.py
=== Sanity check ===
python version OK
wxPython version OK
wxPython is unicode build
Traceback (most recent call last):
File "makedist.py", line 407, in ?
sanitycheck()
File "makedist.py", line 84, in sanitycheck
raise Exception("You need a unicode build of wxPython")
Exception: You need a unicode build of wxPython

I am confused by seemingly conflicting statements about having a
unicode build. Could someone clue me in as to what may be wrong with my
set-up?

Vic
Roger Binns
2004-09-08 02:20:17 UTC
Permalink
Post by Vic Heintz
[Vic-iBook:~/Projects/bitpim] vic% /usr/local/bin/pythonw makedist.py
=== Sanity check ===
python version OK
wxPython version OK
wxPython is unicode build
File "makedist.py", line 407, in ?
sanitycheck()
File "makedist.py", line 84, in sanitycheck
raise Exception("You need a unicode build of wxPython")
Exception: You need a unicode build of wxPython
I am confused by seemingly conflicting statements about having a
unicode build. Could someone clue me in as to what may be wrong
with my set-up?
There aren't Unicode builds of wxPython on Mac yet. For the moment
comment that check out. Each line is printed, then the test is
done, then either an exception or OK is printed. The output
should make sense now.

Roger
Steven Palm
2004-09-08 02:27:59 UTC
Permalink
Post by Vic Heintz
I am confused by seemingly conflicting statements about having a
unicode build. Could someone clue me in as to what may be wrong with
my set-up?
For the Macintosh builds at the moment, you are going to have to
modify makedist.py with the following:

print "wxPython is unicode build",
if not wx.USE_UNICODE and not sys.platform=='darwin':
raise Exception("You need a unicode build of wxPython")
print " OK"

Loading...