Forum

Author Topic: import Metashape error  (Read 1982 times)

arafat

  • Newbie
  • *
  • Posts: 28
    • View Profile
import Metashape error
« on: April 20, 2022, 06:50:03 PM »
I upgraded to metashape 1.8.3. I am using the python wheel for Linux.

When I import Metashape I get:

Code: [Select]
ImportError: /usr/lib/x86_64-linux-gnu/libhogweed.so.4: undefined symbol: __gmpn_cnd_sub_n
any idea??

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: import Metashape error
« Reply #1 on: April 21, 2022, 01:03:42 PM »
Hello arafat,

Can you please specify with OS distribution you are using?

Also please check, if removing the following file from Metashape installation folder helps to avoid the problem: lib/libgmp.so.10
Best regards,
Alexey Pasumansky,
Agisoft LLC

arafat

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: import Metashape error
« Reply #2 on: April 21, 2022, 01:59:25 PM »
I'm using nvidia/cuda:10.1-base in Docker (https://hub.docker.com/layers/cuda/nvidia/cuda/10.1-base/images/sha256-c5c4512afe0179cd018591348173a1344930f695fb23f8485a9b713efc9d87dc?context=explore)

1.8.2 works fine, but the new 1.8.3 does not.

if I delete libgmp.so.10 I still have the same error

arafat

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: import Metashape error
« Reply #3 on: April 21, 2022, 02:06:53 PM »
Code: [Select]
>>> import Metashape
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/Metashape/__init__.py", line 3, in <module>
    from .Metashape import *
ImportError: /usr/lib/x86_64-linux-gnu/libhogweed.so.4: undefined symbol: __gmpn_cnd_sub_n
>>>
root@9ac7:/data# ldd /usr/lib/x86_64-linux-gnu/libhogweed.so.4
        linux-vdso.so.1 (0x00007ffff8549000)
        libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x00007fb6c0009000)
        libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007fb6bfd88000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb6bf997000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fb6c0473000)

arafat

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: import Metashape error
« Reply #4 on: April 21, 2022, 03:46:26 PM »
thats another try with python 3.8 and nvidia/cuda:11.6.1-base-ubuntu20.04

Code: [Select]
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import Metashape
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/dist-packages/Metashape/__init__.py", line 3, in <module>
    from .Metashape import *
ImportError: /lib/x86_64-linux-gnu/libhogweed.so.5: undefined symbol: __gmpn_cnd_sub_n
>>>
root@acffa:/data# ldd /lib/x86_64-linux-gnu/libhogweed.so.5
        linux-vdso.so.1 (0x00007ffc667e6000)
        libnettle.so.7 => /lib/x86_64-linux-gnu/libnettle.so.7 (0x00007ff7cdc48000)
        libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007ff7cdbc4000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff7cd9d2000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff7cdcc1000)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: import Metashape error
« Reply #5 on: April 21, 2022, 04:12:31 PM »
Hello arafat,

Can you please check, if it helps then to remove libgmp.so.10 from the following directory contents: /usr/local/lib/python3.6/dist-packages/Metashape/
Best regards,
Alexey Pasumansky,
Agisoft LLC

arafat

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: import Metashape error
« Reply #6 on: April 21, 2022, 04:25:44 PM »
after deleting it I get

Code: [Select]
>>> import Metashape
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/Metashape/__init__.py", line 3, in <module>
    from .Metashape import *
ImportError: /usr/local/lib/python3.6/dist-packages/Metashape/Metashape.so: undefined symbol: curl_multi_poll

arafat

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: import Metashape error
« Reply #7 on: April 21, 2022, 05:43:17 PM »
Thank you for your time.

Apparently, Its the curl being old curl 7.58.0 in nvidia/cuda:10-base

I have just finished testing, Installing new curl version didn't work. However, changing the OS to nvidia/cuda:11.6.1-base-ubuntu20.04 and upgrading the curl to curl 7.68.0 works after deleting libgmp.so.10

Best Regards,