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

Unable to find cairo library when compiling with zig 0.7.0 and 0.7.1 #2

Open
jackdbd opened this issue Jan 20, 2021 · 1 comment
Open
Labels
bug Something isn't working

Comments

@jackdbd
Copy link
Owner

jackdbd commented Jan 20, 2021

On Travis CI and on my machine the project fails to build with zig 0.7.0 and 0.7.1 because of a linker error.

lld: error: unable to find library -lcairo
error: LLDReportedFailure
The following command exited with error code 1:
/home/travis/zig/zig test /home/travis/build/jackdbd/zig-cairo/src/cairo.zig --library c --library xcb --library cairo --test-name-prefix debug  --cache-dir /home/travis/build/jackdbd/zig-cairo/zig-cache --name test -I /usr/include/cairo -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/pixman-1 -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/freetype2 -I /usr/include/libpng16 
error: the following build command failed with exit code 1:
/home/travis/build/jackdbd/zig-cairo/zig-cache/o/ad4389c25906a7f44097b436cca0d923/build /home/travis/zig/zig /home/travis/build/jackdbd/zig-cairo /home/travis/build/jackdbd/zig-cairo/zig-cache test
The command "zig build test" exited with 1.

The project builds succesfully with zig 0.6.0 and zig 0.8.0-dev.1032+8098b3f84.

All Travis jobs install the libcairo2-dev using the APT addon.

Here is the output of lsb_release -a on my machine:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:         20.04
Codename:     focal
@jackdbd jackdbd added the bug Something isn't working label Jan 20, 2021
@jackdbd
Copy link
Owner Author

jackdbd commented Feb 3, 2021

Here is an extract of the output of zig build test

It seems that lld is not able to find the following libraries:

ld.lld: error: unable to find library -lxcb
ld.lld: error: unable to find library -lpango-1.0
ld.lld: error: unable to find library -lgobject-2.0
ld.lld: error: unable to find library -lglib-2.0
ld.lld: error: unable to find library -lharfbuzz
ld.lld: error: unable to find library -lpangocairo-1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant