Cary Correia
Cary Correia

Reputation: 1

Connecting kdb+ to R

I'm trying to run a make file to install qserver on my OSX machine. The make file gives me an error when I try to run. see code below:

make
/Library/Frameworks/R.framework/Resources/bin/R CMD gcc -g -O -fpic -m64   -shared -D KXVER=3 -I. -I/Library/Frameworks/R.framework/Resources/share/include base.c c.o -lpthread -L/Library/Frameworks/R.framework/Resources/share/lib -lR -o qserver.so
/Library/Frameworks/R.framework/Resources/bin/R: /Library/Frameworks/R.framework/Resources/bin/R: cannot execute binary file
make: *** [all] Error 126

Hoping someone can give me a pointer here on how to fix it.

Upvotes: 0

Views: 181

Answers (2)

JPC
JPC

Reputation: 1919

Do you have the right version of gcc? I build with gcc-4.8 and have no issues. I recall a thread on the kdb list that mentioned the build required some features available only in later gcc versions. Give that a try.

[EDIT]

Nevermind, just saw that the error says the R binary was not found. Edit the make file to use the appropriate path for your R installation. If you don't have R installed, I suggest installing with homebrew:

brew tap homebrew/science
brew install r

After that you can replace the path in the Makefile as appropriate. I personally changed the Makefile to use $(shell R RHOME) to find the R home path, rather than assume a specific location.

Upvotes: 1

Cary Correia
Cary Correia

Reputation: 1

JPC was partially right about gcc. My system had two different versions of gcc loaded and the default was the standard one. I changed the makefile to run 'gcc-4.8'.

Once I finished that I got a new error: the make file couldn't locate my 'R.h' file...so i just had to reference where my r h-files were located....once I did that the make problem executed.

Upvotes: 0

Related Questions