Problems compiling RdbiPgSQL
1
0
Entering edit mode
@albert-vernon-smith-2137
Last seen 9.6 years ago
Hi- When I do that, the compile is still failing to see the proper libcrypt. While the -L/opt/local/lib does get added to the gcc command, it still is trying to look under /Developer/SDKs/MacOSX10.4u.sdk for the library path. == prompt$ export PKG_LIBS="-L/opt/local/lib" prompt$ sudo R CMD INSTALL --configure-args="--with-pgsql-libraries=/opt/local/lib/postgresql82 --with-pgsql-includes=/opt/local/include/postgresql82" RdbiPgSQL_1.10.0.tar.gz * Installing to library '/Library/Frameworks/R.framework/Resources/library' * Installing *source* package 'RdbiPgSQL' ... creating cache ./config.cache updating cache ./config.cache creating ./config.status creating src/Makevars ** libs ** arch - i386 gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -no-cpp-precomp -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -I/opt/local/include/postgresql82 -msse3 -D__NO_MATH_INLINES -fPIC -g -O2 -std=gnu99 -march=nocona -c PgSQL.c -o PgSQL.o gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -no-cpp-precomp -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -I/opt/local/include/postgresql82 -msse3 -D__NO_MATH_INLINES -fPIC -g -O2 -std=gnu99 -march=nocona -c PgSQLInit.c -o PgSQLInit.o gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -dynamiclib -Wl,-macosx_version_min -Wl,10.3 -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o RdbiPgSQL.so PgSQL.o PgSQLInit.o -L/opt/local/lib -L/opt/local/lib/postgresql82 -lpq -F/Library/Frameworks/R.framework/.. -framework R ld: warning can't open dynamic library: /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libssl.0.9.8.dylib referenced from: /opt/local/lib/postgresql82/libpq.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2) ld: warning can't open dynamic library: /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libcrypto.0.9.8.dylib referenced from: /opt/local/lib/postgresql82/libpq.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2) ld: Undefined symbols: _SSL_pending referenced from libpq expected to be defined in /opt/local/lib/libssl.0.9.8.dylib ... == Any other suggestion? Particularly how to work around the -sysroot call? -albert On 4/30/07, Seth Falcon <sfalcon at="" fhcrc.org=""> wrote: > "Albert Vernon Smith" <avsmith at="" gmail.com=""> writes: > > > Hi- > > > > I'm trying to compile RdbiPgSQL 1.10 from source on Mac OS X with R > > 2.5. My postgres binaries come from macports, and I can do: > > > > == > > R CMD INSTALL --configure-args="--with-pgsql- libraries=/opt/local/lib/postgresql82 > > --with-pgsql-includes=/opt/local/include/postgresql82" > > == > > > > And the libpq, etc is seen fine. However, postgres needs to link > > against libcrypto which also comes from macports and is in > > "/opt/local/lib". Getting an error like: > > > > == > > ld: warning can't open dynamic library: > > /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libssl.0.9.8.dylib > > referenced from: /opt/local/lib/postgresql82/libpq.dylib (checking for > > undefined symbols may be affected) (No such file or directory, errno = > > 2) > > ld: warning can't open dynamic library: > > /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libcrypto.0.9.8.dylib > > referenced from: /opt/local/lib/postgresql82/libpq.dylib (checking for > > undefined symbols may be affected) (No such file or directory, errno = > > 2) > > == > > > > (It really should be looking just under "/opt/local/lib" during the compile.) > > > > How can I get this to compile properly? I've tried passing variables > > via LDFLAGS, LIBS, and PKG_LIBS, and I've not found the right magic > > dust to get things to work properly. > > I would try the following: > > - Set and export environment variable PKG_LIBS to contain the library > path for libssl: > > export PKG_LIBS="-L /opt/local/lib" > > - Now try R CMD INSTALL with the same --configure-args as before. > > + seth > > -- > Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center > http://bioconductor.org >
RdbiPgSQL RdbiPgSQL • 891 views
ADD COMMENT
0
Entering edit mode
Seth Falcon ★ 7.4k
@seth-falcon-992
Last seen 9.6 years ago
"Albert Vernon Smith" <avsmith at="" gmail.com=""> writes: > Hi- > > When I do that, the compile is still failing to see the proper > libcrypt. While the -L/opt/local/lib does get added to the gcc > command, it still is trying to look under > /Developer/SDKs/MacOSX10.4u.sdk for the library path. > > == > prompt$ export PKG_LIBS="-L/opt/local/lib" > prompt$ sudo R CMD INSTALL > --configure-args="--with-pgsql-libraries=/opt/local/lib/postgresql82 > --with-pgsql-includes=/opt/local/include/postgresql82" > RdbiPgSQL_1.10.0.tar.gz > * Installing to library '/Library/Frameworks/R.framework/Resources/library' > * Installing *source* package 'RdbiPgSQL' ... > creating cache ./config.cache > updating cache ./config.cache > creating ./config.status > creating src/Makevars > ** libs > ** arch - i386 > gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk > -no-cpp-precomp -I/Library/Frameworks/R.framework/Resources/include > -I/Library/Frameworks/R.framework/Resources/include/i386 > -I/opt/local/include/postgresql82 -msse3 -D__NO_MATH_INLINES -fPIC > -g -O2 -std=gnu99 -march=nocona -c PgSQL.c -o PgSQL.o > gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk > -no-cpp-precomp -I/Library/Frameworks/R.framework/Resources/include > -I/Library/Frameworks/R.framework/Resources/include/i386 > -I/opt/local/include/postgresql82 -msse3 -D__NO_MATH_INLINES -fPIC > -g -O2 -std=gnu99 -march=nocona -c PgSQLInit.c -o PgSQLInit.o > gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk > -dynamiclib -Wl,-macosx_version_min -Wl,10.3 -undefined dynamic_lookup > -single_module -multiply_defined suppress -L/usr/local/lib -o > RdbiPgSQL.so PgSQL.o PgSQLInit.o -L/opt/local/lib > -L/opt/local/lib/postgresql82 -lpq > -F/Library/Frameworks/R.framework/.. -framework R > ld: warning can't open dynamic library: > /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libssl.0.9.8.dylib > referenced from: /opt/local/lib/postgresql82/libpq.dylib (checking for > undefined symbols may be affected) (No such file or directory, errno = > 2) > ld: warning can't open dynamic library: > /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libcrypto.0.9.8.dylib > referenced from: /opt/local/lib/postgresql82/libpq.dylib (checking for > undefined symbols may be affected) (No such file or directory, errno = > 2) > ld: Undefined symbols: > _SSL_pending referenced from libpq expected to be defined in > /opt/local/lib/libssl.0.9.8.dylib > ... > == > > Any other suggestion? Particularly how to work around the -sysroot > call? Perhaps try the R-sig-mac list? Perhaps unpack teh RdbiPgSQL source package and take a look at the configure.in script. Perhaps you can hard code something to work? When you install another package that has C code, do you get similar link args? I don't on my MacBook. Perhaps you have some other configuration issue going on that is attaching the SDK root? + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center http://bioconductor.org
ADD COMMENT
0
Entering edit mode
For anyone following this, the solution seems to be relatively trivial. If a symlink for /opt is put in /Developer/SDKs/MacOSX10.4u.sdk , then RdbiPgSQL compiles fine. It turns out that the isysroot option prepends its value to all paths. This is something which apple has done, and it is debatable whether this is a bug or a feature. -albert On 5/2/07, Seth Falcon <sfalcon at="" fhcrc.org=""> wrote: > "Albert Vernon Smith" <avsmith at="" gmail.com=""> writes: > > > Hi- > > > > When I do that, the compile is still failing to see the proper > > libcrypt. While the -L/opt/local/lib does get added to the gcc > > command, it still is trying to look under > > /Developer/SDKs/MacOSX10.4u.sdk for the library path. > > > > == > > prompt$ export PKG_LIBS="-L/opt/local/lib" > > prompt$ sudo R CMD INSTALL > > --configure-args="--with-pgsql- libraries=/opt/local/lib/postgresql82 > > --with-pgsql-includes=/opt/local/include/postgresql82" > > RdbiPgSQL_1.10.0.tar.gz > > * Installing to library '/Library/Frameworks/R.framework/Resources/library' > > * Installing *source* package 'RdbiPgSQL' ... > > creating cache ./config.cache > > updating cache ./config.cache > > creating ./config.status > > creating src/Makevars > > ** libs > > ** arch - i386 > > gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk > > -no-cpp-precomp -I/Library/Frameworks/R.framework/Resources/include > > -I/Library/Frameworks/R.framework/Resources/include/i386 > > -I/opt/local/include/postgresql82 -msse3 -D__NO_MATH_INLINES -fPIC > > -g -O2 -std=gnu99 -march=nocona -c PgSQL.c -o PgSQL.o > > gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk > > -no-cpp-precomp -I/Library/Frameworks/R.framework/Resources/include > > -I/Library/Frameworks/R.framework/Resources/include/i386 > > -I/opt/local/include/postgresql82 -msse3 -D__NO_MATH_INLINES -fPIC > > -g -O2 -std=gnu99 -march=nocona -c PgSQLInit.c -o PgSQLInit.o > > gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk > > -dynamiclib -Wl,-macosx_version_min -Wl,10.3 -undefined dynamic_lookup > > -single_module -multiply_defined suppress -L/usr/local/lib -o > > RdbiPgSQL.so PgSQL.o PgSQLInit.o -L/opt/local/lib > > -L/opt/local/lib/postgresql82 -lpq > > -F/Library/Frameworks/R.framework/.. -framework R > > ld: warning can't open dynamic library: > > /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libssl.0.9.8.dylib > > referenced from: /opt/local/lib/postgresql82/libpq.dylib (checking for > > undefined symbols may be affected) (No such file or directory, errno = > > 2) > > ld: warning can't open dynamic library: > > /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libcrypto.0.9.8.dylib > > referenced from: /opt/local/lib/postgresql82/libpq.dylib (checking for > > undefined symbols may be affected) (No such file or directory, errno = > > 2) > > ld: Undefined symbols: > > _SSL_pending referenced from libpq expected to be defined in > > /opt/local/lib/libssl.0.9.8.dylib > > ... > > == > > > > Any other suggestion? Particularly how to work around the -sysroot > > call? > > Perhaps try the R-sig-mac list? Perhaps unpack teh RdbiPgSQL source > package and take a look at the configure.in script. Perhaps you can > hard code something to work? > > When you install another package that has C code, do you get similar > link args? I don't on my MacBook. Perhaps you have some other > configuration issue going on that is attaching the SDK root? > > + seth > > -- > Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center > http://bioconductor.org >
ADD REPLY

Login before adding your answer.

Traffic: 826 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6