{"action":"opened","issue":{"url":"https://api.github.com/repos/jeroenooms/curl/issues/43","labels_url":"https://api.github.com/repos/jeroenooms/curl/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/jeroenooms/curl/issues/43/comments","events_url":"https://api.github.com/repos/jeroenooms/curl/issues/43/events","html_url":"https://github.com/jeroenooms/curl/issues/43","id":112886274,"number":43,"title":"0.9.3/ Problem loading shared library, causing failure to install package","user":{"login":"sanmai-NL","id":3374183,"avatar_url":"https://avatars.githubusercontent.com/u/3374183?v=3","gravatar_id":"","url":"https://api.github.com/users/sanmai-NL","html_url":"https://github.com/sanmai-NL","followers_url":"https://api.github.com/users/sanmai-NL/followers","following_url":"https://api.github.com/users/sanmai-NL/following{/other_user}","gists_url":"https://api.github.com/users/sanmai-NL/gists{/gist_id}","starred_url":"https://api.github.com/users/sanmai-NL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanmai-NL/subscriptions","organizations_url":"https://api.github.com/users/sanmai-NL/orgs","repos_url":"https://api.github.com/users/sanmai-NL/repos","events_url":"https://api.github.com/users/sanmai-NL/events{/privacy}","received_events_url":"https://api.github.com/users/sanmai-NL/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-22T20:36:04Z","updated_at":"2015-10-22T20:36:04Z","closed_at":null,"body":"I had trouble tonight installing the `curl` package under R 3.2.1 with a manually built and installed `curl` library at 7.44.0, installed under a prefix  `$HOME/prefix`. Many other source packages could be successfully built with the same configuration, and in the end some combination of changed made the installation error go away. I'm still puzzled what the problem was, and I'm wondering whether R and/or the `Makefile` dealing correctly with my `Makevars` file. I'm not very familiar with the `Makevars` file in R, it could well be incorrect. \r\n\r\nCan you look into this issue and tell me what has caused the problem and whether something should be fixed? \r\n\r\n# Context\r\n\r\n`~/.R/Makevars`:\r\n```Makefile\r\nPKG_LIBS = -L${HOME}/prefix/lib        \r\nPKG_CPPFLAGS = -I${HOME}/prefix/include\r\n```\r\n## Environment variables \r\n`PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig`\r\n`Linux *.nl 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1 (2015-05-24) x86_64 GNU/Linux`\r\n\r\n```r\r\nSys.getenv('LD_LIBRARY_PATH')\r\n# [1] \"/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/jre/lib/amd64/server:/home/myname/prefix/lib/\"\r\n```\r\n\r\n## GCC\r\n```\r\ngcc -v\r\nUsing built-in specs.\r\nCOLLECT_GCC=gcc\r\nCOLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper\r\nTarget: x86_64-linux-gnu\r\nConfigured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu\r\nThread model: posix\r\ngcc version 4.9.2 (Debian 4.9.2-10)\r\n```\r\n\r\n# Failure\r\n`install.packages('curl')` resulted in this failure:\r\n```\r\n* installing *source* package ‘curl’ ...\r\n** package ‘curl’ successfully unpacked and MD5 sums checked\r\nFound pkg-config cflags and libs!\r\nUsing PKG_CFLAGS=-I/home/myname/prefix/include \r\nUsing PKG_LIBS=-L/home/myname/prefix/lib -lcurl \r\n** libs\r\n\"/usr/lib/R/bin/Rscript\" \"../tools/options.R\"\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG \"-I/home/myname/prefix/include\"    \"-I/home/myname/prefix/include\" -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c callbacks.c -o callbacks.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG \"-I/home/myname/prefix/include\"    \"-I/home/myname/prefix/include\" -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c curl.c -o curl.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG \"-I/home/myname/prefix/include\"    \"-I/home/myname/prefix/include\" -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c download.c -o download.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG \"-I/home/myname/prefix/include\"    \"-I/home/myname/prefix/include\" -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c escape.c -o escape.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG \"-I/home/myname/prefix/include\"    \"-I/home/myname/prefix/include\" -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c fetch.c -o fetch.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG \"-I/home/myname/prefix/include\"    \"-I/home/myname/prefix/include\" -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c form.c -o form.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG \"-I/home/myname/prefix/include\"    \"-I/home/myname/prefix/include\" -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c getdate.c -o getdate.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG \"-I/home/myname/prefix/include\"    \"-I/home/myname/prefix/include\" -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c handle.c -o handle.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG \"-I/home/myname/prefix/include\"    \"-I/home/myname/prefix/include\" -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ieproxy.c -o ieproxy.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG \"-I/home/myname/prefix/include\"    \"-I/home/myname/prefix/include\" -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c init.c -o init.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG \"-I/home/myname/prefix/include\"    \"-I/home/myname/prefix/include\" -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c utils.c -o utils.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG \"-I/home/myname/prefix/include\"    \"-I/home/myname/prefix/include\" -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c version.c -o version.o\r\ngcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o curl.so callbacks.o curl.o download.o escape.o fetch.o form.o getdate.o handle.o ieproxy.o init.o utils.o version.o -L/home/myname/prefix/lib -L/usr/lib/R/lib -lR\r\ninstalling to /home/myname/R/x86_64-pc-linux-gnu-library/3.2/curl/libs\r\n** R\r\n** data\r\n*** moving datasets to lazyload DB\r\n** inst\r\n** preparing package for lazy loading\r\n** help\r\n*** installing help indices\r\n** building package indices\r\n** installing vignettes\r\n** testing if installed package can be loaded\r\nError in dyn.load(file, DLLpath = DLLpath, ...) : \r\n  unable to load shared object '/home/myname/R/x86_64-pc-linux-gnu-library/3.2/curl/libs/curl.so':\r\n  /home/myname/R/x86_64-pc-linux-gnu-library/3.2/curl/libs/curl.so: undefined symbol: curl_easy_escape\r\nError: loading failed\r\n```\r\n\r\n# Success\r\nCommenting out the Makevars, and building from the current `master` revision with\r\n`R CMD INSTALL --configure-vars=\"INCLUDE_DIR=$HOME/prefix/include LIB_DIR=$HOME/prefix/lib\" \"$HOME/installers/curl\"`\r\nis successful:\r\n```\r\n* installing *source* package ‘curl’ ...\r\n** package ‘curl’ successfully unpacked and MD5 sums checked\r\nFound pkg-config cflags and libs!\r\nUsing PKG_CFLAGS=-I/home/myname/prefix/include \r\nUsing PKG_LIBS=-L/home/myname/prefix/lib -lcurl \r\n** libs\r\n\"/usr/lib/R/bin/Rscript\" \"../tools/options.R\"\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/home/myname/prefix/include      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c callbacks.c -o callbacks.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/home/myname/prefix/include      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c curl.c -o curl.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/home/myname/prefix/include      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c download.c -o download.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/home/myname/prefix/include      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c escape.c -o escape.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/home/myname/prefix/include      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c fetch.c -o fetch.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/home/myname/prefix/include      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c form.c -o form.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/home/myname/prefix/include      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c getdate.c -o getdate.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/home/myname/prefix/include      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c handle.c -o handle.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/home/myname/prefix/include      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c ieproxy.c -o ieproxy.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/home/myname/prefix/include      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c init.c -o init.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/home/myname/prefix/include      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c utils.c -o utils.o\r\ngcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/home/myname/prefix/include      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c version.c -o version.o\r\ngcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o curl.so callbacks.o curl.o download.o escape.o fetch.o form.o getdate.o handle.o ieproxy.o init.o utils.o version.o -L/home/myname/prefix/lib -lcurl -L/usr/lib/R/lib -lR\r\ninstalling to /home/myname/R/x86_64-pc-linux-gnu-library/3.2/curl/libs\r\n** R\r\n** data\r\n*** moving datasets to lazyload DB\r\n** inst\r\n** preparing package for lazy loading\r\n** help\r\n*** installing help indices\r\n** building package indices\r\n** installing vignettes\r\n** testing if installed package can be loaded\r\n* DONE (curl)\r\n```"}}