# Errors on Compilation in Ubuntu

**URL:** https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219
**Category:** FreeFEM installation
**Created:** [January 13, 2020, 8:14pm UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219 "2020-01-13T20:14:26Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![ylnz7](https://avatars.discourse-cdn.com/v4/letter/y/53a042/32.png) [@ylnz7](https://community.freefem.org/u/ylnz7)
#### Post date: [January 13, 2020, 8:14pm UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/1 "2020-01-13T20:14:26Z")

</div>

Hello,

I got such errors when compiling the FreeFem++ in ubuntu 18.1:

File “/home/ylnz7/FreeFem-sources/3rdparty/ff-petsc/petsc  
3.12.2/config/BuildSystem/nargs.py”, line 360, in setValue  
raise ValueError('Invalid directory: ‘+str(dir)+’ for key '+str(self.key))  
test -f petsc-3.12.2/fr/lib/petsc/conf/petscvariables  
Makefile:237: recipe for target ‘petsc-3.12.2/tag-conf-real’ failed  
make: \*\*\* [petsc-3.12.2/tag-conf-real] Error 1

what should I do?

---

<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: [January 13, 2020, 8:40pm UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/2 "2020-01-13T20:40:39Z")

</div>

Could you please share your FreeFEM `config.log`? We are not dispatching the correct options to PETSc configure which makes it crash. Thanks.

You may also want to to compile the develop branch.

---

<div class="post-metadata">

### Author: ![ylnz7](https://avatars.discourse-cdn.com/v4/letter/y/53a042/32.png) [@ylnz7](https://community.freefem.org/u/ylnz7)
#### Post date: [January 14, 2020, 12:09am UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/3 "2020-01-14T00:09:47Z")

</div>

Thanks for the reply! Below is the log file I found. Not sure if I truly understand your advice. What do you mean exactly “the develop branch”? Thanks.

## ----------------------

## Running config.status.

## ----------------------

This file was extended by FreeFEM config.status 4.4-3, which was  
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG\_FILES =  
CONFIG\_HEADERS =  
CONFIG\_LINKS =  
CONFIG\_COMMANDS =  
$ …/…/config.status --file=Makefile.inc:Makefile-PETSc.inc

on LAPTOP-6I03JEAE

config.status:1202: creating Makefile.inc

## ----------------------

## Running config.status.

## ----------------------

This file was extended by FreeFEM config.status 4.4-3, which was  
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG\_FILES =  
CONFIG\_HEADERS =  
CONFIG\_LINKS =  
CONFIG\_COMMANDS =  
$ …/…/config.status --file=Makefile.inc:Makefile-PETSc.inc

on LAPTOP-6I03JEAE

config.status:1202: creating Makefile.inc

---

<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: [January 14, 2020, 5:40am UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/4 "2020-01-14T05:40:35Z")

</div>

This is not the full file `FreeFem-sources/config.log` (it should have around 10k lines of text). To use the develop branch, try `git clone -b develop https://github.com/FreeFem/FreeFem-sources`. If you don’t have Git, download instead this [archive](https://github.com/FreeFem/FreeFem-sources/archive/b9837c197ee893fa8e9359aab8f1cc1b746265c4.zip).

---

<div class="post-metadata">

### Author: ![ylnz7](https://avatars.discourse-cdn.com/v4/letter/y/53a042/32.png) [@ylnz7](https://community.freefem.org/u/ylnz7)
#### Post date: [January 14, 2020, 6:50pm UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/5 "2020-01-14T18:50:03Z")

</div>

I see. Please check the attached log file.

[config.log](https://community.freefem.org/uploads/short-url/fZnjZg78dI4gr8an2whRlTOAHFW.log) (448.0 KB)

---

<div class="post-metadata">

### Author: ![ylnz7](https://avatars.discourse-cdn.com/v4/letter/y/53a042/32.png) [@ylnz7](https://community.freefem.org/u/ylnz7)
#### Post date: [January 14, 2020, 8:35pm UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/6 "2020-01-14T20:35:04Z")

</div>

And also I tried the develop branch, it faced the same problems.

---

<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: [January 14, 2020, 9:10pm UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/7 "2020-01-14T21:10:22Z")

</div>

You don’t have BLAS installed on your system. Please install BLAS, then try again.

---

<div class="post-metadata">

### Author: ![ylnz7](https://avatars.discourse-cdn.com/v4/letter/y/53a042/32.png) [@ylnz7](https://community.freefem.org/u/ylnz7)
#### Post date: [January 14, 2020, 10:04pm UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/8 "2020-01-14T22:04:11Z")

</div>

I tried  
git clone [http://github.com/Reference-LAPACK/lapack](http://github.com/Reference-LAPACK/lapack)

and ./reconfigure and make check, it gives me the following errors

Makefile:50: recipe for target ‘dggath’ failed  
make[8]: \*\*\* [dggath] Error 127  
make[8]: Leaving directory ‘/home/ylnz7/FreeFem-sources/3rdparty/scotch/scotch\_6.0.4/src/scotch’  
Makefile:90: recipe for target ‘ptscotch’ failed  
make[7]: \*\*\* [ptscotch] Error 2  
make[7]: Leaving directory ‘/home/ylnz7/FreeFem-sources/3rdparty/scotch/scotch\_6.0.4/src/scotch’  
Makefile:98: recipe for target ‘ptscotch’ failed  
make[6]: \*\*\* [ptscotch] Error 2  
make[6]: Leaving directory ‘/home/ylnz7/FreeFem-sources/3rdparty/scotch/scotch\_6.0.4/src’  
Makefile:68: recipe for target ‘scotch\_6.0.4/FAIT-mpi’ failed  
make[5]: \*\*\* [scotch\_6.0.4/FAIT-mpi] Error 2  
make[5]: Leaving directory ‘/home/ylnz7/FreeFem-sources/3rdparty/scotch’  
Makefile:54: recipe for target ‘FAIRE’ failed  
make[4]: \*\*\* [FAIRE] Error 2  
make[4]: Leaving directory ‘/home/ylnz7/FreeFem-sources/3rdparty/scotch’  
Makefile:932: recipe for target ‘compile-dir’ failed  
make[3]: \*\*\* [compile-dir] Error 2  
make[3]: Leaving directory ‘/home/ylnz7/FreeFem-sources/3rdparty’  
Makefile:942: recipe for target ‘tag-compile-pkg’ failed  
make[2]: \*\*\* [tag-compile-pkg] Error 1  
make[2]: Leaving directory ‘/home/ylnz7/FreeFem-sources/3rdparty’  
Makefile:577: recipe for target ‘install-recursive’ failed  
make[1]: \*\*\* [install-recursive] Error 1  
make[1]: Leaving directory ‘/home/ylnz7/FreeFem-sources/3rdparty’  
Makefile:784: recipe for target ‘install-recursive’ failed  
make: \*\*\* [install-recursive] Error 1

---

<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: [January 14, 2020, 10:09pm UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/9 "2020-01-14T22:09:41Z")

</div>

Could you paste your new `config.log`, please?

---

<div class="post-metadata">

### Author: ![ylnz7](https://avatars.discourse-cdn.com/v4/letter/y/53a042/32.png) [@ylnz7](https://community.freefem.org/u/ylnz7)
#### Post date: [January 14, 2020, 10:20pm UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/10 "2020-01-14T22:20:03Z")

</div>

Sure. Here it is.

[config.log](https://community.freefem.org/uploads/short-url/fHyVaX86iwBOeuBqQWAzSDA7y3w.log) (445.8 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: [January 14, 2020, 10:20pm UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/11 "2020-01-14T22:20:52Z")

</div>

Where did you install BLAS and LAPACK? It can’t be found by FreeFEM configure.

---

<div class="post-metadata">

### Author: ![ylnz7](https://avatars.discourse-cdn.com/v4/letter/y/53a042/32.png) [@ylnz7](https://community.freefem.org/u/ylnz7)
#### Post date: [January 14, 2020, 10:42pm UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/12 "2020-01-14T22:42:02Z")

</div>

I installed it under home/username/

---

<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: [January 15, 2020, 8:27pm UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/13 "2020-01-15T20:27:51Z")

</div>

Then, you need to pass this information to FreeFEM `./configure`. Add `-help` to see the appropriate options.

---

<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: [January 16, 2020, 10:22am UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/14 "2020-01-16T10:22:12Z")

</div>

Another solution would be to go into `FreeFem-sources/3rdparty/blas`, do `make`, and then go back to PETSc compilation.

---

<div class="post-metadata">

### Author: ![macro2micro](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@macro2micro](https://community.freefem.org/u/macro2micro)
#### Post date: [April 9, 2020, 2:11am UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/15 "2020-04-09T02:11:50Z")

</div>

Hello, have you ever solved this problem and what you did? Could you please give some suggestions in detail. Thanks a lot.  
I met the same problem, when installing FreeFem. And I have try to solve it for many days…no progress at all…

---

<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: [April 9, 2020, 4:50am UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/16 "2020-04-09T04:50:08Z")

</div>

What is you problem?

---

<div class="post-metadata">

### Author: ![macro2micro](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@macro2micro](https://community.freefem.org/u/macro2micro)
#### Post date: [April 9, 2020, 7:28am UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/17 "2020-04-09T07:28:02Z")

</div>

i have met the same trouble with him. When i complie FreeFEM in CENTOS7 according to README.md step by step.  
When I proceeding this step ‘make petsc-slepc’ in /3rdparty/ff-petsc , it occurs the trouble tip:

## TESTING: checkLib from config.packages.BlasLapack(config/BuildSystem/c\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):

You set a value for --with-blaslapack-lib=, but [’-lblas’] cannot be used

* * *

make: \*\*\* [Makefile:210：petsc-3.13.0/tag-conf-real] 错误 1

in centos system.

I find this man had the same problem here, and I haven’t understand what he did for solving this problem.

Did he solve it? And what he did in details?

---

<div class="post-metadata">

### Author: ![macro2micro](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@macro2micro](https://community.freefem.org/u/macro2micro)
#### Post date: [April 9, 2020, 7:28am UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/18 "2020-04-09T07:28:48Z")

</div>

![xxx](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/eb2fa5576ac4fa4cee63792de3650a27a49a4beb.png)

---

<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: [April 9, 2020, 8:19am UTC](https://community.freefem.org/t/errors-on-compilation-in-ubuntu/219/19 "2020-04-09T08:19:08Z")

</div>

Could you please share you `config.log` and `3rdparty/ff-petsc/petsc-3.13.0/configure.log`?
