m32 kdb using qserver compiled under m64?

219 views
Skip to first unread message

Chao LI

unread,
Oct 13, 2013, 1:53:03 PM10/13/13
to personal...@googlegroups.com
Hi,

I'm following the instructions in kx svn to compile the qserver in osx. But I'm running m32 reseach license kdb on my imac. in R i can load qserver.R correctly however even when I load a table of 10 rows R session will crash. 

Is this an issue of using m64 qserver in m32 kdb? Or is it an R issue?


R version 3.0.2 
x86_64-apple-darwin10.8.0 (64-bit)


thanks
Chao

Chris Burke

unread,
Oct 13, 2013, 7:34:25 PM10/13/13
to personal...@googlegroups.com
Hi Chao Li

The distributed osx qserver.so was compiled with R 2.15, and will work with kdb+ m32 and m64. 

I just tried compiling with R 3.02, and this also works with both m32 and m64. I will send you the .so in a separate message.

Chris

Andy

unread,
Oct 22, 2014, 7:03:46 AM10/22/14
to personal...@googlegroups.com
Hi

I am having some difficulty getting qserver working on OSX 10.10 with R 3.1.1 (Platform: x86_64-apple-darwin13.1.0 (64-bit)) and free trial kdb+ 3.2 (m32). Both R and kdb+ are working independently. I followed these steps to try and get qserver compiled:
1. Downloaded cookbook_code/r/osx_qserver from svn and saved this at ~/r/osx_qserver
2. Copied in to ~/r/osx_qserver: k.h (from svn kx/kdb+/c/c) and m64/c.o (from svn kx/kdb+/m64)
3. Downloaded common.c and qserver.c from svn cookbook_code/r/c and saved to ~/r/c
4. Ran make in ~/r/osx_qserver and had the following returned

==============================

/usr/bin/R CMD gcc -g -O -fpic -m64   -shared -D KXVER=3 -I. -I/Library/Frameworks/R.framework/Resources/include base.c c.o -lpthread -L/Library/Frameworks/R.framework/Resources/lib -lR -o qserver.so

In file included from base.c:13:

./../c/common.c:556:13: warning: using the result of an assignment as a condition without parentheses

      [-Wparentheses]

                if (table = ktd(x)) {

                    ~~~~~~^~~~~~~~

./../c/common.c:556:13: note: place parentheses around the assignment to silence this warning

                if (table = ktd(x)) {

                          ^

                    (             )

./../c/common.c:556:13: note: use '==' to turn this assignment into an equality comparison

                if (table = ktd(x)) {

                          ^

                          ==

1 warning generated.

Undefined symbols for architecture x86_64:

  "___emutls_get_address", referenced from:

      _clr in c.o

      _krr in c.o

      _orr in c.o

      _m5 in c.o

      _w1 in c.o

      _w0 in c.o

      _g8 in c.o

      ...

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [all] Error 1

==============================

I am stuck at this point, any advice would be appreciated.

Thanks

Charles Skelton

unread,
Oct 22, 2014, 8:03:30 AM10/22/14
to personal...@googlegroups.com
The default gcc from Apple is not sufficient to build for kdb+.

Can you install GCC 4.8 from Homebrew?
e.g.




--
You received this message because you are subscribed to the Google Groups "Kdb+ Personal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to personal-kdbpl...@googlegroups.com.
To post to this group, send email to personal...@googlegroups.com.
Visit this group at http://groups.google.com/group/personal-kdbplus.
For more options, visit https://groups.google.com/d/optout.

Andy

unread,
Oct 23, 2014, 5:40:51 AM10/23/14
to personal...@googlegroups.com
Thanks Charles. I got everything working fine. After installing GCC 4.8 the default was still the Apple version, so I changed the Makefile to refer to gcc-4.8. Is that the preferred way to do it, or should I used an alias or some other way to make the default compiler GCC 4.8?

Charles Skelton

unread,
Oct 23, 2014, 12:09:54 PM10/23/14
to personal...@googlegroups.com
it's really up to whatever you personally prefer; both approaches work.
Reply all
Reply to author
Forward
0 new messages