[Darshan-users] Error: symbol `__isoc99_fscanf' is already defined

Shane Snyder ssnyder at mcs.anl.gov
Fri Feb 14 08:54:56 CST 2020


FYI, we did finally commit a fix for this bug on our master branch, and 
we'll include it in the 3.2.0 release.

Newer libc implementations were defining two of the fscanf family of 
functions we intercept (fscanf & __isoc99_fscanf) as aliases using 
assembler tricks, which was leading to the multiple definitions error. 
We now detect this behavior at configure time and only enable one of the 
wrappers in that case.

Thanks again for the bug report.

--Shane

On 11/12/19 5:05 AM, François Trahay via Darshan-users wrote:
> Hi,
>
> I'm having problems compiling Darshan on my laptop running Debian 
> buster with MPICH-3.3.
>
> Here's how I compile:
>
> $ git clone https://xgitlab.cels.anl.gov/darshan/darshan.git
>
> $ cd darshan/darshan-runtime
>
> $ ./configure --prefix=$PWD/install CC=mpicc --with-mem-align=8 
> --with-log-path=/tmp/log_darshan --with-jobid-env=NONE
>
> $ make
>
> [...]
>
> mpicc -DDARSHAN_CONFIG_H=\"darshan-runtime-config.h\" -I . -I. -I./../ 
> -g -O2  -D_LARGEFILE64_SOURCE -shared -fpic -DPIC -DDARSHAN_PRELOAD -c 
> lib/darshan-stdio.c -o lib/darshan-stdio.po
> /tmp/cc6UpHUi.s: Assembler messages:
> /tmp/cc6UpHUi.s:7769: Error: symbol `__isoc99_fscanf' is already defined
> make: *** [Makefile:143: lib/darshan-stdio.po] Error 1
>
>
> The preprocessed file (darshan-stdio.c)  is attached. The problem is 
> probably due to line 585 (in the preprocessed source code) :
>
> extern int fscanf (FILE *__restrict __stream, const char *__restrict 
> __format, ...) __asm__ ("" "__isoc99_fscanf")
>
> If I comment this line, the compilation succeeds.
>
>
> François
>
>
> _______________________________________________
> Darshan-users mailing list
> Darshan-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/darshan-users

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


More information about the Darshan-users mailing list