ropensci / rsvg

SVG renderer for R based on librsvg2
Other
95 stars 1 forks source link

problem installing "rsvg" package with librsvg-2.0 library already installed #12

Closed haiyanz closed 4 years ago

haiyanz commented 4 years ago

installed librsvg2-devel on Redhat 7 linux system, but still get the error messages

Found INCLUDE_DIR and/or LIB_DIR! Using PKG_CFLAGS=-I Using PKG_LIBS=-L/app/python-3.7.2/lib -lrsvg ------------------------- ANTICONF ERROR --------------------------- Configuration failed because librsvg-2.0 was not found. Try installing: * deb: librsvg2-dev (Debian, Ubuntu, etc) * rpm: librsvg2-devel (Fedora, EPEL) * csw: librsvg_dev, sunx11_devel (Solaris) * brew: librsvg (OSX) If librsvg-2.0 is already installed, check that 'pkg-config' is in your PATH and PKG_CONFIG_PATH contains a librsvg-2.0.pc file. If pkg-config is unavailable you can set INCLUDE_DIR and LIB_DIR manually via: R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...' -------------------------------------------------------------------- ERROR: configuration failed for package ‘rsvg’ * removing ‘/home/zhanh101/R/x86_64-pc-linux-gnu-library/3.4/rsvg’

I tried pkg-config and got the following bash-4.2# pkg-config --libs librsvg-2.0 -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lglib-2.0

Looks like the library link should be "-lrsvg-2" instead of "-lrsvg"? Is this a bug?

jeroen commented 4 years ago

From the output I see that you are using a custom LIB_DIR variable to-L/app/python-3.7.2/lib which overrides pkgconfig. Perhaps this gets set by python? You should unset this variable, so that it will automatically use the proper pkg-config settings.

I just confirmed works fine with librsvg2-devel on CentOS 7 with the pkg-config settings.