coin-or / COIN-OR-OptimizationSuite

A harness for building the bundled suite of interoperable optimization tools available in the COIN-OR repository.
116 stars 41 forks source link

Building in msys2 ... Invalid configuration `x86_64-pc-msys': system `msys' not recognized #6

Closed kingaj12 closed 5 years ago

kingaj12 commented 5 years ago

Following instructions for the windows build. Installed msys2, downloaded package from git, but configure fails with:

configure: loading site script /etc/config.site
/etc/config.site: line 23: config.site:23: default build_alias set to x86_64-pc-msys: command not found
/etc/config.site: line 30: config.site:30: default prefix set to /usr: No such file or directory
checking for svnversion... yes
checking build system type... Invalid configuration `x86_64-pc-msys': system `msys' not recognized
configure: error: /bin/sh ../config.sub x86_64-pc-msys failed
kingaj12 commented 5 years ago

Solved! The solution is to follow the instructions on the Msys2 install page ;). Particularly,

pacman -Syuu
kingaj12 commented 5 years ago

Ah, but now I had to install some more things. I followed the instructions (well, most of them) on

http://www.math.ucla.edu/~wotaoyin/windows_coding.html
http://wiki.icub.org/wiki/Installing_IPOPT
tkralphs commented 5 years ago

I guess this is all good now? If there are things missing from documentation, let me know. I'm slowly trying to document all of these subtle details.

danefreitas commented 2 years ago

I have an error similar to this one. What should I do?

2021-12-29 12:22:20 (207 KB/s) - ‘MUMPS_4.10.0.tar.gz’ saved [2481516/2481516]

Uncompressing the tarball...
Unpacking the source code...
Deleting the tar file...

Done downloading the source code for MUMPS.

Apply a patch to work around a bug in MUMPS.

patching file MUMPS/src/dmumps_part2.F

Verify that there are no error message in the output above.
./get.AllThirdParty: line 7: ./get.*: No such file or directory
./get.AllThirdParty: line 7: ./get.*: No such file or directory
mkdir: cannot create directory ‘build’: File exists
configure: loading site script /etc/config.site
checking for svnversion... yes
checking build system type... Invalid configuration `x86_64-pc-msys': system `msys' not recognized
configure: error: /bin/sh ../config.sub x86_64-pc-msys failed
make: *** No rule to make target 'install'.  Stop.
tkralphs commented 2 years ago

Did you follow the instructions here?

https://coin-or.github.io/user_introduction#windows-1

The important part is the argument --build=x86_64-w64-mingw32 to coinbrew, which is specifically to mitigate the invalid configuration error. The other errors there probably won't cause any issues.

JiaYuanChng commented 2 years ago

Hello,

I am having similar problem in Windows 11 too:

$ ./configure
configure: loading site script /etc/config.site
checking build system type... Invalid configuration `x86_64-pc-msys': system `msys' not recognized
configure: error: /bin/sh ./config.sub x86_64-pc-msys failed

So here is what I did:

  1. Install MSYS2 (https://www.msys2.org/), run ‘MSYS2 MinGW 64-bit’. Run
    pacman -S binutils diffutils git grep make patch pkg-config 
    pacman -S mingw-w64-x86_64-gcc
    pacman -S mingw-w64-x86_64-gcc-fortran
    pacman -S mingw-w64-x86_64-lapack mingw-w64-x86_64-metis
  2. Downloaded Ipopt-3.12.13.zip from (http://www.coin-or.org/download/source/Ipopt).
  3. Unpack the zip folder into C:\MSYS2\home\user_. Then,
    cd Ipopt-3.12.13
    cd ThirdParty/Blas
    ./get.Blas
    cd ../Lapack
    ./get.Lapack
    cd ../ASL
    ./get.ASL
    cd ../Metis
    ./get.Metis
  4. Downloaded the Coin-HSL Full zip folder (coinhsl-2021.05.05)
  5. Unpack the zip folder into C:\MSYS2\home\user_\Ipopt-3.12.13\ThirdParty\HSL\ and rename it as coinhsl
  6. Then compile by running
    mkdir Ipopt-3.12.13/build
    cd Ipopt-3.12.13/build
    ../configure

    And I got the error above. Could someone please advise how do I get around this?

Thank you.

tkralphs commented 2 years ago

@JiaYuanChng Did you read the comment directly above yours?

Kreijstal commented 4 months ago

try

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

./configure

to solve the config.sub error