473,788 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SWIG related: Error after installing m2crypto undefined symbol: EVP_rc5_32_12_1 6_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.p y", 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_1 6_ofb

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

TIA
Jul 18 '05 #1
8 2221
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_1 6_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_1 6_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**@netmemeti c.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**@netmemeti c.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_1 6_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**@netmemeti c.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(e rr)

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(e rr)

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.Fi le 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^Wobje ct 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**@netmemeti c.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.n et (Sean) wrote in message news:<32******* *************** ****@posting.go ogle.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
2207
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 used the following to generate the python extension: $ gcc -c -I/usr/include/qt3 -I/usr/include/python2.3 QListViewItemNumeric.cpp
0
2506
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 testerl extern int hz(int i);
0
1209
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 example.c example_wrap.c -I \ /usr/include/python2.4
0
1043
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 rid of the weird Tcl_Append, and strlen error messages, but right now I'm left with
1
2615
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 generates test_hk.py and test_hk_wrap.c then i compile it as $gcc -Wall -std=c99 test_hk.c test_hk_wrap.c -I/usr/include/python2.3/
4
5733
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 -q64 option in xlC compiler. But, when we link all these libraries to one of the main applications, we are getting the following errors: ld: 0711-317 ERROR: Undefined symbol: .FxCharFile::good() const ld: 0711-317 ERROR: Undefined symbol:...
6
2552
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"... I ran the following test: Files:
3
5611
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 "compile": -------------------------------------- #!/usr/bin/env bash
2
3611
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 20070105 (Red Hat 4.1.1-52). I used following commands to build C++ extension: # swig -c++ -python edit_distance.i # c++ -c edit_distance.c edit_distance_wrap.cxx edit_distance.cpp -I.
0
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10366
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10173
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9967
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.