gtk2hs / svgcairo

Other
4 stars 11 forks source link

fatal error: librsvg/librsvg-features.h: No such file or directory #14

Open jwaldmann opened 2 years ago

jwaldmann commented 2 years ago

I want to build svgcairo because of ghc-vis. I am running into this:

$ cabal install svgcairo --lib --allow-newer
Resolving dependencies...
Build profile: -w ghc-8.10.7 -O1
...
Configuring svgcairo-0.13.2.1...
./svgcairo.h:6:10: fatal error: librsvg/librsvg-features.h: No such file or directory
    6 | #include <librsvg/librsvg-features.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

I do have librsvg2-devel (on Fedora 35) but the header is named differently:

$ ls /usr/include/librsvg-2.0/librsvg/
rsvg-cairo.h  rsvg-features.h  rsvg.h  rsvg-version.h
Savelenko commented 2 years ago

I was attempting to build ghc-vis with stack (in Manjaro Linux) and encountered the same problem. I simply made a symlink to rsvg-features.h named librsvg-features.h and this solved the problem.

jwaldmann commented 2 years ago

Ah nice to know that this works. Thanks!

The proper fix would be to change the names in https://github.com/gtk2hs/svgcairo/blob/master/svgcairo.h ? Would this break some code?

dalpd commented 2 years ago

Ah nice to know that this works. Thanks!

The proper fix would be to change the names in https://github.com/gtk2hs/svgcairo/blob/master/svgcairo.h ? Would this break some code?

https://github.com/gtk2hs/svgcairo/pull/13

Also if you're nix users: svgcairo and ghc-vis were recently fixed on nixpkgs.