Reputation: 31
Fresh install at 10.12.1 with upgrades to 10.12.3.
I did the brew install unixodbc
.
I then tried R CMD INSTALL RODBC_1.3-14.tar.gz
with error:
checking for gcc... /usr/local/opt/llvm/bin/clang -fopenmp
checking whether the C compiler works... no
configure: error: in `/private/var/folders/7f/3n9kqyy13glcwlrx7h8cb5dc0000gn/T/RtmpYQnA2y/R.INSTALL354a771740af/RODBC':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘RODBC’
I then unpacked RODBC and tried to ./configure
and got the following error message in the log:
configure:2690: /usr/local/opt/llvm/bin/clang -fopenmp -v >&5
clang version 3.9.1 (tags/RELEASE_391/final)
Target: x86_64-apple-darwin16.4.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
configure:2701: $? = 0
configure:2690: /usr/local/opt/llvm/bin/clang -fopenmp -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:2701: $? = 1
configure:2690: /usr/local/opt/llvm/bin/clang -fopenmp -qversion >&5
clang: error: unknown argument: '-qversion'
clang: error: no input files
configure:2701: $? = 1
configure:2721: checking whether the C compiler works
configure:2743: /usr/local/opt/llvm/bin/clang -fopenmp -Wall -mtune=core2 -g -O2 -I/usr/local/opt/llvm/include -I. conftest.c >&5
ld: library not found for -lomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:2747: $? = 1
configure:2785: result: no
Upvotes: 0
Views: 384
Reputation: 11
I had the same issue For me, the problem was that the R installer was relying on the clang compiler that shipped with OS X (Sierra, 10.12.4), which does not support openmp.
I also couldn't get any of the usual means for specifying a different compiler to configure
to work (such as examples here) because, as it turns out, RODBC's configure script is hard-coded to use the compilers and lib/include paths specified by your R installation, which are described here.
I was able to resolve the problem by editing ~/.R/Makevars
to point to a version of gcc
I installed via macports (sudo port install gcc6
), as such:
CC=/opt/local/bin/gcc-mp-6 -fopenmp
CXX=/opt/local/bin/g++-mp-6
LDFLAGS=-L/opt/local/lib -L/usr/local/opt/llvm/lib
CPPFLAGS=-I/opt/local/include -I/usr/local/opt/llvm/include
Then the normal installation process (R CMD INSTALL ./RODBC_1.3-15.tar.gz
) worked as expected.
Upvotes: 1