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.

cairocffi_to_pycairo doesn't work in fedora

See original GitHub issue

On fedora (disclaimer: not usually a fedora user) - cairocffi_to_pycairo.py doesn’t seem to work

 $ python -c 'from cairocffi_to_pycairo.py import *'
[devel@b1e68ff9c787 utils]$ python -c 'from cairocffi_to_pycairo.py import *'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "cairocffi_to_pycairo.py", line 8, in <module>
    pycairo.PycairoContext_FromContext.restype = ctypes.c_void_p
  File "/usr/lib64/python2.7/ctypes/__init__.py", line 373, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib64/python2.7/ctypes/__init__.py", line 378, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/lib64/python2.7/site-packages/cairo/_cairo.so: undefined symbol: PycairoContext_FromContext

I’ve made a Dockerfile that can repro the issue https://github.com/stuaxo/docker-fedora-cairocffi-bug run ./build.sh then ./run.sh

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lazkacommented, Jul 19, 2017

Here is some code implementing the pycairo->cairocffi conversion using only the public API: https://github.com/pygobject/pycairo/issues/59#issuecomment-316442034

Feel free to use it under the cairocffi license.

0reactions
riaqncommented, Apr 13, 2022

Hello, what’s the status on this? I’m having a similar issue: PycairoContext_FromContext is not in the pycairo .so file - any ideas? My guess is that those functions are not used inside pycairo and thus optimized out?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR: Could not build wheels for pycairo, which is required ...
In my case I'm trying to install PyGObject in Fedora . ... and if it still doesn't work install a lower version and...
Read more >
Getting Started — Pycairo documentation
Fedora : sudo dnf install cairo-devel pkg-config python3-devel ... To verify that the installation works run the following Python code: import cairo ...
Read more >
Bug 707196 – pygobject depends on unmaintained software
It looks like cairocffi is in Fedora 18 and 19: ... This doesn't just work for cairo, because cairo does not use GObject...
Read more >
Installing — Matplotlib 2.2.4 documentation
The following backends work out of the box: Agg, ps, pdf, ... Debian / Ubuntu: sudo apt-get install python3-matplotlib; Fedora: sudo dnf ...
Read more >
When A Python Module (Cairo) Is Installed Successfully But ...
In addition to other dependencies this will install xcffib. Importing. The module to import is named cairocffi in order to coexist peacefully with...
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