473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 2192
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 extending QListViewItem to QListViewItemNumeric. Then I...
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 is testerl.i: ========================= %module...
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 produced no error swig -python example.i gcc -c...
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 the end of >this email. Ok, I managed to get...
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 errors can anyone help $swig -python test_hk.c this...
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 able to compile the applications by including the...
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 SWIG replaces "NORMAL" with "PL_op->op_next"... ...
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 method for now. Running the following commands to...
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 a look at it. swig-1.3.29, g++ (GCC) 4.1.1...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.