[Darshan-users] Compiling Darshan with -fPIC

Phil Carns carns at mcs.anl.gov
Mon May 5 20:12:56 CDT 2014


On 05/05/2014 03:09 PM, Carns, Philip H. wrote:
> 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.
>

I wasn't able to reproduce the CFLAGS problem, but that may be something 
that has changed in trunk (I didn't look back at previous releases).  
The --enable-shared option is pretty straightforward, though, so I went 
ahead and added that.  It will be available in 2.2.9-pre2 and later.

thanks,
-Phil

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


More information about the Darshan-users mailing list