[MINC-development] MINC, RMINC and -fPIC

Steve M. Robbins steve at sumost.ca
Sat Jul 24 13:08:12 EDT 2010


On Fri, Jul 16, 2010 at 12:42:27AM +1000, Andrew Janke wrote:
> 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 no objection to that change.  

Note, however, that all it does is specify that shared libraries are
not build BY DEFAULT.  With the existing package, you can still
create shared libs (I do it in the Debian packages) using:

	./configure --enable-shared ...



> On the other hand, when building a static minc library, fPIC
> is not used by default, so it needs to be added.

I don't think you want -fPIC on static libs as a general rule.  I
can't find the reference but my recollection is that it causes
a problem on some architectures.


> 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?

I think that creating binary builds with --enable-shared will do the
trick.  However, recall that the reason AC_DISABLE_SHARED is present
in configure.in is because installing a shared lib into a directory
not searched by default causes naive users a lot of grief.  We used to
build into /usr/local/mni by default (which is not searched at
runtime).  Not sure what the present practice is.


-Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://www.bic.mni.mcgill.ca/pipermail/minc-development/attachments/20100724/91cf2004/attachment.pgp>


More information about the MINC-development mailing list