[R-sig-Geo] Trouble building rgeos 0.2-7 on R-2.15.1 under Suse Linux 64bit

robert denham rjadenham at gmail.com
Thu Aug 2 04:12:36 CEST 2012


Dear R Users,

sorry if this is a repost, I couldn't determine if my original message
made it to the list or not.

I'm having trouble building rgeos from source under linux. I have
R-2.15.1, and rgeos 0.2-7, it appears to build ok, but fails the final
install check:


** testing if installed package can be loaded Error in dyn.load(file,
DLLpath = DLLpath, ...) :
  unable to load shared object
'/export/home/denhamrj/tmp/rgeos.Rcheck/rgeos/libs/rgeos.so':
  /export/home/denhamrj/tmp/rgeos.Rcheck/rgeos/libs/rgeos.so:
undefined symbol: GEOSUnaryUnion_r
Error: loading failed
Execution halted


I tried with geos 3.3.2, but upgraded to 3.3.5 to see if that was the
problem, but I got the same error. I've searched for other similar
problems but haven't encountered anything. We do have multiple
versions of geos on our system, but they should be installed in such a
way that they don't conflict, but it has been suggested that this
could be the problem. I'd appreciate help in diagnosing and correcting
this.

I've included a little more detail below:

denhamrj at athena2 ~/tmp
$ R CMD check rgeos_0.2-7.tar.gz
* using log directory #/export/home/denhamrj/tmp/rgeos.Rcheck#
* using R version 2.15.1 (2012-06-22)
* using platform: x86_64-unknown-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file #rgeos/DESCRIPTION# ... OK
* this is package #rgeos# version #0.2-7#
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking whether package #rgeos# can be installed ... ERROR
Installation failed.
See #/export/home/denhamrj/tmp/rgeos.Rcheck/00install.out# for details.

00install.out contents:

* installing *source* package ‘rgeos’ ...
** package ‘rgeos’ successfully unpacked and MD5 sums checked
checking geos-config usability... yes
configure: geos-config: geos-config
configure: GEOS version: 3.3.5
checking geos version over 3.2.1... yes
checking geos-config clibs... yes
checking for gcc... gcc -std=gnu99
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for egrep... 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 geos_c.h usability... yes
checking geos_c.h presence... yes
checking for geos_c.h... yes
checking for initGEOS_r in -lgeos_c... yes
configure: PKG_CPPFLAGS:  -I/opt/sw/fw/rsc/geos/3.3.5/include
configure: PKG_LIBS:  -L/opt/sw/fw/rsc/geos/3.3.5/lib -lgeos
-L/opt/sw/fw/rsc/geos/3.3.5/lib -lgeos_c
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c
dummy.cc -o dummy.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c init.c
-o init.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c
local_stubs.c -o local_stubs.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c rgeos.c
-o rgeos.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c
rgeos_R2geos.c -o rgeos_R2geos.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c
rgeos_R2geosMP.c -o rgeos_R2geosMP.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c
rgeos_bbox.c -o rgeos_bbox.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c
rgeos_buffer.c -o rgeos_buffer.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c
rgeos_coord.c -o rgeos_coord.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c
rgeos_geos2R.c -o rgeos_geos2R.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c
rgeos_misc.c -o rgeos_misc.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c
rgeos_poly2nb.c -o rgeos_poly2nb.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c
rgeos_predicate_binary.c -o rgeos_predicate_binary.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c
rgeos_predicate_unary.c -o rgeos_predicate_unary.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c
rgeos_topology.c -o rgeos_topology.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c
rgeos_topology_binary.c -o rgeos_topology_binary.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c
rgeos_validate.c -o rgeos_validate.o
gcc -std=gnu99 -I/opt/sw/fw/rsc/R/2.15.1/lib64/R/include -DNDEBUG
-I/opt/sw/fw/rsc/geos/3.3.5/include
-I/opt/sw/fw/rsc/readline/readline-6.2/include
-I/opt/sw/fw/rsc/tcl/tcl-8.5.11/include
-I/opt/sw/fw/rsc/libjpeg/jpeg-8d/include
-I/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/include
-I"/opt/sw/fw/rsc/R/library/v2/sp/include"   -fpic  -g -O2  -c
rgeos_wkt.c -o rgeos_wkt.o
g++ -shared -L/opt/sw/fw/rsc/readline/readline-6.2/lib
g++ -L/opt/sw/fw/rsc/tcl/tcl-8.5.11/lib
g++ -L/opt/sw/fw/rsc/libjpeg/jpeg-8d/lib
g++ -L/opt/sw/fw/rsc/libtiff/libtiff-4.0.1/lib -o rgeos.so dummy.o
g++ init.o local_stubs.o rgeos.o rgeos_R2geos.o rgeos_R2geosMP.o
g++ rgeos_bbox.o rgeos_buffer.o rgeos_coord.o rgeos_geos2R.o
g++ rgeos_misc.o rgeos_poly2nb.o rgeos_predicate_binary.o
g++ rgeos_predicate_unary.o rgeos_topology.o rgeos_topology_binary.o
g++ rgeos_validate.o rgeos_wkt.o -L/opt/sw/fw/rsc/geos/3.3.5/lib -lgeos
g++ -L/opt/sw/fw/rsc/geos/3.3.5/lib -lgeos_c
g++ -L/opt/sw/fw/rsc/R/2.15.1/lib64/R/lib -lR
installing to /export/home/denhamrj/tmp/rgeos.Rcheck/rgeos/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded Error in dyn.load(file,
DLLpath = DLLpath, ...) :
  unable to load shared object
'/export/home/denhamrj/tmp/rgeos.Rcheck/rgeos/libs/rgeos.so':
  /export/home/denhamrj/tmp/rgeos.Rcheck/rgeos/libs/rgeos.so:
undefined symbol: GEOSUnaryUnion_r
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/export/home/denhamrj/tmp/rgeos.Rcheck/rgeos’


ldd of rgeos.so produces:
    libgeos-3.3.5.so => /opt/sw/fw/rsc/geos/3.3.5/lib/libgeos-3.3.5.so
(0x00002aaaaacc3000)
    libgeos_c.so.1 => /opt/sw/fw/rsc/geos/3.3.5/lib/libgeos_c.so.1
(0x00002aaaab05e000)
    libR.so => not found
    libstdc++.so.6 => /opt/sw/fw/rsc/gcc/4.4.2/lib64/libstdc++.so.6
(0x00002aaaab2a4000)
    libm.so.6 => /lib64/libm.so.6 (0x00002aaaab5b0000)
    libgcc_s.so.1 => /opt/sw/fw/rsc/gcc/4.4.2/lib64/libgcc_s.so.1
(0x00002aaaab705000)
    libc.so.6 => /lib64/libc.so.6 (0x00002aaaab91b000)
    /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)


I checked my LD_LIBRARY_PATH, the only reference to geos is
/opt/sw/fw/rsc/geos/3.3.5/lib. Similarly, my PATH variable has
/opt/sw/fw/rsc/geos/3.3.5/bin as the only geos entry.



Robert Denham
Environmental Statistician, Remote Sensing Centre Phone 07 3170 5676 (ext 26676)
Email: robert.denham at derm.qld.gov.au



More information about the R-sig-Geo mailing list