FreeFem / FreeFem-sources

FreeFEM source code
https://freefem.org/
Other
746 stars 187 forks source link

Installation errors from FreeFem (3rd party) sources on Debian 11 running on Docker for Mac (M1 Max) #261

Open iwanaminami opened 1 year ago

iwanaminami commented 1 year ago

Hi, thank you very much for managing this great software. I've found an installation problem and will share that with you.

I have attempted to install FreeFEM on a MacBook running Debian11 on Docker.

Environmnet:

# uname -a
Linux bed4e9fa7f18 5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 aarch64 GNU/Linux

Procedures that cause problems:

I downloaded the source files from Github repository (FreeFem/FreeFem-sources: FreeFEM source code) and followed the Compilation on Ubuntu section in Installation guide.

In Step 7. for Build your FreeFEM library and executable, this package build was stopped with error related to NLopt build. This seemed to caused by config.guess in the NLopt 2.2.4.

The same error message can be reproduced from a set of NLopt 2.2.4 source files as follows

$ wget http://ab-initio.mit.edu/nlopt/nlopt-2.2.4.tar.gz
$ tar -zxvf nlopt-2.2.4.tar.gz
$ nlopt-2.2.4/config.guess 
nlopt-2.2.4/config.guess: unable to guess system type

This script, last modified 2009-04-27, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD

If the version you run (nlopt-2.2.4/config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <[config-patches@gnu.org](mailto:config-patches@gnu.org)> in order to provide the needed
information to handle your system.

config.guess timestamp = 2009-04-27

uname -m = aarch64
uname -r = 5.15.49-linuxkit
uname -s = Linux
uname -v = #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022

/usr/bin/uname -p = 
/bin/uname -X     = 

hostinfo               = 
/bin/universe          = 
/usr/bin/arch -k       = 
/bin/arch              = 
/usr/bin/oslevel       = 
/usr/convex/getsysinfo = 

UNAME_MACHINE = aarch64
UNAME_RELEASE = 5.15.49-linuxkit
UNAME_SYSTEM  = Linux
UNAME_VERSION = #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022

To avoid this error, download the NLopt 2.7.1 source files from the NLopt documentation page (NLopt - NLopt Documentation), built them individually, and then used --with-nlopt-include='-I/usr/ local/include/' option in FreeFEM configure and built.

Similarly, Ipopt 3.12.4 had an error about configure.guess, so I downloaded and built Ipopt 3.14.11 from the Ipopt page (coin-or/Ipopt: COIN-OR Interior Point Optimizer IPOPT) and finally added --with-nlopt- include='-I/usr/local/include/' --with-ipopt-include='-I/usr/local/include/coin-or/' to the configure option of FreeFEM build, then I no longer get errors with FreeFEM build.

I'm a bit confused because the Ipopt 3.12.4 source file doesn't seem to include config.guess. Also, I passed Ipopt directive in configure for FreeFem build, but it seems that FreeFem build refers to the library in coin/*, so I copied all files in /usr/local/include/coin-or/ and saved them in /usr/local/include/coin-or/coin/ to avoid the error.

I'm not having trouble so far, but is there a solution to avoid this error when successfully installing from source files?

Thank you