FastFieldSolvers Forum
FastFieldSolvers Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
 All Forums
 FastFieldSolvers
 FastHenry2
 FastHenry2 compilation issues on Ubuntu 22.04.5
 New Topic  Reply to Topic
 Printer Friendly
Author  Topic Next Topic  

PPK

1 Posts

Posted - Feb 20 2025 :  11:35:53  Show Profile  Reply with Quote
I have been trying to compile WRCAD and MASTER branches of FastHenry2 and in both cases I run into the following errors:

cd src/fasthenry ; make fasthenry
make[1]: Entering directory '/home/ppk/FH/FastHenry2-master/src/fasthenry'
cc -o fasthenry -O -DFOUR -m64 induct.o gmres.o savemat_mod.o readGeom.o joelself.o writefastcap.o SetupMulti.o calcp.o SetupComputePsi.o mulSetup.o BreakupSeg.o Precond.o addgroundplane.o findpaths.o fillM.o cx_ludecomp.o parse_command_line.o default_opts.o Prec_cost.o hole.o dist_betw_fils.o mutual.o newPrecond.o deg_mutual.o barnoldi.o regurgitate.o mulGlobal.o mulDo.o mulMulti.o mulLocal.o mulMats.o direct.o uglieralloc.o capsolve.o  find_nonuni_path.o read_tree.o contact.o sparse/sparse.a -lm
/usr/bin/ld: gmres.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: readGeom.o:(.bss+0x20): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: joelself.o:(.bss+0x60): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: writefastcap.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: SetupMulti.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: calcp.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: SetupComputePsi.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: mulSetup.o:(.bss+0x2000): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: BreakupSeg.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: Precond.o:(.bss+0x0): multiple definition of `fp'; induct.o:(.bss+0x1e8): first defined here
/usr/bin/ld: Precond.o:(.bss+0x20): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: addgroundplane.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: findpaths.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: fillM.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: cx_ludecomp.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: parse_command_line.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: default_opts.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: Prec_cost.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: hole.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: dist_betw_fils.o:(.bss+0x20): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: mutual.o:(.bss+0x20): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: newPrecond.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: deg_mutual.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: barnoldi.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: regurgitate.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: mulGlobal.o:(.bss+0x400): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: mulDo.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: mulMulti.o:(.bss+0x60): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: mulLocal.o:(.bss+0x20): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: mulMats.o:(.bss+0x60): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: direct.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: capsolve.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: find_nonuni_path.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: read_tree.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
/usr/bin/ld: contact.o:(.bss+0x0): multiple definition of `timestuff'; induct.o:(.bss+0x200): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:26: fasthenry] Error 1
make[1]: Leaving directory '/home/ppk/FH/FastHenry2-master/src/fasthenry'
make: *** [Makefile:17: fasthenry] Error 2


The WRCAD looks a bit different, but it seems to boil down to the same issue.

cd src/fasthenry ; make fasthenry
make[1]: Entering directory '/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry'
cc -O -g -DFOUR   -c -o induct.o induct.c
induct.c: In function ‘main’:
induct.c:817:29: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
  817 |         sprintf(tempstr, "%d", m);
      |                             ^
In file included from /usr/include/stdio.h:894,
                 from mulGlobal.h:57,
                 from induct.h:41,
                 from induct.c:3:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output between 2 and 11 bytes into a destination of size 10
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
cc -O -g -DFOUR   -c -o gmres.o gmres.c
cc -O -g -DFOUR   -c -o savemat_mod.o savemat_mod.c
cc -O -g -DFOUR   -c -o readGeom.o readGeom.c
cc -O -g -DFOUR   -c -o joelself.o joelself.c
cc -O -g -DFOUR   -c -o writefastcap.o writefastcap.c
cc -O -g -DFOUR   -c -o SetupMulti.o SetupMulti.c
cc -O -g -DFOUR   -c -o calcp.o calcp.c
cc -O -g -DFOUR   -c -o SetupComputePsi.o SetupComputePsi.c
cc -O -g -DFOUR   -c -o mulSetup.o mulSetup.c
cc -O -g -DFOUR   -c -o BreakupSeg.o BreakupSeg.c
cc -O -g -DFOUR   -c -o Precond.o Precond.c
cc -O -g -DFOUR   -c -o addgroundplane.o addgroundplane.c
cc -O -g -DFOUR   -c -o findpaths.o findpaths.c
cc -O -g -DFOUR   -c -o fillM.o fillM.c
cc -O -g -DFOUR   -c -o cx_ludecomp.o cx_ludecomp.c
cc -O -g -DFOUR   -c -o parse_command_line.o parse_command_line.c
cc -O -g -DFOUR   -c -o default_opts.o default_opts.c
cc -O -g -DFOUR   -c -o Prec_cost.o Prec_cost.c
cc -O -g -DFOUR   -c -o hole.o hole.c
cc -O -g -DFOUR   -c -o dist_betw_fils.o dist_betw_fils.c
cc -O -g -DFOUR   -c -o mutual.o mutual.c
cc -O -g -DFOUR   -c -o newPrecond.o newPrecond.c
cc -O -g -DFOUR   -c -o deg_mutual.o deg_mutual.c
cc -O -g -DFOUR   -c -o barnoldi.o barnoldi.c
cc -O -g -DFOUR   -c -o regurgitate.o regurgitate.c
cc -O -g -DFOUR   -c -o mulGlobal.o mulGlobal.c
cc -O -g -DFOUR   -c -o mulDo.o mulDo.c
cc -O -g -DFOUR   -c -o mulMulti.o mulMulti.c
cc -O -g -DFOUR   -c -o mulLocal.o mulLocal.c
cc -O -g -DFOUR   -c -o mulMats.o mulMats.c
cc -O -g -DFOUR   -c -o direct.o direct.c
cc -O -g -DFOUR   -c -o uglieralloc.o uglieralloc.c
cc -O -g -DFOUR   -c -o capsolve.o capsolve.c
cc -O -g -DFOUR   -c -o find_nonuni_path.o find_nonuni_path.c
cc -O -g -DFOUR   -c -o read_tree.o read_tree.c
cc -O -g -DFOUR   -c -o contact.o contact.c
cd sparse; make CC=cc
make[2]: Entering directory '/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/sparse'
cc -O -g   -c -o spAllocate.o spAllocate.c
cc -O -g   -c -o spBuild.o spBuild.c
cc -O -g   -c -o spFactor.o spFactor.c
cc -O -g   -c -o spOutput.o spOutput.c
cc -O -g   -c -o spSolve.o spSolve.c
cc -O -g   -c -o spUtils.o spUtils.c
cc -O -g   -c -o spCompat.o spCompat.c
cc -O -g   -c -o spFortran.o spFortran.c
ar r   sparse.a spAllocate.o spBuild.o spFactor.o spOutput.o spSolve.o spUtils.o spCompat.o spFortran.o
ar: creating sparse.a
ranlib sparse.a
make[2]: Leaving directory '/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/sparse'
cc -o fasthenry -O -g -DFOUR induct.o gmres.o savemat_mod.o readGeom.o joelself.o writefastcap.o SetupMulti.o calcp.o SetupComputePsi.o mulSetup.o BreakupSeg.o Precond.o addgroundplane.o findpaths.o fillM.o cx_ludecomp.o parse_command_line.o default_opts.o Prec_cost.o hole.o dist_betw_fils.o mutual.o newPrecond.o deg_mutual.o barnoldi.o regurgitate.o mulGlobal.o mulDo.o mulMulti.o mulLocal.o mulMats.o direct.o uglieralloc.o capsolve.o  find_nonuni_path.o read_tree.o contact.o sparse/sparse.a -lm
/usr/bin/ld: gmres.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: readGeom.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: joelself.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: writefastcap.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: SetupMulti.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: calcp.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: SetupComputePsi.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: mulSetup.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: BreakupSeg.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: Precond.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: Precond.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/Precond.c:32: multiple definition of `fp'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/induct.c:12: first defined here
/usr/bin/ld: addgroundplane.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: findpaths.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: fillM.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: cx_ludecomp.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: parse_command_line.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: default_opts.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: Prec_cost.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: hole.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: dist_betw_fils.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: mutual.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: newPrecond.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: deg_mutual.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: barnoldi.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: regurgitate.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: mulGlobal.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: mulDo.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: mulMulti.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: mulLocal.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: mulMats.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: direct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: capsolve.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: find_nonuni_path.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: read_tree.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
/usr/bin/ld: contact.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: multiple definition of `timestuff'; induct.o:/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry/resusage.h:9: first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:26: fasthenry] Error 1
make[1]: Leaving directory '/home/ppk/FH/FastHenry2-WRCad (2)/src/fasthenry'
make: *** [Makefile:15: fasthenry] Error 2


Any ideas on how to solve this problem?

lucasmr

Brazil
5 Posts

Posted - Oct 27 2025 :  18:42:50  Show Profile  Reply with Quote
So I was trying the same thing but on kubuntu:
I found the definition of timestuff in
"resusage.h"


#ifdef FOUR
#define NOTOTHER 1
#include <sys/time.h>
#include <sys/resource.h>
struct rusage timestuff;
#endif

#ifdef FIVE
#define NOTOTHER 1
#include <sys/types.h>
#include <sys/param.h>
#include <sys/times.h>
struct tms timestuff;
#endif

/* define macros for time and resident memory usage checks */

static double dtime = 0.0;
static long sectime, utime;

#ifdef NOTOTHER

#ifdef FOUR                     /* 4.2,3BSD (tested: Sun4, IBM6000, DEC5000) */
#define starttimer getrusage(RUSAGE_SELF, ×tuff); \
sectime = timestuff.ru_utime.tv_sec; \
utime = timestuff.ru_utime.tv_usec
#define stoptimer getrusage(RUSAGE_SELF, ×tuff); \
dtime = (double)(timestuff.ru_utime.tv_sec - sectime) \
        + 1.0e-6*(double)(timestuff.ru_utime.tv_usec - utime)
#define DUMPRSS                 /*  */
#endif /* FOUR */

#ifdef FIVE                     /* for System V (tested: HP300) */
#define starttimer times(×tuff); \
utime = timestuff.tms_utime
#define stoptimer times(×tuff); \
dtime = (timestuff.tms_utime)-utime; \
dtime /= HZ
#define DUMPRSS                 /*  */
#endif /* FIVE */

#else                           /* default - no timers */

#define starttimer              /*  */
#define stoptimer               /*  */
#define DUMPRSS                 /*  */

#endif /* NOTOTHER */


I think it has to do with some compatibility flags, flags but I really don't understand it.


Lucas Medeiros

Edited by - lucasmr on Oct 27 2025 20:23:05
Go to Top of Page

lucasmr

Brazil
5 Posts

Posted - Oct 27 2025 :  20:22:40  Show Profile  Reply with Quote
I think I found the problem. GCC has changed to be more extrict.
It is explained here
ht*ps://w*w.openmx-square.org/forum/patio.cgi?mode=view&no=2904

It seems the solution is to add extern to the definiton of timestuff in resusage.h

however now I have the following problem

cc -o fasthenry -O -DFOUR -m64  induct.o gmres.o savemat_mod.o readGeom.o joelself.o writefastcap.o SetupMulti.o calcp.o SetupComputePsi.o mulSetup.o BreakupSeg.o Precond.o addgroundplane.o findpaths.o fillM.o cx_ludecomp.o parse_command_line.o default_opts.o Prec_cost.o hole.o dist_betw_fils.o mutual.o newPrecond.o deg_mutual.o barnoldi.o regurgitate.o mulGlobal.o mulDo.o mulMulti.o mulLocal.o mulMats.o direct.o uglieralloc.o capsolve.o  find_nonuni_path.o read_tree.o contact.o sparse/sparse.a -lm
/usr/bin/ld: Precond.o:(.bss+0x0): multiple definition of `fp'; induct.o:(.bss+0x1e8): first defined here
/usr/bin/ld: capsolve.o: warning: relocation against `timestuff' in read-only section `.text'
/usr/bin/ld: induct.o: in function `main':
induct.c:(.text+0x2e91): undefined reference to `timestuff'
/usr/bin/ld: induct.c:(.text+0x2ea2): undefined reference to `timestuff'
/usr/bin/ld: induct.c:(.text+0x2eb0): undefined reference to `timestuff'
/usr/bin/ld: induct.c:(.text+0x31e6): undefined reference to `timestuff'
/usr/bin/ld: induct.c:(.text+0x31fa): undefined reference to `timestuff'
/usr/bin/ld: induct.o:induct.c:(.text+0x3219): more undefined references to `timestuff' follow
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make: *** [Makefile:26: fasthenry] Error 1



Lucas Medeiros
Go to Top of Page

lucasmr

Brazil
5 Posts

Posted - Oct 27 2025 :  21:02:32  Show Profile  Reply with Quote
[SOLUTION]

you should add static keyword to timestuff definition in resusage.h

also add static to FILE* fp in precond.c

Lucas Medeiros
Go to Top of Page
   Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
FastFieldSolvers Forum © 2020 FastFieldSolvers S.R.L. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.06