[python-win32] Building Python-2.7.6 for 64bit Windows

Tim Roberts timr at probo.com
Mon Feb 3 20:44:31 CET 2014


Bharath Ramesh wrote:
> I am not sure if I am correct in describing what is possibly
> happening. I have OpenSSL statically compiled with Python v0.9.8. I
> have another third party library that uses another version of OpenSSL
> 1.0.1, linked dynamically. My application is dynamically linked with
> the same version of OpenSSL as the third party library. During the
> execution of my application. I load Python to run some code and that
> code then tries to interact with the third party library linked
> dynamically. Would newer version of OpenSSL DLL be loaded or would it
> be satisfied with the version of OpenSSL statically loaded.

The Python ssl module will always use its statically linked library.  It
doesn't care which dynamic libraries are loaded -- the external
references it needs were already satisfied at link time.


> I discussed the issue you had raised with our team, but the consensus
> was to go ahead and build Python with a newer version of OpenSSL. So I
> would still need help in building OpenSSL. I have managed to build
> Python on windows now as standalone without using our build system. I
> see numerous warnings during this time basically issues with size
> mismatch like:
> ..\Python\Python-ast.c(3348) : warning C4244: 'function' : conversion
> from 'Py_ssize_t' to 'int', possible loss of data
>
> Is there anyway these warning could be fixed without modifying the
> code. I am using the vsbuild to build python using pcbuild.sln file. I
> am building it for 64 bit windows. I dont see these errors on the
> 32bit build.

Right, because size_t and int are the same size in a 32-bit build.  And
on Linux, size_t and int are also the same size in a 64-bit build.  But
on Windows, in 64-bit land, size_t is 64 bits and int is 32 bits.  The
warnings can't be fixed without either modifying the code, or switching
to a gcc compiler.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list