# Problem when compiling SCALAPACK

**URL:** https://community.freefem.org/t/problem-when-compiling-scalapack/587
**Category:** FreeFEM installation
**Created:** [September 22, 2020, 8:45am UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587 "2020-09-22T08:45:14Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![nabil3achour](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@nabil3achour](https://community.freefem.org/u/nabil3achour)
#### Post date: [September 22, 2020, 8:45am UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/1 "2020-09-22T08:45:14Z")

</div>

Dear all  
We are trying to install FreeFem (from git) on a MacBook (macOS 10.15.6). We have a problem at the 'make petsc-slepc ’ stage when compiling SCALAPACK.  
Below is the error message. We don’t understand why the compiler wants to use c99 at this stage.  
Is this problem identified ?

Thanks for help  
Nabil & David

* * *

**igsum2d\_.c:153:7:**  **error:** **implicit declaration of function ‘BI\_imvcopy’ is invalid in C99 [-Werror,-Wimplicit-function-declaration]**

BI\_imvcopy(Mpval(m), Mpval(n), A, tlda, bp-\>Buff);

**^**

**igsum2d\_.c:166:6:**  **error:** **implicit declaration of function ‘BI\_ivmcopy’ is invalid in C99 [-Werror,-Wimplicit-function-declaration]**

BI\_ivmcopy(Mpval(m), Mpval(n), A, tlda, bp2-\>Buff);

**^**

**igsum2d\_.c:172:3:**  **error:** **implicit declaration of function ‘BI\_ivmcopy’ is invalid in C99 [-Werror,-Wimplicit-function-declaration]**

BI\_ivmcopy(Mpval(m), Mpval(n), A, tlda, bp2-\>Buff);

**^**

**igsum2d\_.c:226:10:**  **error:** **implicit declaration of function ‘BI\_ivmcopy’ is invalid in C99 [-Werror,-Wimplicit-function-declaration]**

BI\_ivmcopy(Mpval(m), Mpval(n), A, tlda, bp-\>Buff);

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [September 22, 2020, 8:52am UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/2 "2020-09-22T08:52:33Z")

</div>

Are you voluntarily using the `-Werror` flag? This should be fixed in PETSc 3.14.0 coming at the end of the month.

---

<div class="post-metadata">

### Author: ![david.fabre](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@david.fabre](https://community.freefem.org/u/david.fabre)
#### Post date: [September 22, 2020, 9:07am UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/3 "2020-09-22T09:07:10Z")

</div>

Thanks Pierre For answer.  
I don’t think we volontarily use Werror flag, how can we disable this ?

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [September 22, 2020, 9:10am UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/4 "2020-09-22T09:10:24Z")

</div>

I’m cooking something for you, please give me a couple of minutes 😄

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [September 22, 2020, 9:43am UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/5 "2020-09-22T09:43:53Z")

</div>

Could you please try the branch `petsc-3.14.0`? This branch installs a very recent snapshot of PETSc (from this morning), which should fix this issue, and which is very close to the upcoming PETSc release 3.14.0. So if you agree to be a guinea pig, I’d be really grateful if you report FreeFEM/PETSc error with this branch 🙂 (I’ve made a good deal of troubleshooting myself, so it should be a clean process, but you never know…)  
By the way, it will also install ARPACK from SLEPc, so it would be interesting to see if you still have `make check` failures in `examples/eigen`.

```auto
$ git clone -b petsc-3.14.0 https://github.com/FreeFem/FreeFem-sources
$ cd FreeFem-sources && autoreconf -i
$ ./configure --enable-download --prefix=~/FreeFem-install
$ cd 3rdparty/ff-petsc && make petsc-slepc
$ cd - && ./reconfigure
$ make && make check

```

---

<div class="post-metadata">

### Author: ![nabil3achour](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@nabil3achour](https://community.freefem.org/u/nabil3achour)
#### Post date: [September 22, 2020, 11:53am UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/6 "2020-09-22T11:53:22Z")

</div>

Hello,

At the stage “make petsc-slepc”, it show me this error message:

```
> **************************ERROR*************************************
> 
> Error building SLEPc. Check fr/lib/petsc/conf/slepc.log
> 
> ********************************************************************
> 
> make[3]: *** [slepcbuild] Error 1
> 
> make[2]: *** [install] Error 2
> 
> make[1]: *** [install] Error 2
> 
> make: *** [petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/tag-install-real] Error 2

```

The fr/lib/petsc/conf/slepc.log file contains :

\*Checking environment… \*  
_Cleaning arch dir /Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/externalpackages/git.slepc/installed-arch-darwin-c-opt…_  
_done_  
_Checking PETSc installation… done_  
_Checking LAPACK library… done_  
_Checking SCALAPACK… done_  
\*Installing ARPACK version 3.7.0… \*  
_ERROR: Installation of ARPACK failed_  
_ERROR: See “installed-arch-darwin-c-opt/lib/slepc/conf/configure.log” file for details_

Could you help me to fix this problem please?

Thanks

Nabil

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [September 22, 2020, 11:56am UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/7 "2020-09-22T11:56:18Z")

</div>

Could you please share `/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/externalpackages/git.slepc/installed-arch-darwin-c-opt/lib/slepc/conf/configure.log` here?

BTW, that’s a “good” error, it means that ScaLAPACK was successfully installed (SLEPc is installed _after_ ScaLAPACK).

---

<div class="post-metadata">

### Author: ![david.fabre](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@david.fabre](https://community.freefem.org/u/david.fabre)
#### Post date: [September 22, 2020, 12:13pm UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/8 "2020-09-22T12:13:25Z")

</div>

Thanks Pierre !  
i will also try your branch tonight  
(I prefer if my computer plays the ginea pig while I’l sleeping 🙂 )

---

<div class="post-metadata">

### Author: ![nabil3achour](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@nabil3achour](https://community.freefem.org/u/nabil3achour)
#### Post date: [September 22, 2020, 12:27pm UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/9 "2020-09-22T12:27:52Z")

</div>

Thank,  
you may find the configure.log file in the following link: [configure.log](https://filesender.renater.fr/?s=download&token=0208abee-493f-4d52-a27e-3f714fb05fa7)

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [September 22, 2020, 12:28pm UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/10 "2020-09-22T12:28:39Z")

</div>

Unfortunately, that’s not at all the file I asked for.

---

<div class="post-metadata">

### Author: ![nabil3achour](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@nabil3achour](https://community.freefem.org/u/nabil3achour)
#### Post date: [September 22, 2020, 12:30pm UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/11 "2020-09-22T12:30:34Z")

</div>

================================================================================  
Starting Configure Run at Tue Sep 22 13:36:31 2020  
Configure Options: --with-clean=1 --prefix=/Users/nabilachour/FreeFem-install/ff-petsc/r --download-arpack=https://github.com/prj-/arpack-ng/archive/94a5e1128dce0630cf26725247e18c787ce7f877.tar.gz  
Working directory: /Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/externalpackages/git.slepc  
Python version:  
3.8.5 (default, Jul 21 2020, 10:48:26)  
[Clang 11.0.3 (clang-1103.0.32.62)]  
make: /usr/bin/make  
PETSc source directory: /Users/nabilachour/FreeFem-install/ff-petsc/r  
PETSc install directory: /Users/nabilachour/FreeFem-install/ff-petsc/r  
PETSc version: 3.13.5  
SLEPc source directory: /Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/externalpackages/git.slepc  
SLEPc install directory: /Users/nabilachour/FreeFem-install/ff-petsc/r  
SLEPc version: 3.13.4

# Cleaning arch dir /Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/externalpackages/git.slepc/installed-arch-darwin-c-opt…

Checking PETSc installation…

* * *

Checking link with code:

#include “petscsnes.h”  
int main() {  
Vec v; Mat m; KSP k;  
PetscInitializeNoArguments();  
VecCreate(PETSC\_COMM\_WORLD,&v);  
MatCreate(PETSC\_COMM\_WORLD,&m);  
KSPCreate(PETSC\_COMM\_WORLD,&k);  
return 0;  
}

* * *

Running command:  
cd /var/folders/4p/4lsnvzr955j0wmrcj9tjtgkm0000gn/T/slepc-h1o8etrk;/usr/bin/make checklink LINKFLAGS=""

* * *

Output:  
/usr/local/bin/mpicc -o checklink.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fno-stack-check -Qunused-arguments -fvisibility=hidden -O3 -mtune=native -I/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/include -I/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/include -I/Users/nabilachour/FreeFem-install/ff-petsc/r/include `pwd`/checklink.c  
/usr/local/bin/mpicc -Wl,-multiply\_defined,suppress -Wl,-multiply\_defined -Wl,suppress -Wl,-commons,use\_dylibs -Wl,-search\_paths\_first -Wl,-no\_compact\_unwind -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fno-stack-check -Qunused-arguments -fvisibility=hidden -O3 -mtune=native -o checklink checklink.o -Wl,-rpath,/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/lib -L/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/lib -Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -framework Accelerate -Wl,-rpath,/usr/local/Cellar/mpich/3.3.2\_1/lib -L/usr/local/Cellar/mpich/3.3.2\_1/lib -Wl,-rpath,/usr/local/Cellar/gcc/10.2.0/lib/gcc/10/gcc/x86\_64-apple-darwin19/10.2.0 -L/usr/local/Cellar/gcc/10.2.0/lib/gcc/10/gcc/x86\_64-apple-darwin19/10.2.0 -Wl,-rpath,/usr/local/Cellar/gcc/10.2.0/lib/gcc/10 -L/usr/local/Cellar/gcc/10.2.0/lib/gcc/10 -lpetsc -lHYPRE -lcmumps -ldmumps -lsmumps -lzmumps -lmumps\_common -lpord -lscalapack -lumfpack -lklu -lcholmod -lbtf -lccolamd -lcolamd -lcamd -lamd -lsuitesparseconfig -lsuperlu -lptesmumps -lptscotchparmetis -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr -lparmetis -lmetis -ltet -lc++ -ldl -lmpifort -lmpi -lpmpi -lgfortran -lquadmath -lm -lc++ -ldl

* * *

================================================================================  
Checking LAPACK library…  
=== Checking all LAPACK functions…

* * *

Checking link with code:

extern void dlaev2\_();  
extern void dgehrd\_();  
extern void dlanhs\_();  
extern void dtrexc\_();  
extern void dtrevc\_();  
extern void dtgexc\_();  
extern void dtgevc\_();  
extern void dstedc\_();  
extern void dhsein\_();  
extern void dlarfg\_();  
extern void dlarf\_();  
extern void dlascl\_();  
extern void dtrsyl\_();  
extern void dorghr\_();  
extern void dsytrd\_();  
extern void dorgtr\_();  
extern void dstevr\_();  
extern void dbdsdc\_();  
extern void dlag2\_();  
extern void dlasv2\_();  
extern void dlartg\_();  
extern void dlaed4\_();  
extern void dlamrg\_();  
int main() {  
dlaev2\_();  
dgehrd\_();  
dlanhs\_();  
dtrexc\_();  
dtrevc\_();  
dtgexc\_();  
dtgevc\_();  
dstedc\_();  
dhsein\_();  
dlarfg\_();  
dlarf\_();  
dlascl\_();  
dtrsyl\_();  
dorghr\_();  
dsytrd\_();  
dorgtr\_();  
dstevr\_();  
dbdsdc\_();  
dlag2\_();  
dlasv2\_();  
dlartg\_();  
dlaed4\_();  
dlamrg\_();  
return 0;  
}

* * *

Running command:  
cd /var/folders/4p/4lsnvzr955j0wmrcj9tjtgkm0000gn/T/slepc-0c3x1xwy;/usr/bin/make checklink LINKFLAGS=""

* * *

Output:  
/usr/local/bin/mpicc -o checklink.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fno-stack-check -Qunused-arguments -fvisibility=hidden -O3 -mtune=native -I/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/include -I/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/include -I/Users/nabilachour/FreeFem-install/ff-petsc/r/include `pwd`/checklink.c  
/usr/local/bin/mpicc -Wl,-multiply\_defined,suppress -Wl,-multiply\_defined -Wl,suppress -Wl,-commons,use\_dylibs -Wl,-search\_paths\_first -Wl,-no\_compact\_unwind -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fno-stack-check -Qunused-arguments -fvisibility=hidden -O3 -mtune=native -o checklink checklink.o -Wl,-rpath,/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/lib -L/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/lib -Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -framework Accelerate -Wl,-rpath,/usr/local/Cellar/mpich/3.3.2\_1/lib -L/usr/local/Cellar/mpich/3.3.2\_1/lib -Wl,-rpath,/usr/local/Cellar/gcc/10.2.0/lib/gcc/10/gcc/x86\_64-apple-darwin19/10.2.0 -L/usr/local/Cellar/gcc/10.2.0/lib/gcc/10/gcc/x86\_64-apple-darwin19/10.2.0 -Wl,-rpath,/usr/local/Cellar/gcc/10.2.0/lib/gcc/10 -L/usr/local/Cellar/gcc/10.2.0/lib/gcc/10 -lpetsc -lHYPRE -lcmumps -ldmumps -lsmumps -lzmumps -lmumps\_common -lpord -lscalapack -lumfpack -lklu -lcholmod -lbtf -lccolamd -lcolamd -lcamd -lamd -lsuitesparseconfig -lsuperlu -lptesmumps -lptscotchparmetis -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr -lparmetis -lmetis -ltet -lc++ -ldl -lmpifort -lmpi -lpmpi -lgfortran -lquadmath -lm -lc++ -ldl

* * *

================================================================================  
Checking SCALAPACK…

* * *

Running command:  
cd /var/folders/4p/4lsnvzr955j0wmrcj9tjtgkm0000gn/T/slepc-t\_z\_4rpm;/usr/bin/make checklink LINKFLAGS=""

* * *

Output:  
/usr/local/bin/mpicc -o checklink.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fno-stack-check -Qunused-arguments -fvisibility=hidden -O3 -mtune=native -I/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/include -I/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/include -I/Users/nabilachour/FreeFem-install/ff-petsc/r/include `pwd`/checklink.c  
/usr/local/bin/mpicc -Wl,-multiply\_defined,suppress -Wl,-multiply\_defined -Wl,suppress -Wl,-commons,use\_dylibs -Wl,-search\_paths\_first -Wl,-no\_compact\_unwind -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fno-stack-check -Qunused-arguments -fvisibility=hidden -O3 -mtune=native -o checklink checklink.o -Wl,-rpath,/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/lib -L/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/lib -Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -framework Accelerate -Wl,-rpath,/usr/local/Cellar/mpich/3.3.2\_1/lib -L/usr/local/Cellar/mpich/3.3.2\_1/lib -Wl,-rpath,/usr/local/Cellar/gcc/10.2.0/lib/gcc/10/gcc/x86\_64-apple-darwin19/10.2.0 -L/usr/local/Cellar/gcc/10.2.0/lib/gcc/10/gcc/x86\_64-apple-darwin19/10.2.0 -Wl,-rpath,/usr/local/Cellar/gcc/10.2.0/lib/gcc/10 -L/usr/local/Cellar/gcc/10.2.0/lib/gcc/10 -lpetsc -lHYPRE -lcmumps -ldmumps -lsmumps -lzmumps -lmumps\_common -lpord -lscalapack -lumfpack -lklu -lcholmod -lbtf -lccolamd -lcolamd -lcamd -lamd -lsuitesparseconfig -lsuperlu -lptesmumps -lptscotchparmetis -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr -lparmetis -lmetis -ltet -lc++ -ldl -lmpifort -lmpi -lpmpi -lgfortran -lquadmath -lm -lc++ -ldl

* * *

# ====== With underscore Fortran names #include “petscsnes.h” PETSC\_EXTERN int pdsyev\_(); PETSC\_EXTERN int pdsygvx\_(); PETSC\_EXTERN int pdgesvd\_(); int main() { Vec v; Mat m; KSP k; PetscInitializeNoArguments(); VecCreate(PETSC\_COMM\_WORLD,&v); MatCreate(PETSC\_COMM\_WORLD,&m); KSPCreate(PETSC\_COMM\_WORLD,&k); pdsyev\_(); pdsygvx\_(); pdgesvd\_(); return 0; } /usr/local/bin/mpicc -o checklink.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fno-stack-check -Qunused-arguments -fvisibility=hidden -O3 -mtune=native -I/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/include -I/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/include -I/Users/nabilachour/FreeFem-install/ff-petsc/r/include `pwd`/checklink.c /usr/local/bin/mpicc -Wl,-multiply\_defined,suppress -Wl,-multiply\_defined -Wl,suppress -Wl,-commons,use\_dylibs -Wl,-search\_paths\_first -Wl,-no\_compact\_unwind -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fno-stack-check -Qunused-arguments -fvisibility=hidden -O3 -mtune=native -o checklink checklink.o -Wl,-rpath,/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/lib -L/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/lib -Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -framework Accelerate -Wl,-rpath,/usr/local/Cellar/mpich/3.3.2\_1/lib -L/usr/local/Cellar/mpich/3.3.2\_1/lib -Wl,-rpath,/usr/local/Cellar/gcc/10.2.0/lib/gcc/10/gcc/x86\_64-apple-darwin19/10.2.0 -L/usr/local/Cellar/gcc/10.2.0/lib/gcc/10/gcc/x86\_64-apple-darwin19/10.2.0 -Wl,-rpath,/usr/local/Cellar/gcc/10.2.0/lib/gcc/10 -L/usr/local/Cellar/gcc/10.2.0/lib/gcc/10 -lpetsc -lHYPRE -lcmumps -ldmumps -lsmumps -lzmumps -lmumps\_common -lpord -lscalapack -lumfpack -lklu -lcholmod -lbtf -lccolamd -lcolamd -lcamd -lamd -lsuitesparseconfig -lsuperlu -lptesmumps -lptscotchparmetis -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr -lparmetis -lmetis -ltet -lc++ -ldl -lmpifort -lmpi -lpmpi -lgfortran -lquadmath -lm -lc++ -ldl

Installing ARPACK version 3.7.0…  
Downloading [https://github.com/prj-/arpack-ng/archive/94a5e1128dce0630cf26725247e18c787ce7f877.tar.gz](https://github.com/prj-/arpack-ng/archive/94a5e1128dce0630cf26725247e18c787ce7f877.tar.gz) to /Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/externalpackages/git.slepc/installed-arch-darwin-c-opt/externalpackages/arpack-ng-3.7.0.tar.gz  
Uncompressing /Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/externalpackages/git.slepc/installed-arch-darwin-c-opt/externalpackages/arpack-ng-3.7.0.tar.gz to directory /Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/externalpackages/git.slepc/installed-arch-darwin-c-opt/externalpackages/arpack-ng-3.7.0

* * *

Running command:  
cd /Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/externalpackages/git.slepc/installed-arch-darwin-c-opt/externalpackages; chmod -R a+r arpack-ng-94a5e1128dce0630cf26725247e18c787ce7f877; find arpack-ng-94a5e1128dce0630cf26725247e18c787ce7f877 -type d -name “\*” -exec chmod a+rx {} ;

* * *

Output:

* * *

* * *

Running command:  
autoreconf --help

* * *

Output:  
Usage: /usr/local/autoconf/bin/autoreconf [OPTION]… [DIRECTORY]…

Run `autoconf' (and `autoheader’, `aclocal', `automake’, `autopoint' (formerly `gettextize’), and `libtoolize' where appropriate) repeatedly to remake the GNU Build System files in specified DIRECTORIES and their subdirectories (defaulting to `.’).

By default, it only remakes those files that are older than their  
sources. If you install new versions of the GNU Build System,  
you can make `autoreconf' remake all of the files by giving it the `–force’ option.

Operation modes:  
-h, --help print this help, then exit  
-V, --version print version number, then exit  
-v, --verbose verbosely report processing  
-d, --debug don’t remove temporary files  
-f, --force consider all files obsolete  
-i, --install copy missing auxiliary files  
–no-recursive don’t rebuild sub-packages  
-s, --symlink with -i, install symbolic links instead of copies  
-m, --make when applicable, re-run ./configure && make  
-W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax]

Warning categories include:  
`cross' cross compilation issues `gnu’ GNU coding standards (default in gnu and gnits modes)  
`obsolete' obsolete features or constructions `override’ user redefinitions of Automake rules or variables  
`portability' portability issues (default in gnu and gnits modes) `syntax’ dubious syntactic constructs (default)  
`unsupported' unsupported or incomplete features (default) `all’ all the warnings  
`no-CATEGORY' turn off warnings in CATEGORY `none’ turn off all the warnings  
`error’ treat warnings as errors

The environment variable `WARNINGS' is honored. Some subtools might support other warning types, using `all’ is encouraged.

Library directories:  
-B, --prepend-include=DIR prepend directory DIR to search path  
-I, --include=DIR append directory DIR to search path

The environment variables AUTOM4TE, AUTOCONF, AUTOHEADER, AUTOMAKE,  
ACLOCAL, AUTOPOINT, LIBTOOLIZE, M4, and MAKE are honored.

Report bugs to [bug-autoconf@gnu.org](mailto:bug-autoconf@gnu.org).  
GNU Autoconf home page: [http://www.gnu.org/software/autoconf/](http://www.gnu.org/software/autoconf/).  
General help using GNU software: [http://www.gnu.org/gethelp/](http://www.gnu.org/gethelp/).

* * *

* * *

Running command:  
/usr/local/bin/mpif90 --version

* * *

Output:  
GNU Fortran (Homebrew GCC 10.2.0) 10.2.0  
Copyright © 2020 Free Software Foundation, Inc.  
This is free software; see the source for copying conditions. There is NO  
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

* * *

* * *

Running command:  
cd /Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/fr/externalpackages/git.slepc/installed-arch-darwin-c-opt/externalpackages/arpack-ng-94a5e1128dce0630cf26725247e18c787ce7f877&& sh bootstrap && ./configure --prefix=/Users/nabilachour/FreeFem-install/ff-petsc/r CC="/usr/local/bin/mpicc" CFLAGS="-Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fno-stack-check -Qunused-arguments -fvisibility=hidden -O3 -mtune=native" F77="/usr/local/bin/mpif90" FFLAGS=" -ffree-line-length-0 -Wno-unused-dummy-argument -O3 -mtune=native -fallow-argument-mismatch" FC="/usr/local/bin/mpif90" FCFLAGS=" -ffree-line-length-0 -Wno-unused-dummy-argument -O3 -mtune=native -fallow-argument-mismatch" LIBS="-framework Accelerate" --enable-mpi MPICC="/usr/local/bin/mpicc" MPIF77="/usr/local/bin/mpif90" MPIFC="/usr/local/bin/mpif90" && /usr/bin/make && /usr/bin/make install

* * *

Output:  
autoreconf: Entering directory `.’  
autoreconf: configure.ac: not using Gettext  
autoreconf: running: aclocal --force -I m4  
error: you must have libtool 2.4.2 or a more recent version  
error: you must have libtool 2.4.2 or a more recent version  
autoreconf: configure.ac: tracing  
error: you must have libtool 2.4.2 or a more recent version  
autoreconf: configure.ac: creating directory build-aux  
autoreconf: configure.ac: not using Libtool  
autoreconf: running: /usr/local/mac-dev-env/autoconf-2.69/bin/autoconf --force  
error: you must have libtool 2.4.2 or a more recent version  
configure.ac:18: error: possibly undefined macro: AC\_MSG\_ERROR  
If this token and others are legitimate, please use m4\_pattern\_allow.  
See the Autoconf documentation.  
autoreconf: /usr/local/mac-dev-env/autoconf-2.69/bin/autoconf failed with exit status: 1

* * *

ERROR: Installation of ARPACK failed

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [September 22, 2020, 12:31pm UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/12 "2020-09-22T12:31:48Z")

</div>

Better! Please do `brew install libtool`, or something like that.

---

<div class="post-metadata">

### Author: ![nabil3achour](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@nabil3achour](https://community.freefem.org/u/nabil3achour)
#### Post date: [September 22, 2020, 12:41pm UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/13 "2020-09-22T12:41:50Z")

</div>

Despite the installation of libtool it show me the same error message

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [September 22, 2020, 12:42pm UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/14 "2020-09-22T12:42:57Z")

</div>

Did you run `make petsc-slepc` in a new shell? I’ll try to find a work around, because I don’t want to force people to install `libtool`, but are you sure it’s the same message?

---

<div class="post-metadata">

### Author: ![nabil3achour](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@nabil3achour](https://community.freefem.org/u/nabil3achour)
#### Post date: [September 22, 2020, 12:51pm UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/15 "2020-09-22T12:51:30Z")

</div>

Yes I did that!  
[configure.log](https://community.freefem.org/uploads/short-url/hSbPzGrgt05Wkt9JxDxqR4sZ8qK.log) (17.7 KB)

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [September 22, 2020, 1:20pm UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/16 "2020-09-22T13:20:44Z")

</div>

OK, I think this is fixed.

```auto
$ brew uninstall libtool
$ cd /Users/nabilachour/FF++/FreeFem-sources 
$ git fetch
$ git reset --hard origin/petsc-3.14.0
$ cd 3rdparty/ff-petsc && unlink petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/tag-conf-real
$ make petsc-slepc

```

And we should be good to go! Thank you for bearing with me.

---

<div class="post-metadata">

### Author: ![nabil3achour](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@nabil3achour](https://community.freefem.org/u/nabil3achour)
#### Post date: [September 22, 2020, 1:34pm UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/17 "2020-09-22T13:34:14Z")

</div>

Thank you!  
Now it shows this message:

```
> ====================================

```

> ```
> Install complete.
> 
> Now to check if the libraries are working do (in current directory):
> 
> make PETSC_DIR=/Users/nabilachour/FreeFem-install/ff-petsc/c PETSC_ARCH="" check
> 
> ====================================
> 
> /usr/bin/make --no-print-directory -f makefile PETSC_ARCH=fc PETSC_DIR=/Users/nabilachour/FF++/FreeFem-sources/3rdparty/ff-petsc/petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd mpi4py-install petsc4py-install libmesh-install mfem-install slepc-install hpddm-install amrex-install bamg-install
> 
> make[4]: Nothing to be done for `mpi4py-install'.
> 
> make[4]: Nothing to be done for `petsc4py-install'.
> 
> make[4]: Nothing to be done for `libmesh-install'.
> 
> make[4]: Nothing to be done for `mfem-install'.
> 
> ***Building SLEPc***
> 
> ***Installing SLEPc***
> 
> ***Building and installing HPDDM***
> 
> make[4]: Nothing to be done for `amrex-install'.
> 
> make[4]: Nothing to be done for `bamg-install'.
> 
> test -x "`type -p otool`" && make changec
> 
> diri=/Users/nabilachour/FreeFem-install/ff-petsc/c/lib ; \
> 
> libpp=$diri/libslepc.3.13.3.dylib ; \
> 
> opblibpp=`otool -L $libpp | awk '/3rdparty/ {print $1}'` ; \
> 
> npblibpp=$diri/`basename $opblibpp` ; \
> 
> echo -- $opblibpp ; \
> 
> echo -- $npblibpp ; \
> 
> test -n "$opblibpp" && install_name_tool -change $opblibpp $npblibpp $libpp ; \
> 
> otool -L $libpp | awk '/libpetsc/ {print "**",$1}'
> 
> /Library/Developer/CommandLineTools/usr/bin/objdump: **error:**'/Users/nabilachour/FreeFem-install/ff-petsc/c/lib/libslepc.3.13.3.dylib': No such file or directory
> 
> usage: basename string [suffix]
> 
> basename [-a] [-s suffix] string [...]
> 
> --
> 
> -- /Users/nabilachour/FreeFem-install/ff-petsc/c/lib/
> 
> /Library/Developer/CommandLineTools/usr/bin/objdump: **error:**'/Users/nabilachour/FreeFem-install/ff-petsc/c/lib/libslepc.3.13.3.dylib': No such file or directory
> 
> test -e /Users/nabilachour/FreeFem-install/ff-petsc/c/include/petsc.h
> 
> touch petsc-6f7728a9761c25b7b2c7be97feaf14de71316cbd/tag-install-complex
> 
> test -e /Users/nabilachour/FreeFem-install/ff-petsc/c/include/petsc.h
> 
> mkdir ../lib
> 
> mkdir: ../lib: File exists
> 
> make[1]: [../lib/WHERE.PETSc-complex] Error 1 (ignored)
> 
> echo 'petsccomplex LD -Wl,-rpath,"/Users/nabilachour/FreeFem-install/ff-petsc/c/lib" -L"/Users/nabilachour/FreeFem-install/ff-petsc/c/lib" -lpetsc' > ../lib/WHERE.PETSc-complex
> 
> echo 'petsccomplex INCLUDE -I"/Users/nabilachour/FreeFem-install/ff-petsc/c/include"' >> ../lib/WHERE.PETSc-complex
> 
> echo done ../lib/WHERE.PETSc-complex
> 
> done ../lib/WHERE.PETSc-complex
> 
> test -e /Users/nabilachour/FreeFem-install/ff-petsc/c/include/slepc.h
> 
> mkdir ../lib
> 
> mkdir: ../lib: File exists
> 
> make[1]: [../lib/WHERE.SLEPc-complex] Error 1 (ignored)
> 
> echo 'slepccomplex LD -Wl,-rpath,"/Users/nabilachour/FreeFem-install/ff-petsc/c/lib" -L"/Users/nabilachour/FreeFem-install/ff-petsc/c/lib" -lslepc' > ../lib/WHERE.SLEPc-complex
> 
> echo 'slepccomplex INCLUDE -I"/Users/nabilachour/FreeFem-install/ff-petsc/c/include"' >> ../lib/WHERE.SLEPc-complex
> 
> echo done ../lib/WHERE.SLEPc-complex
> 
> done ../lib/WHERE.SLEPc-complex
> 
> echo >WHERE-all
> 
> test -z '-Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -lscalapack' || echo scalapack LD -Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -lscalapack >>WHERE-all
> 
> test -z '' || echo scalapack INCLUDE -I >>WHERE-all
> 
> test -z '-Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -lmetis' || echo metis LD -Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -lmetis >>WHERE-all
> 
> test -z '/Users/nabilachour/FreeFem-install/ff-petsc/r/include' || echo metis INCLUDE -I/Users/nabilachour/FreeFem-install/ff-petsc/r/include >>WHERE-all
> 
> test -z '-Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord' || echo mumps LD -Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord >>WHERE-all
> 
> test -z '/Users/nabilachour/FreeFem-install/ff-petsc/r/include' || echo mumps INCLUDE -I/Users/nabilachour/FreeFem-install/ff-petsc/r/include >>WHERE-all
> 
> test -z '-Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -lsuperlu' || echo superlu LD -Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -lsuperlu >>WHERE-all
> 
> test -z '/Users/nabilachour/FreeFem-install/ff-petsc/r/include' || echo superlu INCLUDE -I/Users/nabilachour/FreeFem-install/ff-petsc/r/include >>WHERE-all
> 
> test -z '-Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -lptesmumps -lptscotchparmetis -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr' || echo ptscotch LD -Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -lptesmumps -lptscotchparmetis -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr >>WHERE-all
> 
> test -z '/Users/nabilachour/FreeFem-install/ff-petsc/r/include' || echo ptscotch INCLUDE -I/Users/nabilachour/FreeFem-install/ff-petsc/r/include >>WHERE-all
> 
> test -z '-Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -ltet' || echo tetgen LD -Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -ltet >>WHERE-all
> 
> test -z '/Users/nabilachour/FreeFem-install/ff-petsc/r/include' || echo tetgen INCLUDE -I/Users/nabilachour/FreeFem-install/ff-petsc/r/include >>WHERE-all
> 
> test -z '-Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -lparmetis' || echo parmetis LD -Wl,-rpath,/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -L/Users/nabilachour/FreeFem-install/ff-petsc/r/lib -lparmetis >>WHERE-all
> 
> test -z '/Users/nabilachour/FreeFem-install/ff-petsc/r/include' || echo parmetis INCLUDE -I/Users/nabilachour/FreeFem-install/ff-petsc/r/include >>WHERE-all
> 
> test -z '' || echo hpddm LD >>WHERE-all
> 
> test -z '/Users/nabilachour/FreeFem-install/ff-petsc/r/include' || echo hpddm INCLUDE -I/Users/nabilachour/FreeFem-install/ff-petsc/r/include >>WHERE-all
> 
> echo 'petsc LD -Wl,-rpath,"/Users/nabilachour/FreeFem-install/ff-petsc/r/lib" -L"/Users/nabilachour/FreeFem-install/ff-petsc/r/lib" -lpetsc' >>WHERE-all
> 
> echo 'petsc INCLUDE -I"/Users/nabilachour/FreeFem-install/ff-petsc/r/include"' >>WHERE-all
> 
> echo 'petsccomplex LD -Wl,-rpath,"/Users/nabilachour/FreeFem-install/ff-petsc/c/lib" -L"/Users/nabilachour/FreeFem-install/ff-petsc/c/lib" -lpetsc' >>WHERE-all
> 
> echo 'petsccomplex INCLUDE -I"/Users/nabilachour/FreeFem-install/ff-petsc/c/include"' >> WHERE-all
> 
> echo 'slepc LD -Wl,-rpath,"/Users/nabilachour/FreeFem-install/ff-petsc/r/lib" -L"/Users/nabilachour/FreeFem-install/ff-petsc/r/lib" -lslepc' >>WHERE-all
> 
> echo 'slepc INCLUDE -I"/Users/nabilachour/FreeFem-install/ff-petsc/r/include"' >>WHERE-all
> 
> echo 'slepccomplex LD -Wl,-rpath,"/Users/nabilachour/FreeFem-install/ff-petsc/c/lib" -L"/Users/nabilachour/FreeFem-install/ff-petsc/c/lib" -lslepc' >>WHERE-all
> 
> echo 'slepccomplex INCLUDE -I"/Users/nabilachour/FreeFem-install/ff-petsc/c/include"' >>WHERE-all
> 
> nabilachour@MacBook-Pro-de-Nabil ff-petsc %
> 
> ```

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [September 22, 2020, 1:37pm UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/18 "2020-09-22T13:37:03Z")

</div>

Things are looking good, you can resume the procedure from [this earlier](https://community.freefem.org/t/problem-when-compiling-scalapack/587/5) post.

---

<div class="post-metadata">

### Author: ![nabil3achour](https://avatars.discourse-cdn.com/v4/letter/n/f19dbf/32.png) [@nabil3achour](https://community.freefem.org/u/nabil3achour)
#### Post date: [September 22, 2020, 1:43pm UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/19 "2020-09-22T13:43:40Z")

</div>

At the last stage it shows this:

> **/Users/nabilachour/FF++/FreeFem-sources/3rdparty/yams/freeyams.2012.02.05/sourceslib/colar2.c:105:9:**  **error:**  **implicit declaration of**
> 
> **function ‘hippop’ is invalid in C99 [-Werror,-Wimplicit-function-declaration]**
> 
> k = hippop(sm-\>tria);
> 
> **^**
> 
> 1 error generated.
> 
> make[7]: \*\*\* [/Users/nabilachour/FF++/FreeFem-sources/3rdparty/yams/freeyams.2012.02.05/objects/colar2.o] Error 1
> 
> make[6]: \*\*\* [freeyams.2012.02.05/FAIT] Error 2
> 
> make[5]: \*\*\* [FAIRE] Error 2
> 
> make[4]: \*\*\* [compile-dir] Error 2
> 
> make[3]: \*\*\* [tag-compile-pkg] Error 1
> 
> make[2]: \*\*\* [all-recursive] Error 1
> 
> make[1]: \*\*\* [all-recursive] Error 1
> 
> make: \*\*\* [all] Error 2

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [September 22, 2020, 1:46pm UTC](https://community.freefem.org/t/problem-when-compiling-scalapack/587/20 "2020-09-22T13:46:45Z")

</div>

OK, then do the following. Disclaimer: some packages won’t be installed.

```auto
$ ./reconfigure --disable-download
$ make && make check

```

[Next page](https://community.freefem.org/t/problem-when-compiling-scalapack/587.md?page=2)
