Code Monkey home page Code Monkey logo

Comments (8)

edzer avatar edzer commented on August 13, 2024 1

Try to understand how dynamic linking works on unix systems, and what LD_LIBRARY_PATH does, and when.

from rudunits2.

edzer avatar edzer commented on August 13, 2024

Which command did you use to install udunits2, why was that successful? Did you set an environment variable or configure flag to make it search in /usr/kendon.bell/udunits/... ? Could you give the output of a new install command?

from rudunits2.

kendonB avatar kendonB commented on August 13, 2024

I run the following recipe that sets LD_LIBRARY_PATH and configure.args:

homedir <- Sys.getenv("HOME")
udunits_dir <- file.path(Sys.getenv("HOME"), "udunits")
system(paste0("mkdir ", udunits_dir))
system(paste0("wget --directory-prefix=", udunits_dir, " ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.25.tar.gz"))
owd <- getwd()
setwd(udunits_dir)
system("tar xzvf udunits-2.2.25.tar.gz")
setwd(file.path(udunits_dir, "udunits-2.2.25"))
system(paste0("./configure --prefix=", udunits_dir, "/local"))
system("make")
system("make install")
setwd(owd)
Sys.setenv(LD_LIBRARY_PATH=paste0(Sys.getenv("LD_LIBRARY_PATH"), ":", udunits_dir, "/local/lib"))
install.packages("udunits2", 
                 type = "source",
                 configure.args = c(paste0("--with-udunits2-include=", udunits_dir, "/local/include"), 
                                    paste0("--with-udunits2-lib=", udunits_dir, "/local/lib")),
                 repos = "http://cran.rstudio.com")
dyn.load(paste0(udunits_dir, "/local/lib/libudunits2.so.0"))
install.packages("units", repos = "http://cran.rstudio.com")

Apologies for the excessive output, but it may save another back and forth:

# In fresh R session
> homedir <- Sys.getenv("HOME")
> udunits_dir <- file.path(Sys.getenv("HOME"), "udunits")
> system(paste0("mkdir ", udunits_dir))
system(paste0("wget --directory-prefix=", udunits_dir, " ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.25.tar.gz"))
owd <- getwd()
setwd(udunits_dir)
system("tar xzvf udunits-2.2.25.tar.gz")
setwd(file.path(udunits_dir, "udunits-2.2.25"))
system(paste0("./configure --prefix=", udunits_dir, "/local"))
system("make")
system("make install")
setwd(owd)
Sys.setenv(LD_LIBRARY_PATH=paste0(Sys.getenv("LD_LIBRARY_PATH"), ":", udunits_dir, "/local/lib"))
> system(paste0("wget --directory-prefix=", udunits_dir, " ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.25.tar.gz"))
                 repos = "http://cran.rstudio.com")
dyn.load(paste0(udunits_dir, "/local/lib/libudunits2.so.0"))
install.packages("units", repos = "http://cran.rstudio.com")--2017-11-12 02:20:09--  ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.25.tar.gz
           => ‘/home/kendon.bell/udunits/udunits-2.2.25.tar.gz’
Resolving ftp.unidata.ucar.edu... 128.117.149.10
Connecting to ftp.unidata.ucar.edu|128.117.149.10|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/udunits ... done.
==> SIZE udunits-2.2.25.tar.gz ... 1006463
==> PASV ... done.    ==> RETR udunits-2.2.25.tar.gz ... done.
Length: 1006463 (983K) (unauthoritative)

udunits-2.2.25.tar.gz                100%[====================================================================>] 982.87K   396KB/s    in 2.5s

2017-11-12 02:20:14 (396 KB/s) - ‘/home/kendon.bell/udunits/udunits-2.2.25.tar.gz’ saved [1006463]

> owd <- getwd()
> setwd(udunits_dir)
> system("tar xzvf udunits-2.2.25.tar.gz")
udunits-2.2.25/
udunits-2.2.25/Makefile.am
udunits-2.2.25/udunits2.pdf
udunits-2.2.25/COPYRIGHT
udunits-2.2.25/Makefile.in
udunits-2.2.25/udunits2.info
udunits-2.2.25/m4/
udunits-2.2.25/m4/ltoptions.m4
udunits-2.2.25/m4/libtool.m4
udunits-2.2.25/m4/ltsugar.m4
udunits-2.2.25/m4/lt~obsolete.m4
udunits-2.2.25/m4/ltversion.m4
udunits-2.2.25/config.h.cmake
udunits-2.2.25/lib/
udunits-2.2.25/lib/systemMap.h
udunits-2.2.25/lib/xmlFailures/
udunits-2.2.25/lib/xmlFailures/Makefile.am
udunits-2.2.25/lib/xmlFailures/inconsistentPrefixEncoding.xml
udunits-2.2.25/lib/xmlFailures/Makefile.in
udunits-2.2.25/lib/xmlFailures/prefixEncoding.xml
udunits-2.2.25/lib/xmlFailures/badDef.xml
udunits-2.2.25/lib/xmlFailures/dupBaseName.xml
udunits-2.2.25/lib/xmlFailures/baseAndDimensionless.xml
udunits-2.2.25/lib/xmlFailures/misplacedBase.xml
udunits-2.2.25/lib/xmlFailures/prefixValue.xml
udunits-2.2.25/lib/xmlFailures/prefixSymbol.xml
udunits-2.2.25/lib/xmlFailures/prefixName.xml
udunits-2.2.25/lib/xmlFailures/missingBase.xml
udunits-2.2.25/lib/xmlFailures/dupBaseSymbol.xml
udunits-2.2.25/lib/xmlFailures/dupBaseAlias.xml
udunits-2.2.25/lib/testUnits.c
udunits-2.2.25/lib/udunits.h
udunits-2.2.25/lib/idToUnitMap.c
udunits-2.2.25/lib/udunits2lib.texi
udunits-2.2.25/lib/Makefile.am
udunits-2.2.25/lib/udunits2-derived.xml
udunits-2.2.25/lib/Makefile.in
udunits-2.2.25/lib/converter.h
udunits-2.2.25/lib/unitcore.c
udunits-2.2.25/lib/udunits2.h
udunits-2.2.25/lib/prefix.c
udunits-2.2.25/lib/parser.c
udunits-2.2.25/lib/udunits2-base.xml
udunits-2.2.25/lib/CMakeLists.txt
udunits-2.2.25/lib/unitToIdMap.c
udunits-2.2.25/lib/error.c
udunits-2.2.25/lib/unitAndId.c
udunits-2.2.25/lib/scanner.c
udunits-2.2.25/lib/udunits2-prefixes.xml
udunits-2.2.25/lib/idToUnitMap.h
udunits-2.2.25/lib/udunits2.xml
udunits-2.2.25/lib/converter.c
udunits-2.2.25/lib/ut_free_system.c
udunits-2.2.25/lib/udunits-1.c
udunits-2.2.25/lib/c99_snprintf.c
udunits-2.2.25/lib/udunits2-accepted.xml
udunits-2.2.25/lib/scanner.l
udunits-2.2.25/lib/testUnits-1.c
udunits-2.2.25/lib/tsearch.h
udunits-2.2.25/lib/udunits2lib.html
udunits-2.2.25/lib/xml.c
udunits-2.2.25/lib/unitAndId.h
udunits-2.2.25/lib/udunits2-common.xml
udunits-2.2.25/lib/unitToIdMap.h
udunits-2.2.25/lib/xmlSuccesses/
udunits-2.2.25/lib/xmlSuccesses/Makefile.am
udunits-2.2.25/lib/xmlSuccesses/Makefile.in
udunits-2.2.25/lib/xmlSuccesses/include.xml
udunits-2.2.25/lib/xmlSuccesses/prefixes.xml
udunits-2.2.25/lib/systemMap.c
udunits-2.2.25/lib/udunits2lib.pdf
udunits-2.2.25/lib/tsearch.c
udunits-2.2.25/lib/status.c
udunits-2.2.25/lib/udunits2lib.info
udunits-2.2.25/lib/prefix.h
udunits-2.2.25/lib/parser.y
udunits-2.2.25/lib/formatter.c
udunits-2.2.25/CMakeLists.txt
udunits-2.2.25/ANNOUNCEMENT
udunits-2.2.25/config.h.in
udunits-2.2.25/BACKLOG
udunits-2.2.25/aclocal.m4
udunits-2.2.25/CHANGE_LOG
udunits-2.2.25/udunits2.html
udunits-2.2.25/udunits2.texi
udunits-2.2.25/build-aux/
udunits-2.2.25/build-aux/depcomp
udunits-2.2.25/build-aux/compile
udunits-2.2.25/build-aux/ltmain.sh
udunits-2.2.25/build-aux/missing
udunits-2.2.25/build-aux/ylwrap
udunits-2.2.25/build-aux/mdate-sh
udunits-2.2.25/build-aux/install-sh
udunits-2.2.25/build-aux/config.sub
udunits-2.2.25/build-aux/texinfo.tex
udunits-2.2.25/build-aux/config.guess
udunits-2.2.25/version.texi
udunits-2.2.25/README
udunits-2.2.25/configure
udunits-2.2.25/stamp-vti
udunits-2.2.25/configure.ac
udunits-2.2.25/prog/
udunits-2.2.25/prog/Makefile.am
udunits-2.2.25/prog/udunits2prog.info
udunits-2.2.25/prog/Makefile.in
udunits-2.2.25/prog/CMakeLists.txt
udunits-2.2.25/prog/udunits2.c
udunits-2.2.25/prog/udunits2prog.texi
udunits-2.2.25/prog/udunits2prog.html
udunits-2.2.25/prog/XGetopt.h
udunits-2.2.25/prog/udunits2prog.pdf
udunits-2.2.25/prog/XGetopt.c
> setwd(file.path(udunits_dir, "udunits-2.2.25"))
> system(paste0("./configure --prefix=", udunits_dir, "/local"))
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for bison... bison -y
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking for gfortran... gfortran
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking for library containing dirname... none required
checking for library containing log10... -lm
checking for library containing XML_StopParser... -lexpat
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking for inttypes.h... (cached) yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
configure: Checking for the CUNIT unit-testing package.
checking CUnit/CUnit.h usability... no
checking CUnit/CUnit.h presence... no
checking for CUnit/CUnit.h... no
configure: CUNIT not found.  Disabling unit-tests.
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for floor... yes
checking for memmove... yes
checking for memset... yes
checking for modf... yes
checking for pow... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strpbrk... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /share/easybuild/RHEL6.3/sandybridge/software/binutils/2.26-GCCcore-5.4.0/bin/ld
checking if the linker (/share/easybuild/RHEL6.3/sandybridge/software/binutils/2.26-GCCcore-5.4.0/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /share/easybuild/RHEL6.3/sandybridge/software/binutils/2.26-GCCcore-5.4.0/bin/nm -B
checking the name lister (/share/easybuild/RHEL6.3/sandybridge/software/binutils/2.26-GCCcore-5.4.0/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 3458764513820540925
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /share/easybuild/RHEL6.3/sandybridge/software/binutils/2.26-GCCcore-5.4.0/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /share/easybuild/RHEL6.3/sandybridge/software/binutils/2.26-GCCcore-5.4.0/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/share/easybuild/RHEL6.3/sandybridge/software/binutils/2.26-GCCcore-5.4.0/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gfortran option to produce PIC... -fPIC
checking if gfortran PIC flag -fPIC works... yes
checking if gfortran static flag -static works... yes
checking if gfortran supports -c -o file.o... yes
checking if gfortran supports -c -o file.o... (cached) yes
checking whether the gfortran linker (/share/easybuild/RHEL6.3/sandybridge/software/binutils/2.26-GCCcore-5.4.0/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating lib/xmlFailures/Makefile
config.status: creating lib/xmlSuccesses/Makefile
config.status: creating prog/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
> system("make")
make  all-recursive
make[1]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25'
Making all in lib
make[2]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/lib'
make  all-recursive
make[3]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/lib'
Making all in xmlFailures
make[4]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/lib/xmlFailures'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/lib/xmlFailures'
Making all in xmlSuccesses
make[4]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/lib/xmlSuccesses'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/lib/xmlSuccesses'
make[4]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/lib'
depbase=`echo unitcore.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -DNDEBUG  -O -MT unitcore.lo -MD -MP -MF $depbase.Tpo -c -o unitcore.lo unitcore.c &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT unitcore.lo -MD -MP -MF .deps/unitcore.Tpo -c unitcore.c  -fPIC -DPIC -o .libs/unitcore.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT unitcore.lo -MD -MP -MF .deps/unitcore.Tpo -c unitcore.c -o unitcore.o >/dev/null 2>&1
depbase=`echo converter.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -DNDEBUG  -O -MT converter.lo -MD -MP -MF $depbase.Tpo -c -o converter.lo converter.c &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT converter.lo -MD -MP -MF .deps/converter.Tpo -c converter.c  -fPIC -DPIC -o .libs/converter.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT converter.lo -MD -MP -MF .deps/converter.Tpo -c converter.c -o converter.o >/dev/null 2>&1
depbase=`echo formatter.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -DNDEBUG  -O -MT formatter.lo -MD -MP -MF $depbase.Tpo -c -o formatter.lo formatter.c &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT formatter.lo -MD -MP -MF .deps/formatter.Tpo -c formatter.c  -fPIC -DPIC -o .libs/formatter.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT formatter.lo -MD -MP -MF .deps/formatter.Tpo -c formatter.c -o formatter.o >/dev/null 2>&1
depbase=`echo idToUnitMap.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -DNDEBUG  -O -MT idToUnitMap.lo -MD -MP -MF $depbase.Tpo -c -o idToUnitMap.lo idToUnitMap.c &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT idToUnitMap.lo -MD -MP -MF .deps/idToUnitMap.Tpo -c idToUnitMap.c  -fPIC -DPIC -o .libs/idToUnitMap.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT idToUnitMap.lo -MD -MP -MF .deps/idToUnitMap.Tpo -c idToUnitMap.c -o idToUnitMap.o >/dev/null 2>&1
depbase=`echo unitToIdMap.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -DNDEBUG  -O -MT unitToIdMap.lo -MD -MP -MF $depbase.Tpo -c -o unitToIdMap.lo unitToIdMap.c &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT unitToIdMap.lo -MD -MP -MF .deps/unitToIdMap.Tpo -c unitToIdMap.c  -fPIC -DPIC -o .libs/unitToIdMap.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT unitToIdMap.lo -MD -MP -MF .deps/unitToIdMap.Tpo -c unitToIdMap.c -o unitToIdMap.o >/dev/null 2>&1
depbase=`echo unitAndId.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -DNDEBUG  -O -MT unitAndId.lo -MD -MP -MF $depbase.Tpo -c -o unitAndId.lo unitAndId.c &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT unitAndId.lo -MD -MP -MF .deps/unitAndId.Tpo -c unitAndId.c  -fPIC -DPIC -o .libs/unitAndId.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT unitAndId.lo -MD -MP -MF .deps/unitAndId.Tpo -c unitAndId.c -o unitAndId.o >/dev/null 2>&1
depbase=`echo systemMap.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -DNDEBUG  -O -MT systemMap.lo -MD -MP -MF $depbase.Tpo -c -o systemMap.lo systemMap.c &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT systemMap.lo -MD -MP -MF .deps/systemMap.Tpo -c systemMap.c  -fPIC -DPIC -o .libs/systemMap.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT systemMap.lo -MD -MP -MF .deps/systemMap.Tpo -c systemMap.c -o systemMap.o >/dev/null 2>&1
depbase=`echo prefix.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -DNDEBUG  -O -MT prefix.lo -MD -MP -MF $depbase.Tpo -c -o prefix.lo prefix.c &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT prefix.lo -MD -MP -MF .deps/prefix.Tpo -c prefix.c  -fPIC -DPIC -o .libs/prefix.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT prefix.lo -MD -MP -MF .deps/prefix.Tpo -c prefix.c -o prefix.o >/dev/null 2>&1
depbase=`echo parser.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -DNDEBUG  -O -MT parser.lo -MD -MP -MF $depbase.Tpo -c -o parser.lo parser.c &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT parser.lo -MD -MP -MF .deps/parser.Tpo -c parser.c  -fPIC -DPIC -o .libs/parser.o
parser.c: In function 'utparse':
parser.c:63:17: warning: implicit declaration of function 'utlex' [-Wimplicit-function-declaration]
 #define yylex   utlex
                 ^
parser.c:862:16: note: in expansion of macro 'yylex'
 #ifdef YYLEX_PARAM
                ^
parser.c:1506:16: note: in expansion of macro 'YYLEX'
   if (yychar == YYEMPTY)
                ^
parser.y:366:8: warning: implicit declaration of function 'utGetPrefixByName' [-Wimplicit-function-declaration]
parser.y:373:9: warning: implicit declaration of function 'utGetPrefixBySymbol' [-Wimplicit-function-declaration]
        if (!symbolPrefixSeen &&
         ^
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT parser.lo -MD -MP -MF .deps/parser.Tpo -c parser.c -o parser.o >/dev/null 2>&1
depbase=`echo status.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -DNDEBUG  -O -MT status.lo -MD -MP -MF $depbase.Tpo -c -o status.lo status.c &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT status.lo -MD -MP -MF .deps/status.Tpo -c status.c  -fPIC -DPIC -o .libs/status.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT status.lo -MD -MP -MF .deps/status.Tpo -c status.c -o status.o >/dev/null 2>&1
depbase=`echo xml.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -DNDEBUG  -O -MT xml.lo -MD -MP -MF $depbase.Tpo -c -o xml.lo xml.c &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT xml.lo -MD -MP -MF .deps/xml.Tpo -c xml.c  -fPIC -DPIC -o .libs/xml.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT xml.lo -MD -MP -MF .deps/xml.Tpo -c xml.c -o xml.o >/dev/null 2>&1
depbase=`echo error.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -DNDEBUG  -O -MT error.lo -MD -MP -MF $depbase.Tpo -c -o error.lo error.c &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c  -fPIC -DPIC -o .libs/error.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c -o error.o >/dev/null 2>&1
depbase=`echo ut_free_system.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -DNDEBUG  -O -MT ut_free_system.lo -MD -MP -MF $depbase.Tpo -c -o ut_free_system.lo ut_free_system.c &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT ut_free_system.lo -MD -MP -MF .deps/ut_free_system.Tpo -c ut_free_system.c  -fPIC -DPIC -o .libs/ut_free_system.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT ut_free_system.lo -MD -MP -MF .deps/ut_free_system.Tpo -c ut_free_system.c -o ut_free_system.o >/dev/null 2>&1
depbase=`echo udunits-1.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -DNDEBUG  -O -MT udunits-1.lo -MD -MP -MF $depbase.Tpo -c -o udunits-1.lo udunits-1.c &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT udunits-1.lo -MD -MP -MF .deps/udunits-1.Tpo -c udunits-1.c  -fPIC -DPIC -o .libs/udunits-1.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -O -MT udunits-1.lo -MD -MP -MF .deps/udunits-1.Tpo -c udunits-1.c -o udunits-1.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC   --mode=link gcc  -O -version-number 0:1:0  -o libudunits2.la -rpath /home/kendon.bell/udunits/local/lib unitcore.lo converter.lo formatter.lo idToUnitMap.lo unitToIdMap.lo unitAndId.lo systemMap.lo prefix.lo parser.lo status.lo xml.lo error.lo ut_free_system.lo udunits-1.lo  -lexpat -lm
libtool: link: gcc -shared  -fPIC -DPIC  .libs/unitcore.o .libs/converter.o .libs/formatter.o .libs/idToUnitMap.o .libs/unitToIdMap.o .libs/unitAndId.o .libs/systemMap.o .libs/prefix.o .libs/parser.o .libs/status.o .libs/xml.o .libs/error.o .libs/ut_free_system.o .libs/udunits-1.o   -lexpat -lm  -O   -Wl,-soname -Wl,libudunits2.so.0 -o .libs/libudunits2.so.0.1.0
libtool: link: (cd ".libs" && rm -f "libudunits2.so.0" && ln -s "libudunits2.so.0.1.0" "libudunits2.so.0")
libtool: link: (cd ".libs" && rm -f "libudunits2.so" && ln -s "libudunits2.so.0.1.0" "libudunits2.so")
libtool: link: ar cru .libs/libudunits2.a  unitcore.o converter.o formatter.o idToUnitMap.o unitToIdMap.o unitAndId.o systemMap.o prefix.o parser.o status.o xml.o error.o ut_free_system.o udunits-1.o
libtool: link: ranlib .libs/libudunits2.a
libtool: link: ( cd ".libs" && rm -f "libudunits2.la" && ln -s "../libudunits2.la" "libudunits2.la" )
make[4]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/lib'
make[3]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/lib'
make[2]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/lib'
Making all in prog
make[2]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/prog'
depbase=`echo udunits2.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
        gcc -DHAVE_CONFIG_H -I. -I..  -I../lib -DNDEBUG  -O -MT udunits2.o -MD -MP -MF $depbase.Tpo -c -o udunits2.o udunits2.c &&\
        mv -f $depbase.Tpo $depbase.Po
/bin/sh ../libtool --tag=CC   --mode=link gcc  -O   -o udunits2 udunits2.o ../lib/libudunits2.la -lexpat -lm
libtool: link: gcc -O -o .libs/udunits2 udunits2.o  ../lib/.libs/libudunits2.so -lexpat -lm -Wl,-rpath -Wl,/home/kendon.bell/udunits/local/lib
make[2]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/prog'
make[2]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25'
make[2]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25'
make[1]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25'
> system("make install")
Making install in lib
make[1]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/lib'
make  install-recursive
make[2]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/lib'
Making install in xmlFailures
make[3]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/lib/xmlFailures'
make[4]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/lib/xmlFailures'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/lib/xmlFailures'
make[3]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/lib/xmlFailures'
Making install in xmlSuccesses
make[3]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/lib/xmlSuccesses'
make[4]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/lib/xmlSuccesses'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/lib/xmlSuccesses'
make[3]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/lib/xmlSuccesses'
make[3]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/lib'
make[4]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/lib'
test -z "/home/kendon.bell/udunits/local/lib" || /bin/mkdir -p "/home/kendon.bell/udunits/local/lib"
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libudunits2.la '/home/kendon.bell/udunits/local/lib'
libtool: install: /usr/bin/install -c .libs/libudunits2.so.0.1.0 /home/kendon.bell/udunits/local/lib/libudunits2.so.0.1.0
libtool: install: (cd /home/kendon.bell/udunits/local/lib && { ln -s -f libudunits2.so.0.1.0 libudunits2.so.0 || { rm -f libudunits2.so.0 && ln -s libudunits2.so.0.1.0 libudunits2.so.0; }; })
libtool: install: (cd /home/kendon.bell/udunits/local/lib && { ln -s -f libudunits2.so.0.1.0 libudunits2.so || { rm -f libudunits2.so && ln -s libudunits2.so.0.1.0 libudunits2.so; }; })
libtool: install: /usr/bin/install -c .libs/libudunits2.lai /home/kendon.bell/udunits/local/lib/libudunits2.la
libtool: install: /usr/bin/install -c .libs/libudunits2.a /home/kendon.bell/udunits/local/lib/libudunits2.a
libtool: install: chmod 644 /home/kendon.bell/udunits/local/lib/libudunits2.a
libtool: install: ranlib /home/kendon.bell/udunits/local/lib/libudunits2.a
libtool: finish: PATH="/share/easybuild/RHEL6.3/sandybridge/software/R/3.4.2-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/OpenSSL/1.1.0e-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/GDAL/2.2.2-gimkl-2017a-GEOS-3.5.1/bin:/share/easybuild/RHEL6.3/sandybridge/software/PostgreSQL/9.6.2-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/netCDF/4.4.1-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/libgeotiff/1.4.2-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/PROJ/4.9.3-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/LibTIFF/4.0.7-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/KEALib/1.4.6-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/HDF5/1.8.18-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/HDF/4.2.13-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/libjpeg-turbo/1.5.1-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/expat/2.2.0-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/GEOS/3.5.1-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/Java/1.8.0_144:/share/easybuild/RHEL6.3/sandybridge/software/Java/1.8.0_144/bin:/share/easybuild/RHEL6.3/sandybridge/software/cURL/7.52.1-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/SQLite/3.16.2-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/Tcl/8.6.6-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/libxml2/2.9.4-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/libpng/1.6.28-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/libreadline/6.3-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/ncurses/6.0-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/PCRE/8.40-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/XZ/5.2.3-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/bzip2/1.0.6-gimkl-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/imkl/2017.1.132-gimpi-2017a/mkl/bin:/share/easybuild/RHEL6.3/sandybridge/software/imkl/2017.1.132-gimpi-2017a/bin:/share/easybuild/RHEL6.3/sandybridge/software/impi/2017.1.132-GCC-5.4.0-2.26/bin64:/share/easybuild/RHEL6.3/sandybridge/software/binutils/2.26-GCCcore-5.4.0/bin:/share/easybuild/RHEL6.3/sandybridge/software/GCCcore/5.4.0/bin:/usr/lib64/qt-3.3/bin:/share/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin:/usr/share/pvm3/bin:/home/kendon.bell/bin:/sbin" ldconfig -n /home/kendon.bell/udunits/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /home/kendon.bell/udunits/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/home/kendon.bell/udunits/local/include" || /bin/mkdir -p "/home/kendon.bell/udunits/local/include"
 /usr/bin/install -c -m 644 udunits2.h converter.h udunits.h '/home/kendon.bell/udunits/local/include'
test -z "/home/kendon.bell/udunits/local/share/info" || /bin/mkdir -p "/home/kendon.bell/udunits/local/share/info"
 /usr/bin/install -c -m 644 ./udunits2lib.info '/home/kendon.bell/udunits/local/share/info'
 install-info --info-dir='/home/kendon.bell/udunits/local/share/info' '/home/kendon.bell/udunits/local/share/info/udunits2lib.info'
test -z "/home/kendon.bell/udunits/local/share/udunits" || /bin/mkdir -p "/home/kendon.bell/udunits/local/share/udunits"
 /usr/bin/install -c -m 644 udunits2.xml udunits2-accepted.xml udunits2-base.xml udunits2-common.xml udunits2-derived.xml udunits2-prefixes.xml '/home/kendon.bell/udunits/local/share/udunits'
make  install-data-hook
make[5]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/lib'
mkdir -p /home/kendon.bell/udunits/local/share/doc/udunits
cd /home/kendon.bell/udunits/local/share/doc/udunits && \
            rm -rf udunits*.xml && \
            ln -s ../../udunits/*.xml .
make[5]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/lib'
make[4]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/lib'
make[3]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/lib'
make[2]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/lib'
make[1]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/lib'
Making install in prog
make[1]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/prog'
make[2]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25/prog'
test -z "/home/kendon.bell/udunits/local/bin" || /bin/mkdir -p "/home/kendon.bell/udunits/local/bin"
  /bin/sh ../libtool   --mode=install /usr/bin/install -c udunits2 '/home/kendon.bell/udunits/local/bin'
libtool: install: /usr/bin/install -c .libs/udunits2 /home/kendon.bell/udunits/local/bin/udunits2
test -z "/home/kendon.bell/udunits/local/share/info" || /bin/mkdir -p "/home/kendon.bell/udunits/local/share/info"
 /usr/bin/install -c -m 644 ./udunits2prog.info '/home/kendon.bell/udunits/local/share/info'
 install-info --info-dir='/home/kendon.bell/udunits/local/share/info' '/home/kendon.bell/udunits/local/share/info/udunits2prog.info'
make[2]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/prog'
make[1]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25/prog'
make[1]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25'
make[2]: Entering directory `/home/kendon.bell/udunits/udunits-2.2.25'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/home/kendon.bell/udunits/local/share/doc/udunits" || /bin/mkdir -p "/home/kendon.bell/udunits/local/share/doc/udunits"
 /usr/bin/install -c -m 644 CHANGE_LOG COPYRIGHT README '/home/kendon.bell/udunits/local/share/doc/udunits'
test -z "/home/kendon.bell/udunits/local/share/info" || /bin/mkdir -p "/home/kendon.bell/udunits/local/share/info"
 /usr/bin/install -c -m 644 ./udunits2.info '/home/kendon.bell/udunits/local/share/info'
 install-info --info-dir='/home/kendon.bell/udunits/local/share/info' '/home/kendon.bell/udunits/local/share/info/udunits2.info'
make[2]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25'
make[1]: Leaving directory `/home/kendon.bell/udunits/udunits-2.2.25'
> setwd(owd)
> Sys.setenv(LD_LIBRARY_PATH=paste0(Sys.getenv("LD_LIBRARY_PATH"), ":", udunits_dir, "/local/lib"))
> install.packages("udunits2",
+                  type = "source",
+                  configure.args = c(paste0("--with-udunits2-include=", udunits_dir, "/local/include"),
+                                     paste0("--with-udunits2-lib=", udunits_dir, "/local/lib")),
+                  repos = "http://cran.rstudio.com")
Installing package into ‘/home/kendon.bell/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/udunits2_0.13.tar.gz'
Content type 'application/x-gzip' length 67182 bytes (65 KB)
==================================================
downloaded 65 KB

* installing *source* package ‘udunits2’ ...
** package ‘udunits2’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for XML_ParserCreate in -lexpat... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking udunits2.h usability... yes
checking udunits2.h presence... yes
checking for udunits2.h... yes
checking for ut_read_xml in -ludunits2... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -I/share/easybuild/RHEL6.3/sandybridge/software/R/3.4.2-gimkl-2017a/lib64/R/include -DNDEBUG -I/home/kendon.bell/udunits/local/include  -I/share/easybuild/RHEL6.3/sandybridge/software/imkl/2017.1.132-gimpi-2017a/mkl/include -I/share/easybuild/RHEL6.3/sandybridge/software/zlib/1.2.11-gimkl-2017a/include -I/share/easybuild/RHEL6.3/sandybridge/software/bzip2/1.0.6-gimkl-2017a/include -I/share/easybuild/RHEL6.3/sandybridge/software/XZ/5.2.3-gimkl-2017a/include -I/share/easybuild/RHEL6.3/sandybridge/software/PCRE/8.40-gimkl-2017a/include -I/share/easybuild/RHEL6.3/sandybridge/software/libreadline/6.3-gimkl-2017a/include -I/share/easybuild/RHEL6.3/sandybridge/software/ncurses/6.0-gimkl-2017a/include -I/share/easybuild/RHEL6.3/sandybridge/software/libpng/1.6.28-gimkl-2017a/include -I/share/easybuild/RHEL6.3/sandybridge/software/libxml2/2.9.4-gimkl-2017a/include -I/share/easybuild/RHEL6.3/sandybridge/software/SQLite/3.16.2-gimkl-2017a/include -I/share/easybuild/RHEL6.3/sandybridge/software/cURL/7.52.1-gimkl-2017a/include -I/share/easybuild/RHEL6.3/sandybridge/software/Java/1.8.0_144/include -I/share/easybuild/RHEL6.3/sandybridge/software/GEOS/3.5.1-gimkl-2017a/include -I/share/easybuild/RHEL6.3/sandybridge/software/GDAL/2.2.2-gimkl-2017a-GEOS-3.5.1/include -I/share/easybuild/RHEL6.3/sandybridge/software/PROJ/4.9.3-gimkl-2017a/include -I/share/easybuild/RHEL6.3/sandybridge/software/NLopt/2.4.2-gimkl-2017a/include -I/share/easybuild/RHEL6.3/sandybridge/software/OpenSSL/1.1.0e-gimkl-2017a/include   -fpic  -O3 -march=native -mno-recip  -c udunits2_R.c -o udunits2_R.o
gcc -shared -L/share/easybuild/RHEL6.3/sandybridge/software/R/3.4.2-gimkl-2017a/lib64/R/lib -L/share/easybuild/RHEL6.3/sandybridge/software/GCCcore/5.4.0/lib64 -L/share/easybuild/RHEL6.3/sandybridge/software/GCCcore/5.4.0/lib -L/share/easybuild/RHEL6.3/sandybridge/software/imkl/2017.1.132-gimpi-2017a/lib -L/share/easybuild/RHEL6.3/sandybridge/software/imkl/2017.1.132-gimpi-2017a/mkl/lib/intel64 -L/share/easybuild/RHEL6.3/sandybridge/software/imkl/2017.1.132-gimpi-2017a/lib -L/share/easybuild/RHEL6.3/sandybridge/software/zlib/1.2.11-gimkl-2017a/lib -L/share/easybuild/RHEL6.3/sandybridge/software/bzip2/1.0.6-gimkl-2017a/lib -L/share/easybuild/RHEL6.3/sandybridge/software/XZ/5.2.3-gimkl-2017a/lib -L/share/easybuild/RHEL6.3/sandybridge/software/PCRE/8.40-gimkl-2017a/lib -L/share/easybuild/RHEL6.3/sandybridge/software/libreadline/6.3-gimkl-2017a/lib -L/share/easybuild/RHEL6.3/sandybridge/software/ncurses/6.0-gimkl-2017a/lib -L/share/easybuild/RHEL6.3/sandybridge/software/libpng/1.6.28-gimkl-2017a/lib -L/share/easybuild/RHEL6.3/sandybridge/software/libxml2/2.9.4-gimkl-2017a/lib -L/share/easybuild/RHEL6.3/sandybridge/software/SQLite/3.16.2-gimkl-2017a/lib -L/share/easybuild/RHEL6.3/sandybridge/software/cURL/7.52.1-gimkl-2017a/lib -L/share/easybuild/RHEL6.3/sandybridge/software/Java/1.8.0_144/lib -L/share/easybuild/RHEL6.3/sandybridge/software/GEOS/3.5.1-gimkl-2017a/lib -L/share/easybuild/RHEL6.3/sandybridge/software/GDAL/2.2.2-gimkl-2017a-GEOS-3.5.1/lib -L/share/easybuild/RHEL6.3/sandybridge/software/PROJ/4.9.3-gimkl-2017a/lib -L/share/easybuild/RHEL6.3/sandybridge/software/NLopt/2.4.2-gimkl-2017a/lib -L/share/easybuild/RHEL6.3/sandybridge/software/OpenSSL/1.1.0e-gimkl-2017a/lib -o udunits2.so udunits2_R.o -ludunits2 -lexpat -L/home/kendon.bell/udunits/local/lib -lexpat -ludunits2 -L/share/easybuild/RHEL6.3/sandybridge/software/R/3.4.2-gimkl-2017a/lib64/R/lib -lR
installing to /home/kendon.bell/R/x86_64-pc-linux-gnu-library/3.4/udunits2/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (udunits2)

The downloaded source packages are in
        ‘/tmp/RtmpU5dPGJ/downloaded_packages’
> dyn.load(paste0(udunits_dir, "/local/lib/libudunits2.so.0"))
> install.packages("units", repos = "http://cran.rstudio.com")
Installing package into ‘/home/kendon.bell/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/units_0.4-6.tar.gz'
Content type 'application/x-gzip' length 783289 bytes (764 KB)
==================================================
downloaded 764 KB

* installing *source* package ‘units’ ...
** package ‘units’ successfully unpacked and MD5 sums checked
** R
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (units)

The downloaded source packages are in
        ‘/tmp/RtmpU5dPGJ/downloaded_packages’
>

from rudunits2.

edzer avatar edzer commented on August 13, 2024

Well, if you have such a convoluted and custom way of installing the package, I'm not surprised that you have to go through hoops to get it loaded. For instance, setting LD_LIBRARY_PATH during install means that it should still be the same when you expect the package to be running; this suggests that you shouldn't set it in your install script but maybe in your .Rprofile or such.

from rudunits2.

kendonB avatar kendonB commented on August 13, 2024

Do you have a suggestion for a simpler install recipe, assuming I only have write access to my home folder?

Also, I think I can rule out that LD_LIBRARY_PATH is the culprit here, unless I'm missing something. Do you expect the following to work (the first three lines are the identical code to set the variable from the recipe)?

> homedir <- Sys.getenv("HOME")
> udunits_dir <- file.path(Sys.getenv("HOME"), "udunits")
> Sys.setenv(LD_LIBRARY_PATH=paste0(Sys.getenv("LD_LIBRARY_PATH"), ":", udunits_dir, "/local/lib"))
> library(udunits2)
Error: package or namespace load failed for ‘udunits2’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/kendon.bell/R/x86_64-pc-linux-gnu-library/3.4/udunits2/libs/udunits2.so':
  libudunits2.so.0: cannot open shared object file: No such file or directory

from rudunits2.

edzer avatar edzer commented on August 13, 2024

https://github.com/r-spatial/sf/blob/master/inst/docker/custom/Dockerfile gives you a docker file that points out how to do things when gdal/geos/proj are in custom dirs; you could work from there.

from rudunits2.

kendonB avatar kendonB commented on August 13, 2024

OK, I think I worked it out. For any future readers:

LD_LIBRARY_PATH can't be altered from within R (for the current session) on unix-alikes for security reasons:

"On Unix-alikes the paths used to resolve dynamically linked dependent libraries are fixed (for security reasons) when the process is launched, so dyn.load will only look for such libraries in the locations set by the 'R' shell script (via 'etc/ldpaths') and in the OS-specific defaults."

When I run Sys.setenv(LD_LIBRARY_PATH=...), before installing the package, it does alter LD_LIBRARY_PATH for the R CMD INSTALL call baked into install.packages() but not for anything in the current session, so installing works but loading from the console does not.

Setting LD_LIBRARY_PATH in .Rprofile does not work, because this contains code that runs after the process is launched.

The solution is to either launch the process setting LD_LIBRARY_PATH:

LD_LIBRARY_PATH=/yourpath/udunits/local/lib R

or to set LD_LIBRARY_PATH in .bashrc:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH":/yourpath/udunits/local/lib"

from rudunits2.

edzer avatar edzer commented on August 13, 2024

Thanks for the clear report, Kendon!

from rudunits2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.