* [ptxdist] ptxdist-2012.03.00 python2.6, hashlib.py, flup.py install fails ImportError: No module named _sha256
@ 2014-03-11 22:39 jdwilson
2014-03-12 8:53 ` Juergen Beisert
0 siblings, 1 reply; 4+ messages in thread
From: jdwilson @ 2014-03-11 22:39 UTC (permalink / raw)
To: ptxdist
Hello ptxdist devel group:
I'm new to this group and somewhat new to ptxdist, so I hope this is the
right list to post this issue.
I have successfully built a target image that includes python2.6 and
lighttpd which is part of ptxdist-2012.03.00. The intent was to use flup.py
to provide fastcgi, wsgi capability. (This works in my dev env, under Ubuntu
12.04 LTS, python2.7.x).
The issue below shows up when I enable the extra python module flup in
ptxdist menuconfig, under python extra modules.
My diagnostics may not be 100% correct here, but it appears to me that the
openssl is not available when being built for the target. (Note the
references to sysroot-host/lib/python2.6 to where hashlib.py is located).
If the openssl was installed, there would be a ~/ssl directory either under
/usr/lib/ssl (default per openssl.make) or some other specified file system
(e.g., /usr/local/lib/ssl) There is no ~/ssl directory on the target at
this time.
1) How does one ensure ptxdist builds and installs openssl and then ensure
that python will use the openssl module?
2) For reference, I found the patch for flup.in, python.in here:
https://bitbucket.org/bwalle/ptxdist/commits/6e48293f380f6c115bd433f8519e7f9
6e8f0f66f
I applied this patch by copying the respective .in, .make files to my
platform ~/rules directory.
This still did not solve the problem. I'm hoping someone from this group may
be able to help get around this hashlib.py issue.
Also, would it be advisable to update to ptxdist-2012.07.00 which includes
the fix for flup? Would also like to update to python2.7 as well, but not
sure the build tool supports this yet.
I also tested the target python install by importing hashlib and testing
md5(), new("md5") both work. So not sure why this build below does not wor.
Any help or guidance would be much appreciated.
The log is below.
Regards,
JD
_________________________________________________________________________
Packaged contents of /home/jdwilson/embed/phytec/bsp13.2.2/platform-phyFLEX-
i.MX6/packages/python.tmp/opkg into
/home/jdwilson/embed/phytec/bsp13.2.2/platform-phyFLEX-
i.MX6/packages/python_2.6.6_armel.ipk
done.
finished target python.targetinstall
----------------
target: flup.get
----------------
finished target flup.get
--------------------
target: flup.extract
--------------------
extract: pkg_src=bsp13.2.2/src/flup-1.0.2.tar.gz
extract: pkg_extract_dir=bsp13.2.2/platform-phyFLEX-i.MX6/build-target/flup-
1.0.2
ptxdist: error: series file for 'ptxdist-2012.03.0/patches/flup-1.0.2' is
missing
pkg_patch_dir: 'ptxdist-2012.03.0/patches/flup-1.0.2'
pkg_patch_series: '<none>'
pkg_patch_autogen: 'ptxdist-2012.03.0/patches/flup-1.0.2/autogen.sh'
patchin: autogen: running '/usr/local/lib/ptxdist-2012.03.0/patches/flup-
1.0.2/autogen.sh'
patchin: autogen: done
patchin: fixup:
patchin: fixup: done
finished target flup.extract
--------------------
target: flup.prepare
--------------------
prepare stage disabled.
finished target flup.prepare
--------------------
target: flup.compile
--------------------
finished target flup.compile
--------------------
target: flup.install
--------------------
/home/jdwilson/swdev/embed/phytec/bsp13.2.2/platform-phyFLEX-i.MX6/build-
target/flup-1.0.2/ez_setup.py:59: DeprecationWarning: the md5 module is
deprecated; use hashlib instead
except ImportError: from md5 import md5
Traceback (most recent call last):
File "setup.py", line 2, in <module>
from ez_setup import use_setuptools
File "/home/jdwilson/swdev/embed/phytec/bsp13.2.2/platform-phyFLEX-
i.MX6/build-target/flup-1.0.2/ez_setup.py", line 59, in <module>
except ImportError: from md5 import md5
File "/home/jdwilson/embed/phytec/bsp13.2.2/platform-phyFLEX-
i.MX6/sysroot-host/lib/python2.6/md5.py", line 10, in <module>
from hashlib import md5
File "/home/jdwilson/embed/phytec/bsp13.2.2/platform-phyFLEX-
i.MX6/sysroot-host/lib/python2.6/hashlib.py", line 138, in <module>
sha224 = __get_builtin_constructor('sha224')
File "/home/jdwilson/embed/phytec/bsp13.2.2/platform-phyFLEX-
i.MX6/sysroot-host/lib/python2.6/hashlib.py", line 66, in
__get_builtin_constructor
import _sha256
ImportError: No module named _sha256
make: *** [/home/jdwilson/embed/phytec/bsp13.2.2/platform-phyFLEX-
i.MX6/state/flup.install] Error 1
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] ptxdist-2012.03.00 python2.6, hashlib.py, flup.py install fails ImportError: No module named _sha256
2014-03-11 22:39 [ptxdist] ptxdist-2012.03.00 python2.6, hashlib.py, flup.py install fails ImportError: No module named _sha256 jdwilson
@ 2014-03-12 8:53 ` Juergen Beisert
2014-03-13 22:45 ` jdwilson
0 siblings, 1 reply; 4+ messages in thread
From: Juergen Beisert @ 2014-03-12 8:53 UTC (permalink / raw)
To: ptxdist; +Cc: jdwilson
Hi,
On Tuesday 11 March 2014 23:39:42 jdwilson wrote:
> [...]
> I have successfully built a target image that includes python2.6 and
> lighttpd which is part of ptxdist-2012.03.00. The intent was to use flup.py
> to provide fastcgi, wsgi capability. (This works in my dev env, under
> Ubuntu 12.04 LTS, python2.7.x).
You should try PTXdist-2014.03.0 (coming soon) for reference. Maybe your issue
is already solved. If it works, you can upgrade your project or backporting
the required changes to your older PTXdist/BSP.
> [...]
> 1) How does one ensure ptxdist builds and installs openssl and then ensure
> that python will use the openssl module?
The "select <other package nam>" in the menuconfig tells PTXdist to build this
dependency first.
Regards
Juergen
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | http://www.pengutronix.de/ |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] ptxdist-2012.03.00 python2.6, hashlib.py, flup.py install fails ImportError: No module named _sha256
2014-03-12 8:53 ` Juergen Beisert
@ 2014-03-13 22:45 ` jdwilson
2014-03-14 8:28 ` Juergen Beisert
0 siblings, 1 reply; 4+ messages in thread
From: jdwilson @ 2014-03-13 22:45 UTC (permalink / raw)
To: ptxdist
Juergen,
Thank you for the feedback.
I have figured out what the issue is. The default options to build openssl
for the *build-host* need to be set so that at least no-ssl2 is defined, and
possibly "shared". I think the latter is needed because python may be
looking for the dynamic lib. The default openssl build only produces the
static libs.
Background: In a sandbox rootfs under Linux 12.04LTS I installed openssl and
found that both _hashlib and _ssl were not included in the libcrypt.a or
ssl.a modules. After I ran through ./configure's options, I added "shared"
and "no-ssl2" to the ./configure command line, (as well as specifying my
sandbox env using --prefix). Disabling ssl2 resolves the issue/bug with
ssl2 (SSLv2_method), which can be addressed later.
Having hashlib and ssl available will keep the "from hashlib import md5"
from failing when flup.py is installed (see original posting).
Right now I'm trying to work through the ptxdist guru doc to understand how
to properly modify the host-openssl.in,.make so that I can define the
options to build the host-openssl correctly.
More specifically, I can't find documentation as to how to enable
"PTXCONF_HOST_OPENSSL" in menuconfig (other than manually editing the
ptxconfig file) and where does HOST_OPENSSL_PKG get defined? (Running grep
through ptxdist/rules only shows the host-openssl.make file).
Any help would be much appreciated.
Regards,
jd
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] ptxdist-2012.03.00 python2.6, hashlib.py, flup.py install fails ImportError: No module named _sha256
2014-03-13 22:45 ` jdwilson
@ 2014-03-14 8:28 ` Juergen Beisert
0 siblings, 0 replies; 4+ messages in thread
From: Juergen Beisert @ 2014-03-14 8:28 UTC (permalink / raw)
To: ptxdist; +Cc: jdwilson
Hi,
On Thursday 13 March 2014 23:45:30 jdwilson wrote:
> I have figured out what the issue is. The default options to build openssl
> for the *build-host* need to be set so that at least no-ssl2 is defined,
> and possibly "shared". I think the latter is needed because python may be
> looking for the dynamic lib. The default openssl build only produces the
> static libs.
>
> Background: In a sandbox rootfs under Linux 12.04LTS I installed openssl
> and found that both _hashlib and _ssl were not included in the libcrypt.a
> or ssl.a modules. After I ran through ./configure's options, I added
> "shared" and "no-ssl2" to the ./configure command line, (as well as
> specifying my sandbox env using --prefix). Disabling ssl2 resolves the
> issue/bug with ssl2 (SSLv2_method), which can be addressed later.
If you need to add the "--shared" and the "--no-ssl2" config parameter, add it
to the HOST_OPENSSL_CONF_OPT variable in "rules/host-openssl.make".
> Having hashlib and ssl available will keep the "from hashlib import md5"
> from failing when flup.py is installed (see original posting).
>
> Right now I'm trying to work through the ptxdist guru doc to understand how
> to properly modify the host-openssl.in,.make so that I can define the
> options to build the host-openssl correctly.
>
> More specifically, I can't find documentation as to how to enable
> "PTXCONF_HOST_OPENSSL" in menuconfig (other than manually editing the
> ptxconfig file)
Add it to the *.in package menu file which depends on HOST_OPENSSL
config MY_PACKAGE_WHICH_DEPENDS_ON_HOST_OPENSSL
tristate
prompt "my package which depends on host openssl"
select HOST_OPENSSL <-----------
help
friesel, frasel,....
Regards,
Juergen
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | http://www.pengutronix.de/ |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-14 8:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-11 22:39 [ptxdist] ptxdist-2012.03.00 python2.6, hashlib.py, flup.py install fails ImportError: No module named _sha256 jdwilson
2014-03-12 8:53 ` Juergen Beisert
2014-03-13 22:45 ` jdwilson
2014-03-14 8:28 ` Juergen Beisert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox