[MINC-development] MINC, RMINC and -fPIC
Andrew Janke
a.janke at gmail.com
Thu Jul 15 10:42:27 EDT 2010
Hi all,
I have had a request from the RMINC people to add -fPIC when building
MINC so that they can dynamically load "stuff".
I can't see this being a problem but wanted to check with others first.
To achieve this, the easiest way is to just remove this:
AC_DISABLE_SHARED
from configure.in
I have included an explanation of this from Jim, one of the RMINC people below.
a
---
Hi Andrew,
... building RMINC on x86_64 fails
because the RMINC shared object that gets dynamically loaded into R at
run-time, is unable to link to the minc2 library. This is because
under x86_64, the linker needs the minc library to be generated with
position independent code ("-fPIC" compile option), prior to linking
with the RMINC shared object. Now, shared libraries default to
generating fPIC code, so linking a shared minc2 library is not a
problem. On the other hand, when building a static minc library, fPIC
is not used by default, so it needs to be added. In my testing, RMINC
linked without problem to a static minc lib IFF the fPIC switch was
used during the minc build. So, it seems to me that given that:
(1) we want to release a new version of RMINC in the very near future
(2) Andrew's pre-compiled binaries for 64-bit Lucid deliver only a
static minc lib
(3) more and more people are using 64-bit systems
... we need to have minc built with the -fPIC option, and have a new
mincbundle generated that references the new minc. I, of course,
stand ready to test. Comments? Suggestions? Deriding laughter?
Cheers,
-jim
--
=================================
Jim Nikelski, Ph.D.
Postdoctoral Research Fellow
Bloomfield Centre for Research in Aging
Lady Davis Institute for Medical Research
Sir Mortimer B. Davis - Jewish General Hospital
McGill University
More information about the MINC-development
mailing list