472,353 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

SWIG related: Error after installing m2crypto undefined symbol: EVP_rc5_32_12_16_ofb

System is Redhat 9.0, Python 2.2.3, Zope 2.6.2

built OpenSSL from source:

2791797 Sep 30 14:50:15 2003 openssl-0.9.7c.tar.gz [LATEST]

used configure options to set for /usr/local and /usr/local/openssl
make
make test
make install

--all-ok

generated demo certificates ok

modified build_ext.py in both places

built SWIG-1.3.20

make check gave error:
....
/usr/bin/ld: cannot find -lswigtcl8
collect2: ld returned 1 exit status
make[2]: *** [tcl_multi_cpp] Error 1
make[1]: *** [all] Error 2
make[1]: Target `check' not remade because of errors.
....
example.i:20: Warning(451): Setting const char * variable may leak memory
make: *** [check-tcl-examples] Error 1

(googled -lswigtcl8 with no joy) so ...

make install gave no errors

installed m2crypto 0.11 (Target for ZServerSSL is Zope-2.6.2)

[root@host tests]# python alltests.py
Traceback (most recent call last):
File "alltests.py", line 6, in ?
from M2Crypto import Rand
File "/usr/lib/python2.2/site-packages/M2Crypto/__init__.py", line 7, in ?
import __m2crypto
ImportError: /usr/lib/python2.2/site-packages/M2Crypto/__m2crypto.so: undefined
symbol: EVP_rc5_32_12_16_ofb

Theoretically I have the correct (or later) versions, so what should I check next?

TIA
Jul 18 '05 #1
8 2139
Sean wrote:
System is Redhat 9.0, Python 2.2.3, Zope 2.6.2

built OpenSSL from source:
[...]
ImportError: /usr/lib/python2.2/site-packages/M2Crypto/__m2crypto.so: undefined
symbol: EVP_rc5_32_12_16_ofb

Theoretically I have the correct (or later) versions, so what should I check next?


The FAQ: http://sandbox.rulemaker.net/ngps/m2/faq.html

--Irmen
Jul 18 '05 #2
According to Irmen de Jong <irmen@-NOSPAM-REMOVETHIS-xs4all.nl>:
Sean wrote:
ImportError: /usr/lib/python2.2/site-packages/M2Crypto/__m2crypto.so:
undefined symbol: EVP_rc5_32_12_16_ofb


The FAQ: http://sandbox.rulemaker.net/ngps/m2/faq.html


I should update the FAQ. The file CHANGES in the most recent release, 0.12,
says:

Changes since 0.11
--------------------
- Excluded RC5. IDEA was taken out several releases ago. This should
allow M2Crypto to build with stock OpenSSL on various Linuxen.

Of course if you have an earlier release - you appear to have 0.11 - the
file CHANGES does not contain the above. Duh! ;-)

What to do... what to do...
--
Ng Pheng Siong <ng**@netmemetic.com>

http://firewall.rulemaker.net -+- Firewall Change Management & Version Control
http://sandbox.rulemaker.net/ngps -+- Open Source Python Crypto & SSL
Jul 18 '05 #3
According to Ng Pheng Siong <ng**@netmemetic.com>:
According to Irmen de Jong <irmen@-NOSPAM-REMOVETHIS-xs4all.nl>:
Sean wrote:
ImportError: /usr/lib/python2.2/site-packages/M2Crypto/__m2crypto.so:
undefined symbol: EVP_rc5_32_12_16_ofb


The FAQ: http://sandbox.rulemaker.net/ngps/m2/faq.html


Of course if you have an earlier release - you appear to have 0.11 - the


Sorry, "you" here means Sean, not Irmen. I actually wanted to type "OP".

FAQ updated. Zope + ExternalEditor makes it easy. ;-)

Cheers.

--
Ng Pheng Siong <ng**@netmemetic.com>

http://firewall.rulemaker.net -+- Firewall Change Management & Version Control
http://sandbox.rulemaker.net/ngps -+- Open Source Python Crypto & SSL
Jul 18 '05 #4
> FAQ updated. Zope + ExternalEditor makes it easy. ;-)

I went to 0.12 and got it working, docs in 0.12 seem
identical to 0.11, maybe the zip files need to be updated?
Cheers.


Not quite yet. I moved up to the 2.7 version of ZServerSSL.
I had to correct a problem in z2s.py that was preventing z2s.py
from workiong with python 2.2.3

consider updating the language check to the following:

if python_version[:3] == '2.1':
if python_version[4:5] < '3':
import warnings
err = ('You are running Python version %s. This Python
version '
'has known bugs that may cause Zope to run
improperly. '
'Consider upgrading to a Python in the 2.1 series '
'with at least version number 2.1.3.' %
python_version)
warnings.warn(err)

if python_version[:3] == '2.2':
if python_version[4:5] < '2':
import warnings
err = ('You are running Python version %s. This Python
version '
'has known bugs that may cause Zope to run
improperly. '
'Consider upgrading to a Python in the 2.2 series '
'with at least version number 2.2.2.' %
python_version)
warnings.warn(err)

I also had to relocate some certificate related files (since I use
instances)
and now I'm getting a little farther. The next problem deals with:

File /usr/lib/python2.2/site-packages/M2Crypto/SSL/Context.py, line
155, in set_tmp_dh
File /usr/lib/python2.2/site-packages/M2Crypto/BIO.py, line 150, in
openfile
File /usr/lib/python2.2/site-packages/M2Crypto/BIO.py, line 139, in
__init__
SSLError: system lib

After logging this to the file it spits another message to the screen
about can't find file attribute _pyfree. I'm not sure that this
is/isn't a problem with the python version. I remember somewhere
there is a hack designed to fix something in python 2.1.3 that works
in 2.2.2 and above.

Any ideas?
Jul 18 '05 #5
> Cheers.

Additional information:

Got the /usr/local/zope/z2s.py cli version to start/stop
correctly.

The bug in M2Crypto.BIO.File is only occurring when trying
to start an instance. So the question is now: what else
about an instance can I examine?

TIA
Jul 18 '05 #6
According to Sean <st*******@cox.net>:
I went to 0.12 and got it working, docs in 0.12 seem
identical to 0.11, maybe the zip files need to be updated?
Yes, they do. ;-)
Not quite yet. I moved up to the 2.7 version of ZServerSSL.
I had to correct a problem in z2s.py that was preventing z2s.py
from workiong with python 2.2.3
I don't understand. The following command finds nothing:

ngps@vista:~/prog/ngps/m2/demo/Zope27$ find . -name z2s.py

z2s.py is for Zope 2.6 and is found in demo/Zope/.
I also had to relocate some certificate related files (since I use
instances)
As mentioned in demo/Zope27/INSTALL.txt:

<instance-home>
-----------------------

The following files are to be copied to the corresponding directories
in your <instance-home>:

- instance_home/ssl/ca.pem
- instance_home/ssl/server.pem
- instance_home/ssl/dh1024.pem

After logging this to the file it spits another message to the screen
about can't find file attribute _pyfree.


_pyfree is used in M2Crypto to denote whether a given C pointer should be
freed on the Python side or the C side. In the case of a C-level crap-out,
a Python hashtable^Wobject instance ;-) is incompletely initialised so may
not have the _pyfree attribute. It is a benign error, in that, by the time
you get here, the python process should be cleaning up and on its way out.
;-)
Please try the steps in demo/Zope27/INSTALL.txt.

Oh, I believe I've only tested Zope 2.7 using Python 2.1 (or whichever
version zope.org's docs recommends specifically). I can't keep up with all
these version variations.

Cheers.
--
Ng Pheng Siong <ng**@netmemetic.com>

http://firewall.rulemaker.net -+- Firewall Change Management & Version Control
http://sandbox.rulemaker.net/ngps -+- Open Source Python Crypto & SSL
Jul 18 '05 #7
> I don't understand. The following command finds nothing:

Actually I have 0.12, but the z2s.py from it's Zope folder.
Modified to the newer python version checker.

I'm working OK for the /usr/local/zope/z2s.py, but still
not up to speed on the instances. Still trying to determine
what's out of synch there.

Thanks again for the valuable feedback. If you have any other
suggestions I'd appreciate them!

TIA
Jul 18 '05 #8
st*******@cox.net (Sean) wrote in message news:<32**************************@posting.google. com>...
Final Scoop, I got it working!

If anyone ever has the same error:

2004-02-05T13:40:45 PANIC(300) z2 Startup exception
Traceback (innermost last):
File /usr/local/zope/z2s.py, line 789, in ?
(Object: ZLogger)
File /usr/lib/python2.2/site-packages/M2Crypto/SSL/Context.py, line
155, in set_tmp_dh
File /usr/lib/python2.2/site-packages/M2Crypto/BIO.py, line 150, in
openfile
File /usr/lib/python2.2/site-packages/M2Crypto/BIO.py, line 139, in
__init__
SSLError: system lib

What they will discover is this:

ssl_ctx.set_tmp_dh('%s/dh1024.pem' % INSTANCE_HOME)

But the file is there!
The error actually has to do with a missing server.pem!
This also fixed the missing attribute _pyfree ignored error.

But I'll leave explaining why to Ng Pheng Siong ...

Thanks to all for the help, it is sincerely appreciated!

P.S.

Ng, switch the python version test and you're python 2.2.3 ready! ;-)
Jul 18 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Uwe Mayer | last post by:
Hi, I was trying to extend a Qt class in C++ and using this in my Python application. I got problems importing the python module: I was...
0
by: Helmut Zeisel | last post by:
I want to build a static extension of Python using SWIG and VC++ 6.0 as described in http://www.swig.org/Doc1.3/Python.html#n8 for gcc. My file...
0
by: Jerry He | last post by:
Hi, I just installed SWIG on Windows(Cygwin) and tried to use it to compile some of the example python programs. For the first two commands it...
0
by: Jerry He | last post by:
>From Jerry He: >For the third one however > ld -shared example.o example_wrap.o -o _example.so >It gave me a long list of errors listed at...
1
by: superprad | last post by:
Hi I am trying to write a python wrapper for a C code I have using swig. when i try to compile the wrap.c i get a bunch of these warnings and...
4
by: r.nikhilk | last post by:
Hi, We are porting C++ applications from 32 bit to 64 bit on AIX platform. (The current version of AIX is 5.3 and xlC verison is 8.0). We are...
6
by: None | last post by:
Hi, I was trying to use SWIG to expose some C++ functions to perl. But, I ran into some issues here. I don't know why, but I see that a macro in...
3
by: Paul Anton Letnes | last post by:
Hello guys, (related to previous thread on wrapping C/C++ in Python, trying the SWIG approach.) Trying to map a C++ class to python, one...
2
by: mk | last post by:
Hello, I'm having terrible problems building C++ extension to Python 2.4 using SWIG. I'd appreciate if somebody knowledgeable at the subject took...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.