Dear sig-geoers,
as an R-user I'd first like to thank you for all the effrot you put into
the R-project.
I hope what following will not cause you too much time expenditure and I'll
be very grateful you could give an advise as I made quite an effort to sort
it out by myself with no success.

I start with the preliminaries:

INSTALLED SOFTWARE:


OS: LINUX UBUNTU 10.11 Oneiric Ocelot
R  2.13.1
GRASS GIS 6.41 binary (installed via sudo apt-get install grass)
GDAL 1.9 (installed form official source, tar.gz, configuration option=
"--without grass", I have all files stored in a prefixed folder,
/usr/local/myfold,  and in standard folders - /usr/local- as I noted there
were difficulties in finding libgdal.so.1 from prefixed folder )
PROJ 4.8 ( installed from official source, tar.gz, all files installed in
prefixed folder /usr/local/myfold, proj_api.h and projlib pointed out via
configuration.arg statements).  # update I have also moved everithing in
standard folders. usr/local/ ..

ISSUE:

following some threads on the R-help list I finally came to run the
following:

R CMD INSTALL
--configure-args="--with-proj-include=/usr/local/proj4/include
--with-proj-lib=/usr/local/proj4/lib" rgdal_0.7-8.tar.gz
NOTE: having just moved all the proj4 directories in standard folders
(/usr/local) I could run the same command with no conf.args. I obtaiined
nevertheless the same error message listed below!

and received the following error (only an extract here, I'll paste the full
message at the bottom page):

[...]

Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object
'/home/me/R/i686-pc-linux-gnu-library/2.13/rgdal/libs/rgdal.so':
  /home/me/R/i686-pc-linux-gnu-library/2.13/rgdal/libs/rgdal.so: *undefined
symbol*: *pj_get_default_ctx
*Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/me/R/i686-pc-linux-gnu-library/2.13/rgdal’

###

As you can note seems that pj_get_default_ctx is not recognized (as far as
I'm inferring, i'm not a programmer).
I have made a research and understood that pj_get_default_ctx is a
something living into the proj_api.h file, into the "include" folder of the
installed PROJ4 (/usr/local/myfold, here).


Here is all, I hope I have furnished exhaustive informations to ease the
investigative task.

I'd like to thank you in advance

best regards


Federico Bonofiglio
contract researcher


## full install message

* installing to library ‘/home/me/R/i686-pc-linux-gnu-library/2.13’
* installing *source* package ‘rgdal’ ...
gdal-config: gdal-config
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 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 proj_api.h usability... yes
checking proj_api.h presence... yes
checking for proj_api.h... yes
checking for pj_init_plus in -lproj... yes
PROJ.4 Version 4.8 or later
*./proj_conf_test: symbol lookup error: ./proj_conf_test: undefined symbol:
pj_get_default_ctx
./proj_conf_test: symbol lookup error: ./proj_conf_test: undefined symbol:
pj_get_default_ctx
*Package CPP flags: -DP4CTX=1 -I/usr/local/proj4/include
-I/usr/local/gdal/include
Package LIBS:  -L/usr/local/proj4/lib -L/usr/local/gdal/lib -lgdal
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -I/usr/share/R/include -DP4CTX=1 -I/usr/local/proj4/include
-I/usr/local/gdal/include
-I"/home/me/R/i686-pc-linux-gnu-library/2.13/sp/include"   -fpic  -O3
-pipe  -g -c OGR_write.cpp -o OGR_write.o
g++ -I/usr/share/R/include -DP4CTX=1 -I/usr/local/proj4/include
-I/usr/local/gdal/include
-I"/home/me/R/i686-pc-linux-gnu-library/2.13/sp/include"   -fpic  -O3
-pipe  -g -c gdal-bindings.cpp -o gdal-bindings.o
gcc -I/usr/share/R/include -DP4CTX=1 -I/usr/local/proj4/include
-I/usr/local/gdal/include
-I"/home/me/R/i686-pc-linux-gnu-library/2.13/sp/include"   -fpic
-std=gnu99 -O3 -pipe  -g -c local_stubs.c -o local_stubs.o
g++ -I/usr/share/R/include -DP4CTX=1 -I/usr/local/proj4/include
-I/usr/local/gdal/include
-I"/home/me/R/i686-pc-linux-gnu-library/2.13/sp/include"   -fpic  -O3
-pipe  -g -c ogr_geom.cpp -o ogr_geom.o
gcc -I/usr/share/R/include -DP4CTX=1 -I/usr/local/proj4/include
-I/usr/local/gdal/include
-I"/home/me/R/i686-pc-linux-gnu-library/2.13/sp/include"   -fpic
-std=gnu99 -O3 -pipe  -g -c ogr_polygons.c -o ogr_polygons.o
g++ -I/usr/share/R/include -DP4CTX=1 -I/usr/local/proj4/include
-I/usr/local/gdal/include
-I"/home/me/R/i686-pc-linux-gnu-library/2.13/sp/include"   -fpic  -O3
-pipe  -g -c ogr_proj.cpp -o ogr_proj.o
g++ -I/usr/share/R/include -DP4CTX=1 -I/usr/local/proj4/include
-I/usr/local/gdal/include
-I"/home/me/R/i686-pc-linux-gnu-library/2.13/sp/include"   -fpic  -O3
-pipe  -g -c ogrdrivers.cpp -o ogrdrivers.o
g++ -I/usr/share/R/include -DP4CTX=1 -I/usr/local/proj4/include
-I/usr/local/gdal/include
-I"/home/me/R/i686-pc-linux-gnu-library/2.13/sp/include"   -fpic  -O3
-pipe  -g -c ogrsource.cpp -o ogrsource.o
g++ -I/usr/share/R/include -DP4CTX=1 -I/usr/local/proj4/include
-I/usr/local/gdal/include
-I"/home/me/R/i686-pc-linux-gnu-library/2.13/sp/include"   -fpic  -O3
-pipe  -g -c projectit.cpp -o projectit.o
g++ -shared -o rgdal.so OGR_write.o gdal-bindings.o local_stubs.o
ogr_geom.o ogr_polygons.o ogr_proj.o ogrdrivers.o ogrsource.o projectit.o
-L/usr/local/proj4/lib -L/usr/local/gdal/lib -lgdal -lproj -L/usr/lib/R/lib
-lR
installing to /home/me/R/i686-pc-linux-gnu-library/2.13/rgdal/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
'/home/me/R/i686-pc-linux-gnu-library/2.13/rgdal/libs/rgdal.so':
  /home/me/R/i686-pc-linux-gnu-library/2.13/rgdal/libs/rgdal.so: *undefined
symbol: pj_get_default_ctx
*Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/me/R/i686-pc-linux-gnu-library/2.13/rgdal’

	[[alternative HTML version deleted]]

