On Thu, Feb 24, 2011 at 1:58 AM, Aszodi,Andras <Andras.Aszodi@imp.ac.at>wrote:

>
> On Feb 23, 2011, at 8:09 PM, Dan Tenenbaum wrote:
>
>
>
> On Wed, Feb 23, 2011 at 3:07 AM, Aszodi,Andras <Andras.Aszodi@imp.ac.at>wrote:
>
>> Dear Mailing List,
>>
>> When I say:-
>>
>> > library("RdbiPgSQL")
>>
>> ...then I get the following errors:-
>>
>> Loading required package: Rdbi
>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>>  unable to load shared object
>>
>> '/Library/Frameworks/R.framework/Versions/2.12/Resources/library/RdbiPgSQL/libs/x86_64/RdbiPgSQL.so':
>>
>>
>> dlopen(/Library/Frameworks/R.framework/Versions/2.12/Resources/library/RdbiPgSQL/libs/x86_64/RdbiPgSQL.so,
>> 6): Symbol not found: _PQbackendPID
>>  Referenced from:
>>
>> /Library/Frameworks/R.framework/Versions/2.12/Resources/library/RdbiPgSQL/libs/x86_64/RdbiPgSQL.so
>>  Expected in: dynamic lookup
>>
>> Error: package/namespace load failed for 'RdbiPgSQL'
>>
>> I use only binary packages for R and R itself was installed as binary. But
>> I
>> must admit my Postgres installation (8.4.7) was compiled from source and
>> placed
>> into a "nonstandard" location /usr/local/pgsql/current . But the problem
>> persists even if I put the library path /usr/local/pgsql/current/lib in
>> the
>> DYLD_LIBRARY_PATH variable. This happens on a Mac Pro (64-bit Intel), with
>> OS X
>> 10.6.6. I would be grateful for any fixes or workaround advice. Thank you
>> very
>> much!
>>
>> PS I first sent this to the R bug tracking system but Professor Ripley
>> advised me to submit it to Bioconductor since RdbiPgSQL is a BioC
>> contributed package. I hope this is now the right place...
>>
>>
> Hi, you don't include the output of sessionInfo(),
>
>
> Sorry, my bad. Here it is. I wonder if this helps though...
>
> > sessionInfo()
> R version 2.12.1 (2010-12-16)
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>
> locale:
> [1] C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] Rdbi_1.24.0
>
> loaded via a namespace (and not attached):
> [1] tools_2.12.1
>
> nor explain how you installed RdbiPgSQL in the first place
>
>
> I said "I use only binary packages for R", see above. So RdbiPgSQL was
> installed with bioClite as usual. Definitely not from source.
>
> and whether there were any errors.
>
>
> No, there were no errors.
>
>
> You might try building RdbiPgSQL from source:
>
> source("http://bioconductor.org/biocLite.R")
> biocLite("RdbiPgSQL",type="source")
>
> This will give you some informative messages about how to tell the build
> process about your PostgreSQL installation.
>
>
> This is a good suggestion. What bothers me though that even if I specify
> LD_LIBRARY_PATH or DYLD_LIBRARY_PATH it won't help. Are the shared library
> locations somehow hard-coded in the pre-build packages?
>
> Yes.


>
> The pre-built version expects PostgreSQL to be in a standard location.
>
>
> That might be the problem. However, for Postgres there is no unequivocal
> "standard location" under OS X. Some people put it in /usr/local,
> Linux-style. There are pre-built versions that put the whole thing under
> /Library, MacPorts uses /opt I believe... it is a mess. My reason for the
> not-quite-standard location is that I plan to run 8.4 and 9.0 as well.
>
>
See here for how it is built on our Mac build system:
http://bioconductor.org/checkResults/release/bioc-LATEST/RdbiPgSQL/pelham-checksrc.html
Note the occurrences of /usr/local/include and /usr/local/lib.

 When I add the 'type="source"' flag to biocLite("RdbiPgSQL"), I see the
following;

I could not find your PostgreSQL client libraries!
Use --with-pgsql-libraries=PATH; if running R's INSTALL,
use --configure-args='--with-pgsql-libraries=PATH'; or
set PG_LIB_DIR in your environment to the library path,
and rerun the configure/install.

Passing these arguments by adding them to configure.args in your call to
biocLite(), and/or setting environment variables as described, should
probably build the package successfully for you.

> Dan
>
> Many thanks for your prompt reply and for your suggestions!
> András
>
> Dan

	[[alternative HTML version deleted]]

