question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Verification of qvm and quilc on Ubuntu 20.04 fails due to libffi.so.6 no longer used

See original GitHub issue

Pre-Report Checklist

  • [ X] I am running the latest versions of pyQuil and the Forest SDK
  • [ X] I checked to make sure that this bug has not already been reported

Issue Description

I have tried to verify that qvm and quilc work correctly in Ubuntu 20.04, however I get en error

 qvm --version
Unhandled SIMPLE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
                                    {10005C04F3}>:
  Error opening shared object "libffi.so.6":
  libffi.so.6: cannot open shared object file: No such file or directory.

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10005C04F3}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<SIMPLE-ERROR "Error opening ~:[runtime~;shared object ~:*~S~]:
  ~A." {1000E05543}> #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK *INVOKE-DEBUGGER-HOOK* #<SIMPLE-ERROR "Error opening ~:[runtime~;shared object ~:*~S~]:
  ~A." {1000E05543}>)
2: (INVOKE-DEBUGGER #<SIMPLE-ERROR "Error opening ~:[runtime~;shared object ~:*~S~]:
  ~A." {1000E05543}>)
3: (ERROR "Error opening ~:[runtime~;shared object ~:*~S~]:
  ~A." "libffi.so.6" "libffi.so.6: cannot open shared object file: No such file or directory")
4: (SB-SYS:DLOPEN-OR-LOSE #S(SB-ALIEN::SHARED-OBJECT :PATHNAME #P"libffi.so.6" :NAMESTRING "libffi.so.6" :HANDLE NIL :DONT-SAVE NIL))
5: (SB-ALIEN::TRY-REOPEN-SHARED-OBJECT #S(SB-ALIEN::SHARED-OBJECT :PATHNAME #P"libffi.so.6" :NAMESTRING "libffi.so.6" :HANDLE NIL :DONT-SAVE NIL))
6: (SB-SYS:REOPEN-SHARED-OBJECTS)
7: (SB-IMPL::FOREIGN-REINIT)
8: (SB-IMPL::REINIT)
9: ((FLET SB-UNIX::BODY :IN SAVE-LISP-AND-DIE))
10: ((FLET "WITHOUT-INTERRUPTS-BODY-14" :IN SAVE-LISP-AND-DIE))
11: ((LABELS SB-IMPL::RESTART-LISP :IN SAVE-LISP-AND-DIE))

unhandled condition in --disable-debugger mode, quitting

Insert a short description of the bug here, along with what you expected the behavior to be.

Thanks for helping us improve pyQuil! 🙂

How to Reproduce

If useful, provide a numbered list of the steps that result in the error.

Otherwise, just fill out the “Code Snippet” and “Error Output” sections below.

Code Snippet

Include a snippet of the pyQuil code that produces the error here.

Error Output

Additionally, please copy and paste the output of the above code here.

Environment Context

Operating System: Ubuntu 20.04

Python Version (python -V): Python 3.9.7

Quilc Version (quilc --version):

QVM Version (qvm --version):

forest-sdk-2.23.0-linux-deb

Python Environment Details (pip freeze or conda list):

Copy and paste the output of `pip freeze` or `conda list` here.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
kalzoocommented, Apr 15, 2022

@dbanty ftw!

1reaction
fieldofnodescommented, Apr 15, 2022

@dbanty Brilliant!! I just did this, and BOOM – works.

Digest: sha256:9f05185cf529349282f2fe2670bebb669fca5a5fa98b76d228dbd0bbd88aa95c
Status: Downloaded newer image for rigetti/forest:rc
=========================================
=   WELCOME TO THE RIGETTI FOREST SDK   =
=========================================
Copyright (c) 2016-2019 Rigetti Computing

Python 3.7.13 (default, Apr 14 2022, 06:46:01) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.32.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from pyquil import get_qc, Program
   ...: from pyquil.gates import H, CNOT, MEASURE
   ...: from pyquil.quilbase import Declare
   ...: 
   ...: program = Program(
   ...:     Declare("ro", "BIT", 2),
   ...:     H(0),
   ...:     CNOT(0, 1),
   ...:     MEASURE(0, ("ro", 0)),
   ...:     MEASURE(1, ("ro", 1)),
   ...: ).wrap_in_numshots_loop(10)
   ...: 
   ...: qc = get_qc("2q-qvm")
   ...: 
   ...: qc.run(qc.compile(program)).readout_data.get("ro")
Out[1]: 
array([[0, 0],
       [1, 1],
       [0, 0],
       [0, 0],
       [1, 1],
       [1, 1],
       [0, 0],
       [1, 1],
       [1, 1],
       [0, 0]])

In [2]: 

Thanks for the swift feedback.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ubuntu 20.04 upgrade, Python missing libffi.so.6
Create a simlink named libffi.so.6 that points to libffi.so.7 : ... I am using Xubuntu 20.04 and recompiling the python version 3.7 did...
Read more >
Libffi.so.6 error on ubuntu-latest · Discussion #24949 - GitHub
I started to see errors this morning on: ... Googling, it looks similar to Ubuntu 20.04 upgrade, Python missing libffi.so.6 - Stack Overflow...
Read more >
LoadError: libffi.so.8: cannot open shared object file: No such ...
I am using ASDF for ruby version management. I tried many solutions like uninstalling and installing the gem, running gem pristine and some ......
Read more >
Diff - third_party/harfbuzz - fuchsia Git repositories
-Again, on Ubuntu / Debian: +Linux packagers are advised to at least use ... -512,6 +503,14 @@ AC_MSG_NOTICE([ +Autotools is no longer our...
Read more >
EPEL 7 for x86_64 - RPMFind
x86_64-redhat-linux-gnu-api-v49+ · netcdf-1.0.6 · x86_64-redhat-linux-gnu-api-v49+ · signal-1.3.0 · x86_64-redhat-linux-gnu-api-v49+.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found