Skip to content

Compiling problem:

5 messages · Conrad Stack, Simon Urbanek

#
Conrad,
On Jul 12, 2010, at 4:57 PM, Conrad Stack wrote:

            
Unfortunately http://code.google.com/p/brownie/source/checkout doesn't even compile so I don't think we can help you any further. From experience I would still bet on the package flags being wrong (it's a bit tedious to debug since symbols are only resolved at load time, not at link time) but we can't tell without the package.

Cheers,
Simon
#
Thanks, Conrad,

finally, I can give you some more targeted suggestions. I'll cover several issues (those will bite you later), not just the one that breaks.

a) configure
You have the order of check switched - you're first checking for the compiler (AC_LANG etc.) and only then setting the right one from R. The order should be reversed since you first need to find the compiler and only then check it.

b) Brownie makefile
The one is really hard-wired so it won't work since you have flags like -m32 in there so you end up with things like g++ -arch x86_64 -m32 .. which cannot work. Also compilation should not include $(LNK_OPTIONS) [you don't need them at all since you're not linking anything anyway]. In fact it would be much better to just take the flags from R since you are also missing PIC flags and they will be needed: although you are compiling a static library it will be linked into a dynamic object so it has to be PIC. 

c) Now, the real meat is in the linker flags in RBrownie - and the compiler actually tells you what the mistake is:

ld: warning: path './brownie_src/libBrownie.a' following -L not a directory

You didn't really mean to sdd the libBrownie.a directory to be the search path - you really meant to use the library so your configure should read

AC_SUBST([LDFLAGS],["brownie_src/libBrownie.a  ${LIBS} ${RCPP_LIB} "])

... and with that it works.

Cheers,
Simon
On Jul 13, 2010, at 2:05 PM, Conrad Stack wrote:

            
3 days later