unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* import pypi: undefined symbol __gmpn_cnd_sub_n
@ 2015-03-25 12:25 Alexandre Héaumé
  2015-03-25 16:41 ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Héaumé @ 2015-03-25 12:25 UTC (permalink / raw)
  To: guix-devel

Hello friends,

Running "guix import pypi" always produces the same error on my machine:
$ guix import pypi whatever
starting download of `/tmp/guix-file.…' from
`https://pypi.python.org/pypi/whatever/json'
/usr/bin/guile: symbol lookup error:
/gnu/store/…-nettle-2.7.1/lib/libhogweed.so.2: undefined symbol:
__gmpn_cnd_sub_n

Do you mind helping me with this?

Cheers,
Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: import pypi: undefined symbol __gmpn_cnd_sub_n
  2015-03-25 12:25 import pypi: undefined symbol __gmpn_cnd_sub_n Alexandre Héaumé
@ 2015-03-25 16:41 ` Ludovic Courtès
  2015-03-25 18:05   ` Alexandre Héaumé
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2015-03-25 16:41 UTC (permalink / raw)
  To: Alexandre Héaumé; +Cc: guix-devel

Alexandre Héaumé <aheaume@gmail.com> skribis:

> Running "guix import pypi" always produces the same error on my machine:
> $ guix import pypi whatever
> starting download of `/tmp/guix-file.…' from
> `https://pypi.python.org/pypi/whatever/json'
> /usr/bin/guile: symbol lookup error:
> /gnu/store/…-nettle-2.7.1/lib/libhogweed.so.2: undefined symbol:
> __gmpn_cnd_sub_n

It’s unclear to me how libhogweed.so gets loaded (nothing here depends
on Nettle, AFAIK.)  But it looks like the problem is that /usr/bin/guile
(which comes from the host distro) is trying to dlopen stuff that is
built with Guix.  This usually won’t work notably because that would try
to load different copies of libc.so, libgmp.so, etc.

Could you check if /usr/bin/guile actually works?  If it does, could you
run, from Guix’s top-level build tree:

  ./pre-inst-env guile -c '(use-modules (json) (guix pk-crypto))'

and report back?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: import pypi: undefined symbol __gmpn_cnd_sub_n
  2015-03-25 16:41 ` Ludovic Courtès
@ 2015-03-25 18:05   ` Alexandre Héaumé
  2015-03-25 20:42     ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Héaumé @ 2015-03-25 18:05 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès <ludo@gnu.org> wrote:

> It’s unclear to me how libhogweed.so gets loaded (nothing here depends
> on Nettle, AFAIK.)  But it looks like the problem is that /usr/bin/guile
> (which comes from the host distro) is trying to dlopen stuff that is
> built with Guix.  This usually won’t work notably because that would try
> to load different copies of libc.so, libgmp.so, etc.

Makes sense. The guile-gnutls package in ubuntu depends on libhogweed,
so that's where it comes from.
Is it possible that the guile-gnutls bindings from guix are chosen
over the host bindings, or something along these lines?

> If it does, could you run, from Guix’s top-level build tree:
>
>   ./pre-inst-env guile -c '(use-modules (json) (guix pk-crypto))'

Backtrace:
In ice-9/boot-9.scm:
  63: 19 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 18 [eval # #]
In unknown file:
   ?: 17 [call-with-input-string "(use-modules (json) (guix pk-crypto))" ...]
In ice-9/command-line.scm:
 180: 16 [#<procedure 860f8d0 at ice-9/command-line.scm:175:6 (port)>
#<input: string 84cbc30>]
In unknown file:
   ?: 15 [eval (use-modules # #) #<directory # 858e630>]
In ice-9/eval.scm:
 505: 14 [#<procedure 84fa440 at ice-9/eval.scm:499:4 (exp)> (use-modules # #)]
In ice-9/psyntax.scm:
1106: 13 [expand-top-sequence ((use-modules (json) (guix pk-crypto))) () ...]
 989: 12 [scan ((use-modules (json) (guix pk-crypto))) () ...]
 279: 11 [scan ((# #) #(syntax-object *unspecified* # #)) () (()) ...]
In ice-9/boot-9.scm:
3597: 10 [process-use-modules (((json)) ((guix pk-crypto)))]
 700: 9 [map #<procedure 85a9590 at ice-9/boot-9.scm:3597:25
(mif-args)> ((#) (#))]
3598: 8 [#<procedure 85a9590 at ice-9/boot-9.scm:3597:25 (mif-args)> (#)]
2864: 7 [resolve-interface (guix pk-crypto) #:select ...]
2789: 6 [#<procedure 85a1220 at ice-9/boot-9.scm:2777:4 (name
#:optional autoload version #:key ensure)> # ...]
3065: 5 [try-module-autoload (guix pk-crypto) #f]
2401: 4 [save-module-excursion #<procedure 84982e8 at
ice-9/boot-9.scm:3066:17 ()>]
3085: 3 [#<procedure 84982e8 at ice-9/boot-9.scm:3066:17 ()>]
In unknown file:
   ?: 2 [primitive-load-path "guix/pk-crypto" ...]
In guix/pk-crypto.scm:
  85: 1 [#<procedure 868f320 ()>]
In unknown file:
   ?: 0 [dynamic-link "libgcrypt"]

ERROR: In procedure dynamic-link:
ERROR: In procedure dynamic-link: file: "libgcrypt", message: "file not found"

Thanks,
Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: import pypi: undefined symbol __gmpn_cnd_sub_n
  2015-03-25 18:05   ` Alexandre Héaumé
@ 2015-03-25 20:42     ` Ludovic Courtès
  2015-03-25 22:22       ` Alexandre Héaumé
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2015-03-25 20:42 UTC (permalink / raw)
  To: Alexandre Héaumé; +Cc: guix-devel

Alexandre Héaumé <aheaume@gmail.com> skribis:

> Ludovic Courtès <ludo@gnu.org> wrote:
>
>> It’s unclear to me how libhogweed.so gets loaded (nothing here depends
>> on Nettle, AFAIK.)  But it looks like the problem is that /usr/bin/guile
>> (which comes from the host distro) is trying to dlopen stuff that is
>> built with Guix.  This usually won’t work notably because that would try
>> to load different copies of libc.so, libgmp.so, etc.
>
> Makes sense. The guile-gnutls package in ubuntu depends on libhogweed,
> so that's where it comes from.

Oh right, I forgot this one.

> Is it possible that the guile-gnutls bindings from guix are chosen
> over the host bindings, or something along these lines?

Yes, it seems to be the case.  When using Guile from the host distro,
you must use guile-gnutls from the host distro as well.

>> If it does, could you run, from Guix’s top-level build tree:
>>
>>   ./pre-inst-env guile -c '(use-modules (json) (guix pk-crypto))'

[...]

> ERROR: In procedure dynamic-link:
> ERROR: In procedure dynamic-link: file: "libgcrypt", message: "file not found"

Weird, did ./configure even pass?  You can run:

  ./configure --with-libgcrypt-prefix=/usr/whatever/

to make sure it picks libgcrypt.so from the host distro.

HTH,
Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: import pypi: undefined symbol __gmpn_cnd_sub_n
  2015-03-25 20:42     ` Ludovic Courtès
@ 2015-03-25 22:22       ` Alexandre Héaumé
  2015-03-26 12:35         ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Héaumé @ 2015-03-25 22:22 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Wed, Mar 25, 2015 at 9:42 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>
> Weird, did ./configure even pass?  You can run:
>
>   ./configure --with-libgcrypt-prefix=/usr/whatever/
>
> to make sure it picks libgcrypt.so from the host distro.

As far as I remember, ./configure passed. Everything I tried so far
worked except "import pypi".

I can't find a way to make it work with "--with-libgcrypt-prefix".
On the host, libgcrypt is at "/usr/lib/i386-linux-gnu/libgcrypt.so"
according to locate, running

  ./configure --with-libgcrypt-prefix='/usr/lib/i386-linux-gnu'

fails at

  checking for libgcrypt shared library name...
/usr/lib/i386-linux-gnu/lib/libgcrypt
  [...]

Obviously I'm doing something wrong or it makes wrong assumptions
about the path.

As it been tried on ubuntu before, and is it worth fixing? I was
planning on using a spare machine to install GuixSD anyway, it might
not be worth the effort if compiling and using guix on ubuntu is a
weird thing to do.

Thanks,
Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: import pypi: undefined symbol __gmpn_cnd_sub_n
  2015-03-25 22:22       ` Alexandre Héaumé
@ 2015-03-26 12:35         ` Ludovic Courtès
  2015-03-27 18:54           ` Mark H Weaver
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2015-03-26 12:35 UTC (permalink / raw)
  To: Alexandre Héaumé; +Cc: guix-devel

Alexandre Héaumé <aheaume@gmail.com> skribis:

> On Wed, Mar 25, 2015 at 9:42 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>>
>> Weird, did ./configure even pass?  You can run:
>>
>>   ./configure --with-libgcrypt-prefix=/usr/whatever/
>>
>> to make sure it picks libgcrypt.so from the host distro.
>
> As far as I remember, ./configure passed. Everything I tried so far
> worked except "import pypi".
>
> I can't find a way to make it work with "--with-libgcrypt-prefix".
> On the host, libgcrypt is at "/usr/lib/i386-linux-gnu/libgcrypt.so"
> according to locate, running
>
>   ./configure --with-libgcrypt-prefix='/usr/lib/i386-linux-gnu'

Rather:

  ./configure --with-libgcrypt-libdir='/usr/lib/i386-linux-gnu'

> As it been tried on ubuntu before, and is it worth fixing? I was
> planning on using a spare machine to install GuixSD anyway, it might
> not be worth the effort if compiling and using guix on ubuntu is a
> weird thing to do.

Many people on this list use Guix on top of a Debian derivative or
similar, so no, it’s not a weird thing to do.

HTH,
Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: import pypi: undefined symbol __gmpn_cnd_sub_n
  2015-03-26 12:35         ` Ludovic Courtès
@ 2015-03-27 18:54           ` Mark H Weaver
  0 siblings, 0 replies; 7+ messages in thread
From: Mark H Weaver @ 2015-03-27 18:54 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> Alexandre Héaumé <aheaume@gmail.com> skribis:
>
>> On Wed, Mar 25, 2015 at 9:42 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>>>
>>> Weird, did ./configure even pass?  You can run:
>>>
>>>   ./configure --with-libgcrypt-prefix=/usr/whatever/
>>>
>>> to make sure it picks libgcrypt.so from the host distro.
>>
>> As far as I remember, ./configure passed. Everything I tried so far
>> worked except "import pypi".
>>
>> I can't find a way to make it work with "--with-libgcrypt-prefix".
>> On the host, libgcrypt is at "/usr/lib/i386-linux-gnu/libgcrypt.so"
>> according to locate, running
>>
>>   ./configure --with-libgcrypt-prefix='/usr/lib/i386-linux-gnu'
>
> Rather:
>
>   ./configure --with-libgcrypt-libdir='/usr/lib/i386-linux-gnu'
>
>> As it been tried on ubuntu before, and is it worth fixing? I was
>> planning on using a spare machine to install GuixSD anyway, it might
>> not be worth the effort if compiling and using guix on ubuntu is a
>> weird thing to do.
>
> Many people on this list use Guix on top of a Debian derivative or
> similar, so no, it’s not a weird thing to do.

FWIW, as I recall I didn't have to pass any --with-libgcrypt-* options
to configure to build Guix on Debian wheezy, once I had the right
packages installed.

If it's not working, config.log should have the details of what went
wrong.  If you post the relevant section of config.log I could take a
look.

      Mark

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-03-27 18:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-25 12:25 import pypi: undefined symbol __gmpn_cnd_sub_n Alexandre Héaumé
2015-03-25 16:41 ` Ludovic Courtès
2015-03-25 18:05   ` Alexandre Héaumé
2015-03-25 20:42     ` Ludovic Courtès
2015-03-25 22:22       ` Alexandre Héaumé
2015-03-26 12:35         ` Ludovic Courtès
2015-03-27 18:54           ` Mark H Weaver

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).