[R-pkg-devel] Debugging RODBC installation problems on FreeBSD (unixodbc library path)

Rasmus Liland jr@| @end|ng |rom po@teo@no
Mon Mar 29 23:29:22 CEST 2021


Dear r-package-devel list subscribers,

can someone please guide me a little in
installing RODBC[1] on FreeBSD 13?

I believe it depends on unixodbc[2], but
the compilation stops with at not
finding unixodbc (I think):

	rasmus using iselin ~ % mkdir ~/src/RODBC
	rasmus using iselin ~ % cd ~/src/RODBC
	rasmus using iselin ~/src/RODBC % fetch 'https://cran.rstudio.com/src/contrib/RODBC_1.3-17.tar.gz'
	rasmus using iselin ~/src/RODBC % R CMD INSTALL RODBC
	* installing to library ‘/usr/home/rasmus/R/amd64-portbld-freebsd13.0-library/4.0’
	* installing *source* package ‘RODBC’ ...
	** package ‘RODBC’ successfully unpacked and MD5 sums checked
	** using staged installation
	checking for gcc... cc
	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 cc accepts -g... yes
	checking for cc option to accept ISO C89... none needed
	checking how to run the C preprocessor... cc -E
	checking for grep that handles long lines and -e... /usr/bin/grep
	checking for egrep... /usr/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 sql.h usability... yes
	checking sql.h presence... yes
	checking for sql.h... yes
	checking sqlext.h usability... yes
	checking sqlext.h presence... yes
	checking for sqlext.h... yes
	checking for library containing SQLTables... no
	configure: error: "no ODBC driver manager found"
	ERROR: configuration failed for package ‘RODBC’
	* removing ‘/usr/home/rasmus/R/amd64-portbld-freebsd13.0-library/4.0/RODBC’

I've attached the config.log.  I think
the important lines are 249:253:

	configure:3672: cc -o conftest -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include -I.  conftest.c -lodbc   >&5
	ld: error: unable to find library -lodbc
	cc: error: linker command failed with exit code 1 (use -v to see invocation)
	configure:3672: $? = 1

I found line 48 in configure.ac [3]

	odbc_lib_path=`odbc_config --libs | sed s/-lodbc//`

and tried to change it to

	odbc_lib_path=`pkg-config --libs --cflags odbc | sed s/-lodbc//`

but this changes nothing (I think ...)

Running odbc_config and pkg-config:

	rasmus using iselin ~/src/RODBC % odbc_config --libs
	-L/usr/local/lib -lodbc
	rasmus using iselin ~/src/RODBC % pkg-config --libs --cflags odbc
	-I/usr/local/include -L/usr/local/lib -lodbc

Hey, I am at a loss here ...

I have not done much debugging work like 
this before ...

Perhaps some kind soul among you can 
provide some useful pointers on this?

Best,
Rasmus Liland

[1] https://cran.r-project.org/web/packages/RODBC/index.html
[2] http://www.unixodbc.org/
[3] https://raw.githubusercontent.com/cran/RODBC/master/configure.ac

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config.log
URL: <https://stat.ethz.ch/pipermail/r-package-devel/attachments/20210329/688d058f/attachment.log>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-package-devel/attachments/20210329/688d058f/attachment.sig>


More information about the R-package-devel mailing list