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

error during compilation: loading fails #18

Open
lassancejm opened this issue Jun 7, 2020 · 1 comment
Open

error during compilation: loading fails #18

lassancejm opened this issue Jun 7, 2020 · 1 comment

Comments

@lassancejm
Copy link

Hi,

I am trying to install the package, but encounter an error indicating that the loading failed.

Thanks for your help!

Details about architecture:

  • R version 3.5.1 (2018-07-02) -- "Feather Spray"
  • Platform: x86_64-pc-linux-gnu (64-bit)
>install.packages('rsvg')
Installing package into ‘/n/home01/lassance/apps/R’
[...]
* installing *source* package ‘rsvg’ ...
** package ‘rsvg’ successfully unpacked and MD5 sums checked
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/n/home01/lassance/.conda/envs/ENV_python3/include/librsvg-2.0 -I/n/home01/lassance/.conda/envs/ENV_python3/include/glib-2.0 -I/n/home01/lassance/.conda/envs/ENV_python3/lib/glib-2.0/include -I/n/home01/lassance/.conda/envs/ENV_python3/include -I/n/home01/lassance/.conda/envs/ENV_python3/include/gdk-pixbuf-2.0 -I/n/home01/lassance/.conda/envs/ENV_python3/include/cairo  
Using PKG_LIBS=-L/n/home01/lassance/.conda/envs/ENV_python3/lib -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lglib-2.0  
** libs
gcc -I/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/curl/7.45.0-fasrc02/include -I/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/bzip2/1.0.6-fasrc02/include -I/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/xz/5.2.2-fasrc02/include -I/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/pcre/8.41-fasrc01/include -I/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/readline/6.3-fasrc03/include -L/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/bzip2/1.0.6-fasrc02/lib -L/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/xz/5.2.2-fasrc02/lib64 -L/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/pcre/8.41-fasrc01/lib -L/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/curl/7.45.0-fasrc02/lib -L/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/readline/6.3-fasrc03/lib64 -I"/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/R_core/3.5.1-fasrc02/lib64/R/include" -DNDEBUG -I/n/home01/lassance/.conda/envs/ENV_python3/include/librsvg-2.0 -I/n/home01/lassance/.conda/envs/ENV_python3/include/glib-2.0 -I/n/home01/lassance/.conda/envs/ENV_python3/lib/glib-2.0/include -I/n/home01/lassance/.conda/envs/ENV_python3/include -I/n/home01/lassance/.conda/envs/ENV_python3/include/gdk-pixbuf-2.0 -I/n/home01/lassance/.conda/envs/ENV_python3/include/cairo    -I/usr/local/include   -fpic  -g -O2  -c rsvg.c -o rsvg.o
gcc -I/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/curl/7.45.0-fasrc02/include -I/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/bzip2/1.0.6-fasrc02/include -I/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/xz/5.2.2-fasrc02/include -I/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/pcre/8.41-fasrc01/include -I/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/readline/6.3-fasrc03/include -L/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/bzip2/1.0.6-fasrc02/lib -L/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/xz/5.2.2-fasrc02/lib64 -L/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/pcre/8.41-fasrc01/lib -L/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/curl/7.45.0-fasrc02/lib -L/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/readline/6.3-fasrc03/lib64 -shared -L/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/R_core/3.5.1-fasrc02/lib64/R/lib -L/usr/local/lib64 -o rsvg.so rsvg.o -L/n/home01/lassance/.conda/envs/ENV_python3/lib -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lglib-2.0 -L/n/helmod/apps/centos7/Comp/gcc/7.1.0-fasrc01/R_core/3.5.1-fasrc02/lib64/R/lib -lR
installing to /n/home01/lassance/apps/R/rsvg/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error: package or namespace load failed for ‘rsvg’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/n/home01/lassance/apps/R/rsvg/libs/rsvg.so':
  /n/home01/lassance/apps/R/rsvg/libs/rsvg.so: undefined symbol: rsvg_handle_set_stylesheet
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/n/home01/lassance/apps/R/rsvg’```

@abcoxyzide
Copy link

I bumped into the same problem.

librsvg-2 is one of the dependencies of this package, and my system doesn't have it. Since I don't have admin rights, I installed the library using conda, added the path to PKG_CONFIG_PATH as suggested by the package, ran install.packages('rsvg'), compiled ok, but failed to load.

It seems like rsvg depends on librsvg-2 to function, not just during compilation. So something about the environment variables allowed me to compile rsvg, but not when I load the package.

Probably a bit hacky, but adding the dir containing librsvg-2.so to LD_LIBRARY_PATH solved my issue.

Would appreciate if anyone could suggest a better solution, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants