[Darshan-users] Compiling Darshan with -fPIC

Phil Carns carns at mcs.anl.gov
Mon May 5 14:09:36 CDT 2014


On 05/05/2014 09:00 AM, Matthieu Dorier wrote:
> Hi,
>
> While installing Darshan-Ruby on a new plateforme (Debian with Linux 
> kernel 3.2.0 amd64 and gcc 4.7), I encountered a compilation error, 
> basically asking me to recompile Darshan with -fPIC.
> I tried to use CFLAGS=-fPIC but, I don't know why, it didn't work. I 
> ended up changing the Makefile.in of Darshan, line 59 and 60, to the 
> following:
>
>
> darshan-logutils.o: darshan-logutils.c
>       $(CC) $(CFLAGS) -fPIC -c $< -o $@
>
>
> Maybe it could be useful to add the options of compiling Darshan with 
> or without PIC (with PIC enabled by default), or even some kind of 
> --enable-shared option to produce a libdarshan-util.so?
>
> Best,
>
> Matthieu Dorier
> PhD student at ENS Rennes
> http://people.irisa.fr/Matthieu.Dorier

Thanks for the bug report Matthieu.   Which version of Darshan was this?

Is the PIC option required for Darshan-Ruby to use the libdarshan-util 
library correctly, or did you need to add it for libdarshan-util to 
build cleanly at all on this platform?

I'll definitely look into this further.  At a minimum we should fix the 
CFLAGS issue so that you can pass in custom flags.

thanks,
-Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-users/attachments/20140505/b227c310/attachment.html>


More information about the Darshan-users mailing list