Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #2346

Re: py 2.7.1 & openssl

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <nirina.raseliarison@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'flags': 0.05; 'python:': 0.05; 'python': 0.07; 'backslash': 0.09; 'extension.': 0.09; 'libraries.': 0.09; 'setup.py': 0.09; 'x86_64': 0.09; 'files.': 0.10; 'binary': 0.14; 'extension': 0.14; 'wrote:': 0.14; '2>&1': 0.16; '_ssl': 0.16; 'earlier.': 0.16; 'flag,': 0.16; 'install,': 0.16; 'openssl': 0.16; 'post:': 0.16; 'rhel': 0.16; 'root,': 0.16; 'shared.': 0.16; 'sudo': 0.16; 'zlib': 0.16; 'libraries': 0.16; 'static': 0.16; 'suggest': 0.19; 'modules': 0.20; 'cc:2**0': 0.20; '(or': 0.22; 'header:In-Reply-To:1': 0.22; "aren't": 0.22; 'e.g.': 0.22; 'directory.': 0.23; 'location,': 0.23; 'smart': 0.23; 'wrote': 0.25; 'detect': 0.25; 'point,': 0.25; 'specify': 0.25; 'received:209.85.161.46': 0.26; 'received:mail- fx0-f46.google.com': 0.26; 'instead': 0.26; 'pass': 0.27; "doesn't": 0.28; 'looks': 0.28; 'shared': 0.29; 'skip:p 30': 0.29; 'installed': 0.29; 'received:209.85.161': 0.29; 'hi,': 0.29; 'user.': 0.29; 'yet': 0.30; 'list': 0.30; 'cc:addr:gmail.com': 0.31; 'charset:iso-8859-15': 0.31; 'compiling': 0.31; 'enabled': 0.31; 'all,': 0.31; 'skip:- 30': 0.32; 'to:addr:python-list': 0.32; '...': 0.32; 'headers': 0.33; 'created': 0.33; 'reset': 0.33; 'uses': 0.34; 'using': 0.34; 'change': 0.34; 'there': 0.35; 'file': 0.35; 'files,': 0.35; 'header:User-Agent:1': 0.35; 'compilation': 0.35; 'ssl': 0.35; 'try:': 0.35; 'usually': 0.36; 'think': 0.36; 'enough': 0.37; 'some': 0.37; 'skip:o 20': 0.37; 'received:209.85': 0.37; 'skip:- 10': 0.37; 'received:google.com': 0.38; 'install': 0.38; 'but': 0.38; 'files': 0.38; 'them,': 0.38; 'used': 0.38; 'log': 0.38; 'unless': 0.38; 'under': 0.39; 'to:addr:python.org': 0.39; 'where': 0.39; 'received:209': 0.39; 'empty': 0.40; 'include': 0.40; 'header:Received:5': 0.40; 'simple': 0.60; 'received:196': 0.61; 'subject: & ': 0.61; 'order': 0.61; 'and,': 0.63; 'play': 0.64; './configure': 0.84; '2.7.1': 0.84; 'step.': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:content-type:cc:in-reply-to:references:subject :to:from:date:mime-version:content-transfer-encoding:message-id :user-agent; bh=v53/raBGEBDN84zaXoDH5D3655ZjH26zbVRuoPbCuso=; b=J4b5x19HX2LUv2KirjL8Lhrj0AKQKpNoxKVAkgIPEZSrUgrOdw+jptieU/KRZQQRJ/ Gv1YM8rzrpVzCtgif9+t1oGIaMXo/EZyL4OHexLpYkdKLYFH5ZCVGjB1Q65bjCUGEH/n i3OIDep4+3RUlR1nZMXBrUX9MR+s6x/WrLprw=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:cc:in-reply-to:references:subject:to:from:date :mime-version:content-transfer-encoding:message-id:user-agent; b=jnYIJ935GNYhgDZkXK5ajyQW0HxbIbjkG4NPw3tNqORyWKezObnw9aEeUaDv19B83k 28/hH7+TnndDRNgGFs4BqRPEE6pRuS8rKKcWA6w1zUyHvpiA7yjwdgkKbUgzCAEe1dHM pPIvIjVCZDEn8wfWoY3/MmsRiXuMnwiuVMooc=
Content-Type text/plain; charset=iso-8859-15; format=flowed; delsp=yes
In-Reply-To <6ab0c9c7-b9da-4a7a-a146-d84172e67936@l2g2000prg.googlegroups.com>
References <mailman.27.1301557619.2990.python-list@python.org> <84bb4467-97dd-4ed6-a2a0-dcbaf6904746@r4g2000prm.googlegroups.com> <mailman.51.1301611416.2990.python-list@python.org> <6ab0c9c7-b9da-4a7a-a146-d84172e67936@l2g2000prg.googlegroups.com>
Subject Re: py 2.7.1 & openssl
To python-list@python.org
From nirinA <nirina.raseliarison@gmail.com>
Date Fri, 01 Apr 2011 15:35:36 +0300
MIME-Version 1.0
Content-Transfer-Encoding 7bit
User-Agent Opera Mail/11.01 (Win32)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.71.1301661333.2990.python-list@python.org> (permalink)
Lines 112
NNTP-Posting-Host 82.94.164.166
X-Trace 1301661333 news.xs4all.nl 41117 [::ffff:82.94.164.166]:38802
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:2346

Show key headers only | View raw


hi,

> Yes, _md5 is enabled but I get a very long list under
>  Failed to build these modules:
> ... list of mostly all extension modules ...
> This list was empty earlier.

at some point, the compilation failed to detect
needed headers or libraries files.
i suggest you to try something simple in order to
see  what is wrong in the compilation step.

first, when compiling openssl.
your wrote in original post:

> I installed openssl-1.0.0d.tar.gz on my RHEL 5 box using:
>         ./config --prefix=/usr/local --openssldir=/usr/local/openssl
> shared zlib
>         make
>         sudo make install

just try:

	./config
	make
	make install

and nothing else.
do su root, when you install, not sudo.
don't use any --prefix=xxx nor --openssldir=xxx.
use the default location, that is /usr/local/ssl
as this is the location where Python looks for
ssl headers and libraries.
don't use shared. Python uses static libraries and
as far as i can tell, shared libraries are not
supported yet on x86_64 platform.
with openssl-1.0.0d, i think you don't even need
to specify the -fPIC flag, but using it doesn't hurt.

you also wrote:

> And, the following files are created in /usr/local/lib64:
> libssl.a, libssl.so, libcrypto.a, libcrypto.so.  Also, the binary
> openssl is created in the bin directory.

these files aren't used at all, unless you change the setup.py
file to build _ssl extension.
i repeat: Python uses /usr/local/ssl directory
(or /usr/contrib/ssl/) to look for ssl headers and libraries.

secondly, when compiling Python:

> Then I installed python 2.7.1 using
>         PYHOME=/usr/local/Python-2.7.1; export PYHOME
>         LD_RUN_PATH=$PYHOME/lib; export LD_RUN_PATH
>         LDFLAGS="-L /usr/local/lib64 -L /usr/local/lib"; export
> LDFLAGS
>         CPPFLAGS="-I /usr/local/include -I /usr/local/include/
> openssl"; export CPPFLAGS
>         ./configure --enable-shared --prefix=$PYHOME > log_cfg 2>&1
>         make > log_mk 2>&1
>         sudo make install > log_mk_i 2>&1

try something simple instead of these messy configurations!
just try:

	./configure
	make
	make install

if you want to install Python in a specific directory,
e.g. /usr/local/Python-2.7.1 , use:

	make install DESTDIR=/usr/local/Python-2.7.1

and then, you play with:

	export LD_LIBRARY_PATH=/usr/local/Python-2.7.1/lib
	/usr/local/Python-2.7.1/bin/python

if you really want to specify some libraries and include files,
but usually you don't, Python is smart enough to find them,
don't use :

>  LDFLAGS="-L /usr/local/lib64 -L /usr/local/lib"; export
> LDFLAGS
>  CPPFLAGS="-I /usr/local/include -I /usr/local/include/
> openssl"; export CPPFLAGS

pass them in the configuration line instead:

	CPPFLAGS="-I/usr/local/include/openssl" \
	LDFLAGS="-L/usr/local/lib64" \
	./configure

notice that there is no space between
the -I or -L and the directory name.
and the backslash to continue long line.

finally, don't use sudo.
try to log as root if possible.
may be you cannot access some
files needed for compilation
as a simple user.
and some LD*** and CPP*** flags
are reset when you use sudo.

hope this helps

nirinA
--
Simple is better than complex.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re:py 2.7.1 & openssl nirinA raseliarison <nirina.raseliarison@gmail.com> - 2011-03-31 00:46 -0700
  Re: py 2.7.1 & openssl V N <vijay.nori@gmail.com> - 2011-03-31 10:51 -0700
    Re: py 2.7.1 & openssl nirinA <nirina.raseliarison@gmail.com> - 2011-04-01 01:43 +0300
      Re: py 2.7.1 & openssl V N <vijay.nori@gmail.com> - 2011-03-31 16:42 -0700
        Re: py 2.7.1 & openssl nirinA <nirina.raseliarison@gmail.com> - 2011-04-01 15:35 +0300
          Re: py 2.7.1 & openssl V N <vijay.nori@gmail.com> - 2011-04-01 10:03 -0700
            Re: py 2.7.1 & openssl nirinA raseliarison <nirina.raseliarison@gmail.com> - 2011-04-02 10:44 +0300

csiph-web