[Nix-dev] nix-env -i python-pycurl; where pycurl is modified in python-packages.nix
js at lastlog.de
js at lastlog.de
Mon May 14 09:28:31 CEST 2012
hi
==== test 1 (which fails on install) ====
pycurl =
let libcurl = pkgs.stdenv.lib.overrideDerivation pkgs.curl
(oldAttrs: {
configureFlags =
(if oldAttrs ? configureFlags then oldAttrs.configureFlags else
"" )
+ " --enable-static";
});
in
buildPythonPackage (rec {
name = "pycurl-7.18.1";
src = fetchurl {
url = "http://pycurl.sourceforge.net/download/${name}.tar.gz";
sha256 =
"37c4ad6b7b3ba78f708f49baa8b1b7086ea880eab585fec45ddcff2899c95bb9";
};
buildInputs = [ libcurl pkgs.htop ];
doCheck = false;
# postInstall = ''
# find $out -name easy-install.pth | xargs rm -v
# find $out -name 'site.py*' | xargs rm -v
# '';
meta = {
homepage = http://pycurl.sourceforge.net/;
description = "Python wrapper for libcurl";
platforms = stdenv.lib.platforms.linux;
};
});
==== result of test 1 ====
nix-env -i python-pycurl
installing `python-pycurl-7.18.1'
these derivations will be built:
/nix/store/8nff70ix0qjf7jvfcly9jw5zgmsjzzl9-stdenv-linux-boot.drv
/nix/store/ky1w7k0v62vp2yax30zwrci2ac34cfiy-bootstrap-tools.cpio.bz2.drv
/nix/store/pvvsm6gb4mvfiyzrh9dilz58r7pwqjf5-mirrors-list.drv
/nix/store/qnbiyp7g8y6jds4m98331yd4wg0lns9a-curl-7.22.0.drv
/nix/store/vjz80flg3k9smz96lvnq1d60j98zcjjq-python-pycurl-7.18.1.drv
/nix/store/vni8nh700piyqffqbyfvgiy2k5g05dpd-curl-7.22.0.tar.bz2.drv
/nix/store/wn3rvdspafvdr1jx7hjsg2qr647cxq5w-bootstrap-tools.drv
building path(s)
`/nix/store/a0agd0bl2f0wsdz9dgbnr00h1sqwq8fb-bootstrap-tools.cpio.bz2'
curl 7.19.4 (i686-pc-linux-gnulibc1) libcurl/7.19.4
Protocols: tftp ftp telnet dict http file
Features: IPv6 Largefile
downloading
/nix/store/a0agd0bl2f0wsdz9dgbnr00h1sqwq8fb-bootstrap-tools.cpio.bz2 from
http://nixos.org/tarballs/stdenv-linux/x86_64/r23302/bootstrap-tools.cpio.bz2
(at this point it waits forver, a strace shows):
write(2, " /nix/store/8nff70ix0qjf7jvfcly"..., 68
/nix/store/8nff70ix0qjf7jvfcly9jw5zgmsjzzl9-stdenv-linux-boot.drv
) = 68
write(2, " /nix/store/ky1w7k0v62vp2yax30z"..., 75
/nix/store/ky1w7k0v62vp2yax30zwrci2ac34cfiy-bootstrap-tools.cpio.bz2.drv
) = 75
write(2, " /nix/store/pvvsm6gb4mvfiyzrh9d"..., 63
/nix/store/pvvsm6gb4mvfiyzrh9dilz58r7pwqjf5-mirrors-list.drv
) = 63
write(2, " /nix/store/qnbiyp7g8y6jds4m983"..., 62
/nix/store/qnbiyp7g8y6jds4m98331yd4wg0lns9a-curl-7.22.0.drv
) = 62
write(2, " /nix/store/vjz80flg3k9smz96lvn"..., 71
/nix/store/vjz80flg3k9smz96lvnq1d60j98zcjjq-python-pycurl-7.18.1.drv
) = 71
write(2, " /nix/store/vni8nh700piyqffqbyf"..., 70
/nix/store/vni8nh700piyqffqbyfvgiy2k5g05dpd-curl-7.22.0.tar.bz2.drv
) = 70
write(2, " /nix/store/wn3rvdspafvdr1jx7hj"..., 66
/nix/store/wn3rvdspafvdr1jx7hjsg2qr647cxq5w-bootstrap-tools.drv
) = 66
write(3, "\t\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0D\0\0\0\0\0\0\0/nix/sto"..., 96)
= 96
read(3, "gmlo\0\0\0\0X\0\0\0\0\0\0\0building path(s)"..., 32768) = 104
write(2, "building path(s) `/nix/store/a0a"..., 88building path(s)
`/nix/store/a0agd0bl2f0wsdz9dgbnr00h1sqwq8fb-bootstrap-tools.cpio.bz2'
) = 88
read(3, "gmlo\0\0\0\0y\0\0\0\0\0\0\0curl 7.19.4 (i68"..., 32768) = 144
write(2, "curl 7.19.4 (i686-pc-linux-gnuli"..., 121curl 7.19.4
(i686-pc-linux-gnulibc1) libcurl/7.19.4
Protocols: tftp ftp telnet dict http file
Features: IPv6 Largefile
) = 121
read(3, "gmlo\0\0\0\0\244\0\0\0\0\0\0\0downloading /nix"..., 32768) = 184
write(2, "downloading /nix/store/a0agd0bl2"..., 164downloading
/nix/store/a0agd0bl2f0wsdz9dgbnr00h1sqwq8fb-bootstrap-tools.cpio.bz2 from
http://nixos.org/tarballs/stdenv-linux/x86_64/r23302/bootstrap-tools.cpio.bz2
) = 164
read(3,
there is a process using 100% cpu:
nixbld1 3950 98.3 0.0 428 228 ? RN 09:19 0:27 ./curl
--fail --location --max-redirs 20
http://nixos.org/tarballs/stdenv-linux/x86_64/r23302/bootstrap-tools.cpio.bz2
but nothing happens, if i write that command into a different shell it
downloads the target pretty fast, so what is going on here?
==== test 1b ( some minor modifications to the expression ) ====
# let libcurl = pkgs.stdenv.lib.overrideDerivation pkgs.curl
# (oldAttrs: {
# configureFlags =
# (if oldAttrs ? configureFlags then oldAttrs.configureFlags else
"" )
# + " --enable-static";
# });
# in
and later i use pkgs.curl instead of libcurl it
==== result of test 1b ====
nix-env -i python-pycurl
installing `python-pycurl-7.18.1'
these derivations will be built:
/nix/store/gxgm0ywrrwrhcjmfkghxv0j8q12acqy4-python-pycurl-7.18.1.drv
building path(s)
`/nix/store/wvlvsal9rmrvfmlfjk6jf6d0sj30db5z-python-pycurl-7.18.1'
building /nix/store/wvlvsal9rmrvfmlfjk6jf6d0sj30db5z-python-pycurl-7.18.1
unpacking sources
unpacking source archive
/nix/store/bvb435x79pfw2d9nvzbhkf6g79bckmxf-pycurl-7.18.1.tar.gz
source root is pycurl-7.18.1
patching sources
configuring
no configure script, doing nothing
building
installing
installing `pycurl-7.18.1' with `easy_install'...
Creating
/nix/store/wvlvsal9rmrvfmlfjk6jf6d0sj30db5z-python-pycurl-7.18.1/lib/python2.7/site-packages/site.py
Processing .
Running setup.py -q bdist_egg --dist-dir
/tmp/nix-build-gxgm0ywrrwrhcjmfkghxv0j8q12acqy4-python-pycurl-7.18.1.drv-0/pycurl-7.18.1/egg-dist-tmp-d6_XaF
src/pycurl.c: In function 'multi_socket_callback':
src/pycurl.c:2234:9: warning: variable 'ret' set but not used
[-Wunused-but-set-variable]
src/pycurl.c:2238:11: warning: call to '_curl_easy_getinfo_err_string'
declared with attribute warning: curl_easy_getinfo expects a pointer to
char * for this info [enabled by default]
In function 'util_curl_unsetopt',
inlined from 'do_curl_unsetopt' at src/pycurl.c:1455:5:
src/pycurl.c:1380:9: warning: call to '_curl_easy_setopt_err_CURLSH'
declared with attribute warning: curl_easy_setopt expects a CURLSH*
argument for this option [enabled by default]
src/pycurl.c: In function 'do_multi_info_read':
src/pycurl.c:2693:15: warning: call to '_curl_easy_getinfo_err_string'
declared with attribute warning: curl_easy_getinfo expects a pointer to
char * for this info [enabled by default]
gcc: error:
/nix/store/ca2cpzaan3mm280z1ka5cqf78yk7qp6h-curl-7.22.0/lib/libcurl.a: No
such file or directory
Using curl-config (libcurl 7.22.0)
error: Setup script exited with error: command 'gcc' failed with exit
status 1
builder for
`/nix/store/gxgm0ywrrwrhcjmfkghxv0j8q12acqy4-python-pycurl-7.18.1.drv'
failed with exit code 1
error: build of
`/nix/store/gxgm0ywrrwrhcjmfkghxv0j8q12acqy4-python-pycurl-7.18.1.drv'
failed
==== what i have tried ====
i installed 'nix-env -i python-pylint' and even though it uses source
deployment it works, except that all the urls of the required dependencies
are now not working anymore. so i conclude source deployment for python
packages works.
==== my ideas ====
# some related problems:
# - this installer does not create a 'easy-install.pth' or similar .pth
file
# therefore urlgrabber can't find the pycurl library although it is in
the PATH and
# the egg file is there (the egg file isn't recognized, except when
extending the
# PATH manually with the "/path/+egg" file directly)
# - the curl build system has a bug, therefore curl references a
libcur.a library
# which is never built! see discussion
http://curl.haxx.se/mail/curlpython-2009-10/index.html#1
# building pycurl on Snow Leopard
# - http://curl.haxx.se/mail/curlpython-2009-04/0002.html
# see the pyc-719-setup.patch patch
==== what i need ====
how should we continue here? curl must not assume there is a libcurl.a
while that file isn't even built.
- i think this is a bug and needs fixing.
- second: why does the process stall at 'result of test 1'?
in order to finish my work with packaging virt-manager i need some
feedback of those who packaged libcurl.
- what does this code mean:
pycurl =
let libcurl = pkgs.stdenv.lib.overrideDerivation pkgs.curl
(oldAttrs: {
configureFlags =
(if oldAttrs ? configureFlags then oldAttrs.configureFlags else
"" )
+ " --enable-static";
});
in
i mean why is it there at all?
best regards,
qknight
More information about the nix-dev
mailing list