ropensci / rsvg

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

Compile issue with all required dependencies #17

Closed melendys closed 4 years ago

melendys commented 4 years ago

Trying to install rsvg on centos7 R4.0.0. GCC 8.3 Installed :yum install librsvg2-devel

The downloaded source packages are in ‘/tmp/RtmplzanHt/downloaded_packages’ Updating HTML index of packages in '.Library' Making 'packages.html' ... done Warning message: In install.packages("rsvg") : installation of package ‘rsvg’ had non-zero exit status

jeroen commented 4 years ago

This does not happen on a vanilla centos-8 box with librsvg2-devel. I am seeing this:

* installing *source* package ‘rsvg’ ...
** package ‘rsvg’ successfully unpacked and MD5 sums checked
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/include/librsvg-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0 -pthread -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/uuid
Using PKG_LIBS=-lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lcairo
** libs
gcc -m64 -I"/usr/include/R" -DNDEBUG -I/usr/include/librsvg-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0 -pthread -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/uuid   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -c rsvg.c -o rsvg.o
gcc -m64 -shared -L/usr/lib64/R/lib -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o rsvg.so rsvg.o -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lcairo -L/usr/lib64/R/lib -lR
installing to /usr/lib64/R/library/00LOCK-rsvg/00new/rsvg/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package ‘rsvg’
    finding HTML links ... done
    rsvg                                    html
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (rsvg)

I guess you have a custom version installed of one of the dependencies of librsvg2 which is conflicting with the one from the main repositories.

Do you have any special PKG_CONFIG_PATH variable set? Try unsetting it.

melendys commented 4 years ago

Well Centos 7 package librsvg2-devel does not seam to work in my docker container. PKG_CONFIG_PATH was blank. To resolve I ended up remove the RHEL Package and compiling librsvg2-devel from source. Issue resolved