Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkdocs serve fails to import libcairo on certain mac setups #1073

Open
1 task done
KevinMGranger opened this issue Sep 27, 2023 · 1 comment
Open
1 task done

mkdocs serve fails to import libcairo on certain mac setups #1073

KevinMGranger opened this issue Sep 27, 2023 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@KevinMGranger
Copy link
Collaborator

OpenShift version

Not related to OpenShift

Problem description

@prakritikoller was having trouble with mkdocs serve, and got a traceback ending with the following:
(ignore the mis-formatting)

../pelorus/.venv/lib/python3.10/site-packages/cairocffi/__init__.py", line 44, in dlopen
raise OSError(error_message)  # pragma: no cover
OSError: no library called "cairo-2" was found
no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so.2': dlopen(libcairo.so.2, 0x0002): tried: 'libcairo.so.2' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibcairo.so.2' (
no such file), '/usr/lib/libcairo.so.2' (no such file, not in dyld cache), 'libcairo.so.2' (no such file), '/usr/lib/libcairo.so.2' (no such file, not in dyld cache)                                                                                                                                                           cannot load library 'libcairo.2.dylib': dlopen(libcairo.2.dylib, 0x0002): tried: 'libcairo.2.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibcair
o.2.dylib' (no such file), '/usr/lib/libcairo.2.dylib' (no such file, not in dyld cache), 'libcairo.2.dylib' (no such file), '/usr/lib/libcairo.2.dylib' (no such file, not in dyld cache)                                                                                                                                      cannot load library 'libcairo-2.dll': dlopen(libcairo-2.dll, 0x0002): tried: 'libcairo-2.dll' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibcairo-2.dl
l' (no such file), '/usr/lib/libcairo-2.dll' (no such file, not in dyld cache), 'libcairo-2.dll' (no such file), '/usr/lib/libcairo-2.dll' (no such file, not in dyld cache)

We did find a workaround, though! export DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/lib.

I don't know why or when that's necessary, but we should consider documenting it. Or at least finding the root cause.

Steps to reproduce

  1. make
  2. . .venv/bin/activate
  3. make system-doc-deps (do we document this requirement, btw?)
  4. mkdocs serve

Current behavior

On some setups, the above traceback occurs. Strangely enough, it did not happen for me.

Expected behavior

mkdocs... serves.

Code of Conduct

  • I agree to follow Pelorus's Code of Conduct
@KevinMGranger KevinMGranger added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 27, 2023
@shaloo
Copy link

shaloo commented Oct 2, 2023

After sonoma upgrade I see this very same error for libcairo-2 lib

Worked with export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/opt/homebrew/Cellar/cairo/1.16.0_5/lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

2 participants