Phil Quesinberry
2013-Apr-05 01:16 UTC
[Samba] Python UCS2 vs UCS4 issue on latest git: ImportError: ....undefined symbol: PyUnicodeUCS2_Decode (NOT SOLVED)
I forgot to remove 'solved' from the title after the fix I thought I had discovered didn't work. I was going to post anyway in hopes of helping someone else but that didn't quite work out the way I'd planned. I'll use the lateness of the hour as an excuse. Ok, so after digging further into this problem, it's getting weird: I decided to manually do the configure>make>make install on Samba's private Python build that's normally done in the 'install_with_python' shell script and configure it with --enable-unicode=ucs2 but even though it built successfully, executing /usr/local/samba/python/bin/python and doing an import sys followed by print sys.maxunicode gives a value of 1114111. So either my config command was ignored completely or there's something else going on that I just don't understand. If that's the case and someone in here knows enough to enlighten the new guy on what's happening or at least direct me to some relevant info, I'd really appreciate it. Also, if there's a way to "un-provision" Samba in order to join an existing domain as a DC without wiping it out and re-installing, I'd like to know how to do that too. I see where others have asked the same question but each time it has gone unanswered so I'm assuming that there's no practical way to do it at the moment. That's actually what got me into this mess. I'll try reverting to the latest stable version, this last pull from v4-0-test appears to be broken, at least for my environment. - Phil ---------------------- From: Phil Quesinberry Sent: Thursday, April 04, 2013 1:48 AM To: 'samba at lists.samba.org' Subject: Python UCS2 vs UCS4 issue on latest git: ImportError: ....undefined symbol: PyUnicodeUCS2_Decode [SOLVED] I'm getting the following error attempting to run samba-tool after installing the latest git using the install_with_python script to use Python 2.6: [root at Server1 dcerpc]# samba-tool Traceback (most recent call last): File "/usr/local/samba/bin/samba-tool", line 33, in <module> from samba.netcmd.main import cmd_sambatool File "/usr/local/samba/lib/python2.6/site-packages/samba/netcmd/__init__.py", line 20, in <module> from samba import getopt as options File "/usr/local/samba/lib/python2.6/site-packages/samba/getopt.py", line 30, in <module> from samba.hostconfig import Hostconfig File "/usr/local/samba/lib/python2.6/site-packages/samba/hostconfig.py", line 20, in <module> from samdb import SamDB File "/usr/local/samba/lib/python2.6/site-packages/samba/samdb.py", line 32, in <module> from samba.dcerpc import drsblobs, misc ImportError: /usr/local/samba/lib/python2.6/site-packages/samba/dcerpc/drsblobs.so: undefined symbol: PyUnicodeUCS2_Decode Samba-tool was working with the previous git, so I'm not certain if this is a problem with the latest build or a problem with Python in my environment. If I understand this correctly, Samba was compiled with a Python version using 2-byte Unicode characters but my Python version is using 4-byte Unicode characters. If that is indeed the case, why was it changed and what would be the best way to go about fixing this problem? I tried adding -enable-unicode=ucs2 to the configure options in the 'install_with_python' script but that had no effect so now I wonder if somehow a different version of Python on the system is being referenced instead of the one included with Samba. Any suggestions here would be greatly appreciated, even if it's only to tell me whether or not I'm on the right track. Thanks! Version is 4.0.5-GIT-20b0adc. CentOS 5.9. Regards, Phil Quesinberry Q Systems Engineering, Inc. Electronic Controls and Embedded Systems Development (410) 969-8002 http://www.qsystemsengineering.com
Andrew Bartlett
2013-Apr-05 02:34 UTC
[Samba] Python UCS2 vs UCS4 issue on latest git: ImportError: ....undefined symbol: PyUnicodeUCS2_Decode (NOT SOLVED)
On Thu, 2013-04-04 at 21:16 -0400, Phil Quesinberry wrote:> I forgot to remove 'solved' from the title after the fix I thought I had > discovered didn't work. I was going to post anyway in hopes of helping > someone else but that didn't quite work out the way I'd planned. I'll use > the lateness of the hour as an excuse.I was about to ask exactly how it was solved...> Ok, so after digging further into this problem, it's getting weird: > > I decided to manually do the configure>make>make install on Samba's private > Python build that's normally done in the 'install_with_python' shell script > and configure it with --enable-unicode=ucs2 but even though it built > successfully, executing /usr/local/samba/python/bin/python and doing an > import sys followed by print sys.maxunicode gives a value of 1114111. So > either my config command was ignored completely or there's something else > going on that I just don't understand. If that's the case and someone in > here knows enough to enlighten the new guy on what's happening or at least > direct me to some relevant info, I'd really appreciate it. > > Also, if there's a way to "un-provision" Samba in order to join an existing > domain as a DC without wiping it out and re-installing, I'd like to know how > to do that too. I see where others have asked the same question but each > time it has gone unanswered so I'm assuming that there's no practical way to > do it at the moment. That's actually what got me into this mess.There is no need to 'un-provision'. Joining the existing domain as a DC already wipes the data from the previous join.> I'll try reverting to the latest stable version, this last pull from > v4-0-test appears to be broken, at least for my environment.I would like to understand better what is failing for you, as nothing related to his has intentionally changed since 4.0.0, in either master of v4-0-test. (Frankly, the changes in this area of the code in total have been quite limited, as we work to address issues raised by the 4.0 release rather than embark on massive new features). Thanks, Andrew Bartlett -- Andrew Bartlett http://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org
Phil Quesinberry
2013-Apr-14 20:13 UTC
[Samba] Python UCS2 vs UCS4 issue on latest git: ImportError: ....undefined symbol: PyUnicodeUCS2_Decode (SOLVED!)
OMG... I fixed it. Since libgnutls.so.26 was in /usr/local/lib and not in /usr/local/samba/lib, I added a file called gnutls.conf to /etc/ld.conf.d/ with the following entry: /usr/local/lib I then did an ldconfig and now it seems to work! System programs like yum which appear to rely on the older version of Python work just fine. Let me know if you need more info or want me to try any additional testing to try and extract more detailed information to potentially improve the installation process or otherwise keep this from happening to other users. After this experience, I'm happy to play a small part in helping others avoid this sort of misery. Well, I just learned something. And a word of advice to anyone else reading this thread... don't mess with your Python installation unless you know what you're doing. ..and if you're contemplating messing with your Python installation... you probably don't. :) Many, MANY thanks Andrew for taking your valuable time to try and help me get this running as well as everyone else who chimed in with comments trying to help. Best regards, - Phil -- View this message in context: http://samba.2283325.n4.nabble.com/Re-Python-UCS2-vs-UCS4-issue-on-latest-git-ImportError-undefined-symbol-PyUnicodeUCS2-Decode-NOT-SOL-tp4646314p4646745.html Sent from the Samba - General mailing list archive at Nabble.com.
Seemingly Similar Threads
- Python UCS2 vs UCS4 issue on latest git: ImportError: ....undefined symbol: PyUnicodeUCS2_Decode [SOLVED]
- ucs2 build of xapian?
- Error when complile samba 4 with python 2.5
- samba-3.0.0rc1: nmbd PANIC: failed to create UCS2 buffer
- Samba rc1 problem : PANIC: failed to create UCS2 buffer /usr/local/samba/sbin/nmbd(smb_panic+0xfc) [0x80ae680]