micans / mcl

MCL, the Markov Cluster algorithm, also known as Markov Clustering, is a method and program for clustering weighted or simple networks, a.k.a. graphs.
https://micans.org/mcl
Other
89 stars 12 forks source link

Multiple definitions when installing on Windows via Cygwin #10

Closed RaisssHab closed 2 years ago

RaisssHab commented 2 years ago

It configured fine, but during 'make install' I got multiple definitions error. As it's large enough, I'll copy a part of it:

gcc  -g -O2  -lm  -o clmformat.exe clmformat.o report.o ../mcl/libmcl.a ../clew/libclew.a  ../gryphon/libgryphon.a ../impala/libimpala.a ../../util/libutil.a -lm
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: report.o:/cygdrive/c/Users/raish/Downloads/22.08.2022 Работа/mcl-14-137/src/shcl/../../src/impala/iface.h:27: multiple definition of `mclx_n_thread_g'; clmformat.o:/cygdrive/c/Users/raish/Downloads/22.08.2022 Работа/mcl-14-137/src/shcl/../../src/impala/iface.h:27: first defined here
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: report.o:/cygdrive/c/Users/raish/Downloads/22.08.2022 Работа/mcl-14-137/src/shcl/../../src/impala/iface.h:25: multiple definition of `nu_magic'; clmformat.o:/cygdrive/c/Users/raish/Downloads/22.08.2022 Работа/mcl-14-137/src/shcl/../../src/impala/iface.h:25: first defined here
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: report.o:/cygdrive/c/Users/raish/Downloads/22.08.2022 Работа/mcl-14-137/src/shcl/../../src/impala/iface.h:24: multiple definition of `nu_diff_zip'; clmformat.o:/cygdrive/c/Users/raish/Downloads/22.08.2022 Работа/mcl-14-137/src/shcl/../../src/impala/iface.h:24: first defined here
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: report.o:/cygdrive/c/Users/raish/Downloads/22.08.2022 Работа/mcl-14-137/src/shcl/../../src/impala/iface.h:23: multiple definition of `nu_diff_sl'; clmformat.o:/cygdrive/c/Users/raish/Downloads/22.08.2022 Работа/mcl-14-137/src/shcl/../../src/impala/iface.h:23: first defined here
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: report.o:/cygdrive/c/Users/raish/Downloads/22.08.2022 Работа/mcl-14-137/src/shcl/../../src/impala/iface.h:22: multiple definition of `nu_diff_can'; clmformat.o:/cygdrive/c/Users/raish/Downloads/22.08.2022 Работа/mcl-14-137/src/shcl/../../src/impala/iface.h:22: first defined here
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: report.o:/cygdrive/c/Users/raish/Downloads/22.08.2022 Работа/mcl-14-137/src/shcl/../../src/impala/iface.h:21: multiple definition of `nu_meet_zip'; clmformat.o:/cygdrive/c/Users/raish/Downloads/22.08.2022 Работа/mcl-14-137/src/shcl/../../src/impala/iface.h:21: first defined here
micans commented 2 years ago

Hi, this was also reported in #3. I have a lot of commits pending, one of which will fix this. For now, can you get this file: https://github.com/micans/mcl/blob/drift/src/impala/iface.h to replace the one you have. I'm not 100% sure this will fix all such occurrences but let's start there. Apologies for the slightlly messy situation, all development has been focused on a new method for integrating multiple clusterings.

RaisssHab commented 2 years ago

Hello. The solution has worked. But instead of

#include "tingea/io.h"
#include "tingea/inttypes.h"

you should use the existing includes from the old file.