473,813 Members | 3,851 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

compile pycrypto on windows

Hi

I'm trying to compile pycrypto on windows. I've installed mingw and try to
run the command 'python setup.py build -c mingw32 install' and I get this
error:

$ python setup.py build -c mingw32 install
running build
running build_py
creating build
creating build\lib.win32-2.3
creating build\lib.win32-2.3\Crypto
copying .\test.py -> build\lib.win32-2.3\Crypto
copying .\__init__.py -> build\lib.win32-2.3\Crypto
creating build\lib.win32-2.3\Crypto\Hash
copying .\Hash\HMAC.py -> build\lib.win32-2.3\Crypto\Hash
copying .\Hash\MD5.py -> build\lib.win32-2.3\Crypto\Hash
copying .\Hash\SHA.py -> build\lib.win32-2.3\Crypto\Hash
copying .\Hash\__init__ .py -> build\lib.win32-2.3\Crypto\Hash
creating build\lib.win32-2.3\Crypto\Ciph er
copying .\Cipher\__init __.py -> build\lib.win32-2.3\Crypto\Ciph er
creating build\lib.win32-2.3\Crypto\Util
copying .\Util\number.p y -> build\lib.win32-2.3\Crypto\Util
copying .\Util\randpool .py -> build\lib.win32-2.3\Crypto\Util
copying .\Util\RFC1751. py -> build\lib.win32-2.3\Crypto\Util
copying .\Util\test.py -> build\lib.win32-2.3\Crypto\Util
copying .\Util\__init__ .py -> build\lib.win32-2.3\Crypto\Util
creating build\lib.win32-2.3\Crypto\Prot ocol
copying .\Protocol\AllO rNothing.py -> build\lib.win32-2.3\Crypto\Prot ocol
copying .\Protocol\Chaf fing.py -> build\lib.win32-2.3\Crypto\Prot ocol
copying .\Protocol\__in it__.py -> build\lib.win32-2.3\Crypto\Prot ocol
creating build\lib.win32-2.3\Crypto\Publ icKey
copying .\PublicKey\DSA .py -> build\lib.win32-2.3\Crypto\Publ icKey
copying .\PublicKey\ElG amal.py -> build\lib.win32-2.3\Crypto\Publ icKey
copying .\PublicKey\pub key.py -> build\lib.win32-2.3\Crypto\Publ icKey
copying .\PublicKey\qNE W.py -> build\lib.win32-2.3\Crypto\Publ icKey
copying .\PublicKey\RSA .py -> build\lib.win32-2.3\Crypto\Publ icKey
copying .\PublicKey\__i nit__.py -> build\lib.win32-2.3\Crypto\Publ icKey
running build_ext
building 'Crypto.Hash.MD 2' extension
creating build\temp.win3 2-2.3
creating build\temp.win3 2-2.3\Release
creating build\temp.win3 2-2.3\Release\src
c:\mingw\bin\gc c.exe -mno-cygwin -mdll -O -Wall -Isrc/ -Ic:\Python23\in clude
-Ic:\Python23\PC -c src/MD2.c -o build\temp.win3 2-2.3\Release\src \md2.o
writing build\temp.win3 2-2.3\Release\src \MD2.def
c:\mingw\bin\gc c.exe -mno-cygwin -shared -s build\temp.win3 2-2.3\Release\sr
\md2/o build\temp.win3 2-2.3\Release\src \MD2.def -Lc:\Python23\li bs -Lc
\Python23\PCBui ld -lpython23 -o build\lib.win32-2.3\Crypto\Hash \MD2.pyd
build\temp.win3 2-2.3\Release\src \md2.o(.text+0x 3e3):MD2.c: undefined
reference to `_imp___Py_None Struct'
build\temp.win3 2-2.3\Release\src \md2.o(.text+0x 3eb):MD2.c: undefined
reference to `_imp___Py_None Struct'
build\temp.win3 2-2.3\Release\src \md2.o(.text+0x 53c):MD2.c: undefined
reference to `_imp__PyType_T ype'
---

can someone please help?

thanx
--
Haim
Jul 18 '05 #1
2 7759
Haim Ashkenazi <ha**@babysnake s.org> writes:
Hi

I'm trying to compile pycrypto on windows. I've installed mingw and try to
run the command 'python setup.py build -c mingw32 install' and I get this
error:

$ python setup.py build -c mingw32 install
running build
running build_py [snip] c:\mingw\bin\gc c.exe -mno-cygwin -shared -s build\temp.win3 2-2.3\Release\sr
\md2/o build\temp.win3 2-2.3\Release\src \MD2.def -Lc:\Python23\li bs -Lc
\Python23\PCBui ld -lpython23 -o build\lib.win32-2.3\Crypto\Hash \MD2.pyd
build\temp.win3 2-2.3\Release\src \md2.o(.text+0x 3e3):MD2.c: undefined
reference to `_imp___Py_None Struct'
build\temp.win3 2-2.3\Release\src \md2.o(.text+0x 3eb):MD2.c: undefined
reference to `_imp___Py_None Struct'
build\temp.win3 2-2.3\Release\src \md2.o(.text+0x 53c):MD2.c: undefined
reference to `_imp__PyType_T ype'
---

can someone please help?
Did you create libpythonXX.a ?
http://sebsauvage.net/python/mingw.html describes how to do that.

thanx
--
Haim


--
brainbot technologies ag
boppstrasse 64 . 55118 mainz . germany
fon +49 6131 211639-1 . fax +49 6131 211639-2
http://brainbot.com/ mailto:ra**@bra inbot.com
Jul 18 '05 #2
ra**@brainbot.c om wrote:
Haim Ashkenazi <ha**@babysnake s.org> writes:
Hi

I'm trying to compile pycrypto on windows. I've installed mingw and try
to run the command 'python setup.py build -c mingw32 install' and I get
this error:

$ python setup.py build -c mingw32 install
running build
running build_py

[snip]
c:\mingw\bin\gc c.exe -mno-cygwin -shared -s
build\temp.win3 2-2.3\Release\sr \md2/o
build\temp.win3 2-2.3\Release\src \MD2.def -Lc:\Python23\li bs -Lc
\Python23\PCBui ld -lpython23 -o build\lib.win32-2.3\Crypto\Hash \MD2.pyd
build\temp.win3 2-2.3\Release\src \md2.o(.text+0x 3e3):MD2.c: undefined
reference to `_imp___Py_None Struct'
build\temp.win3 2-2.3\Release\src \md2.o(.text+0x 3eb):MD2.c: undefined
reference to `_imp___Py_None Struct'
build\temp.win3 2-2.3\Release\src \md2.o(.text+0x 53c):MD2.c: undefined
reference to `_imp__PyType_T ype' ---

can someone please help?


Did you create libpythonXX.a ?
http://sebsauvage.net/python/mingw.html describes how to do that.

thanx, that solved it.

Bye
--
Haim
Jul 18 '05 #3

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

Similar topics

2
7023
by: Carmine Noviello | last post by:
Hi, I want to say first of all that I'm totally a newbie in cryptography world. Is there someone can show me a simple example on how to use PyCrypto lib and RSA to encrypt large text file? I'm trying to do it in this way. First of all I split the text file in sub parts each one of key.size() // 8 size. Then I encrypt using RSA PublicKey algorithm and store each line in a target file. This is the pseudo-code: size = len(plaintext) bits...
0
2049
by: Fuzzyman | last post by:
The location of the prebuilt windows installer for PyCypto 2.0 (for python 2.4) has changed. Apologies for any confusion, this is because of a website reorganisation at Voidspace. The new location is : http://www.voidspace.org.uk/python/modules.shtml#pycrypto There is also a prebuilt windows installer for psyco 1.4 (for python 2.4). This is because there isn't yet a prebuilt binary available from sourceforge.
11
3039
by: dirvine | last post by:
Does anyone know if pycrypto is active at all. I have been browsing groups etc. for some info and have found entries from 2003 (latest) regarding some bits I was looking for in particular reference to symmetrical encoding (AES) and auto padding and supply or not of iv to set up method i.e from Crypto.Cipher import AES from Crypto.Hash import SHA256 import random import zlib
13
11382
by: luca72 | last post by:
Hello I have to make an easy operation but reading the pycrypto doc. a never see AES example I have to cript this key 'ea523a664dabaa4476d31226a1e3bab0' with the AES. Can you help me for make it with pycrypto Regards Luca
2
3650
by: Ning | last post by:
I'm trying to write an IM client which sends encrypted messages to the server. I tried to use pycrypto library, but when I came to 3DES cypher I was confused about the keysize to use. In the standard it said that it should be either 112 bits or 168 bits, whereas it's 16 bytes or 24 bytes in pycrypto. If I use 16 bytes key to encrypt and send this key to the server which is expecting a 112 bits key, there'll be a problem. How I should...
3
4317
by: mirandacascade | last post by:
Operating system: Win XP Vsn of Python: 2.4 Situation is this: Required to calcluate a message digest. The process for calcluating the digest must use an SHA-256 algorithm. Questions: 1) Is it correct that the sha module comes with python 2.4? 2) Is it correct that the sha module that ships with python 2.4 does NOT have the SHA-256 capability as part of the module?
5
12520
by: mirandacascade | last post by:
Attempting to determine whether the PyCrypto package has the capability to perform AES256 encryption. I received the following C# snippet: CryptoProvider provider = new CryptoProvider(); Encrypted_Type password = new Encrypted_Type(); password.EncryptedData = new EncryptedDataType(); password.EncryptedData.EncryptionMethod = new EncryptionMethodType(); password.EncryptedData.EncryptionMethod.Algorithm = "AES256-cbc"; and I was told...
0
2312
by: yaipa | last post by:
I snipped this bit of code out of Andrew Kuchling 'pyCrypto' test fixture. Having a need to XOR Binascii Hex strings in my current project, I found it very helpful to cut down on a bit of code clutter. So if you have a need for a Crypto module, this one seems to work off the self without much effort and it comes /w a nice XOR function too boot. :-) PyCrypto can be found at: http://www.amk.ca/python/code/crypto
1
6563
by: cokofreedom | last post by:
I am really stuck presently, trying to install these on my Windows XP. I have downloaded easy_install and it is now in Python25\Scripts but none of the commands I have read in either program folder have worked to install them. I was hoping someone could give me a step by step guide to installing these so I can use paramiko to perform SSH. Or at least point me in the right direction... Thanks
0
9734
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
9607
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
10669
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
10140
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...
0
9224
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7684
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
5569
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3885
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3030
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.