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

François Trahay francois.trahay at telecom-sudparis.eu
Wed Nov 13 03:37:01 CST 2019


After investigating, it seems that the problem appears with debian 
bullseyes (ie. debian testing with glibc version 2.29-3), but not with 
debian buster (debian stable with glibc version 2.28-10).


To reproduce the bug, I created the attached Dockerfile:


$ cd <PATH_TO_DOCKERFILE>

$  docker build -t bug-darshan-isoc99_fscan .

[...]

$ docker run -it bug-darshan-isoc99_fscan /bin/bash

root at 8da9b1d93ddd:/# cd darshan/darshan-runtime/

root at 8da9b1d93ddd:/darshan/darshan-runtime# make

[...]

/tmp/ccfbBbgz.s: Assembler messages:
/tmp/ccfbBbgz.s:7769: Error: symbol `__isoc99_fscanf' is already defined
make: *** [Makefile:143: lib/darshan-stdio.po] Error 1
root at 8da9b1d93ddd:/darshan/darshan-runtime#



You can build a docker image running debian stable (where the problem 
does not appear) by replacing


FROM debian:testing-slim
with

FROM debian:stable


in the Dockerfile.


François



On 12/11/2019 18:53, Carns, Philip H. wrote:
> Thanks for the bug report.  It looks like maybe __isoc99_fscanf() is 
> defined (rather than just declared) in a header on your system.
>
> Can you tell us a little more about your laptop (what OS/version it 
> is, and what version of glibc it is using)?
>
> thank you,
> -Phil
> ------------------------------------------------------------------------
> *From:* Darshan-users <darshan-users-bounces at lists.mcs.anl.gov> on 
> behalf of François Trahay via Darshan-users 
> <darshan-users at lists.mcs.anl.gov>
> *Sent:* Tuesday, November 12, 2019 6:05 AM
> *To:* darshan-users at lists.mcs.anl.gov <darshan-users at lists.mcs.anl.gov>
> *Subject:* [Darshan-users] Error: symbol `__isoc99_fscanf' is already 
> defined
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-users/attachments/20191113/82f6d5d2/attachment.html>
-------------- next part --------------
FROM debian:testing-slim

RUN apt-get update -yq \
&& apt-get install gcc gfortran autoconf automake libmpich-dev mpich git zlib1g-dev make -yq

RUN git clone https://xgitlab.cels.anl.gov/darshan/darshan.git
RUN cd darshan/darshan-runtime/ ;  ./configure --prefix=$PWD/install CC=mpicc --with-mem-align=8  --with-log-path=/tmp/log_darshan --with-jobid-env=NONE


More information about the Darshan-users mailing list