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.

ffi.error: symbol 'setMsgSeverity' not found in library '<None>': /usr/bin/python3: undefined symbol: setMsgSeverity

See original GitHub issue

When trying to build 7.4.0 against Debian experimental, I got this error:

Running Sphinx v1.7.9

Configuration error:
There is a programable error in your configuration file:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/config.py", line 161, in __init__
    execfile_(filename, config)
  File "/usr/lib/python3/dist-packages/sphinx/util/pycompat.py", line 150, in execfile_
    exec_(code, _globals)
  File "conf.py", line 81, in <module>
    from ocrmypdf import __version__ as OCRMYPDF_VERSION
  File "/<<PKGBUILDDIR>>/debian/.debhelper/ocrmypdf/__init__.py", line 36, in <module>
    from . import leptonica
  File "/<<PKGBUILDDIR>>/debian/.debhelper/ocrmypdf/leptonica.py", line 43, in <module>
    lept.setMsgSeverity(lept.L_SEVERITY_WARNING)
ffi.error: symbol 'setMsgSeverity' not found in library '<None>': /usr/bin/python3: undefined symbol: setMsgSeverity

The call to lept.setMsgSeverity is new. I tried patching that line into OCRmyPDF 7.2.1, which is the version currently in Debian experimental, and I get a slightly different error:

Running Sphinx v1.7.9

Configuration error:
There is a programable error in your configuration file:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/config.py", line 161, in __init__
    execfile_(filename, config)
  File "/usr/lib/python3/dist-packages/sphinx/util/pycompat.py", line 150, in execfile_
    exec_(code, _globals)
  File "conf.py", line 81, in <module>
    from ocrmypdf import __version__ as OCRMYPDF_VERSION
  File "/<<PKGBUILDDIR>>/debian/.debhelper/ocrmypdf/__init__.py", line 36, in <module>
    from . import leptonica
  File "/<<PKGBUILDDIR>>/debian/.debhelper/ocrmypdf/leptonica.py", line 38, in <module>
    lept.setMsgSeverity(lept.L_SEVERITY_WARNING)
AttributeError: cffi library '<None>' has no function, constant or global variable named 'setMsgSeverity'

It would seem that the version of liblept5 in Debian does not export the setMsgSeverity function. So I was thinking of just patching it out. But I am worried about the <None>. It suggests that the ffi.dlopen call is not succeeding. What do you think?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
oxplotcommented, Feb 20, 2019

Ah, missed the leptonica dependency. My bad. It’s all good now.

1reaction
bitnomcommented, Feb 17, 2019

I could only get ocrmypdf installed on Arch by using pip. Upon running, I encounter this error. How exactly to apply the patch?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ffi.error: symbol 'setMsgSeverity' not found in library '<None ...
When trying to build 7.4.0 against Debian experimental, I got this error: Running Sphinx v1.7.9 Configuration error: There is a programable ...
Read more >
undefined Symbols in ffi Node.js with a C shared library
I haven't got a idea what's wrong. If I search for Symbols with "nm" I got: 000006a8 T main U modbus_connect U modbus_free...
Read more >
ARMCLANG: L6218E: Undefined Symbol __aeabi_assert
The "Error: L6218E: Undefined symbol __aeabi_assert..." could occur if under Project -> Options for Target -> on the Target tab - Use MicroLIB...
Read more >
1011713 oscrypto: FTBFS: AttributeError: /usr/lib/x86_64-linux ...
Subject: oscrypto: FTBFS: AttributeError: /usr/lib/x86_64-linux-gnu/libcrypto.so.3: undefined symbol: EVP_PKEY_size.
Read more >
CFFI Documentation - Read the Docs
This is about getting an ImportError about _cffi_backend.so with a message like Symbol not found: _PyUnicodeUCS2_AsASCIIString. This error ...
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