53

When I configure (under cygwin environment), an error occurred, Message are following:

$ ./configure
.................
checking build system type... /bin/sh: ./config.guess: No such file or directory
configure: error: cannot guess build type; you must specify one

How to resolve it? Thanks!!

vhallac
  • 13,301
  • 3
  • 25
  • 36
sean
  • 1,252
  • 3
  • 14
  • 29

7 Answers7

86

search for /usr/share/automake*/config.guess

check the latest version of automake

$ which automake
$ automake --version

find the appropriate automake folder in /usr/share/automake.1.11.1/config.guess

replace config.guess from your build tree with /usr/share/automake.1.11.1/config.guess

(The same may/is usually needed for config.sub.)

imz -- Ivan Zakharyaschev
  • 4,921
  • 6
  • 53
  • 104
Manoj
  • 877
  • 6
  • 3
  • Thank you for this! When building wxWidgets, I had to search recursively for config.guess & config.sub and just replace them all. – nimig18 Apr 10 '20 at 19:11
  • 1
    for AUR based build use following command to add to the PKGBUILD (prepare section): cp /usr/share/automake-`pacman -Q --info automake|grep -i version| awk -F ":" '{print $2}'| awk '{$1=$1};1'| awk -F "." '{print $1"."$2}'`/config.guess . – Oleg Kokorin Jul 05 '20 at 14:57
44

configure error: cannot guess build type you must specify one

This was solved for me by specifying the --build= parameter during the ./configure step.

For arm64

./configure --build=aarch64-unknown-linux-gnu

For x86

./configure --build=x86_64-unknown-linux-gnu
Stephen Blum
  • 6,498
  • 2
  • 34
  • 46
9

The error message may also include instructions on how to deal with this. In my case I saw

This script, last modified 2008-01-23, 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

In a browser I was able to access those files, save them to to my system, and then overwrite the respective ./config/config.guess and ./config/config.sub files in the package being built.

Peeter Joot
  • 7,848
  • 7
  • 48
  • 82
4

Thanks I got it working.

  • Just go to C:\cygwin64\usr\share\automake-1.11
  • Copy config.guess
  • Paste it to C:\cygwin64\usr\local\src\gateway-1.4.4
Durai Amuthan.H
  • 31,670
  • 10
  • 160
  • 241
mansoor
  • 41
  • 1
2

config.guess and config.sub routines are updated and kept on github; You'll get the web pointers when you run the script,

./config.guess

In my Mingw system, config.sub or .guess were not in the share/../automake-1.11/ tree, I needed to download the updated scripts which worked (when they replaced the old ones).

Alexey Malev
  • 6,408
  • 4
  • 34
  • 52
user3603401
  • 69
  • 1
  • 1
1

for AUR based builds add the following command to the PKGBUILD (end of prepare section) to have proper config.guess automatically applied/overrided in the package:

cp /usr/share/automake-`pacman -Q --info automake|grep -i version| awk -F ":" '{print $2}'| awk '{$1=$1};1'| awk -F "." '{print $1"."$2}'`/config.guess .
Oleg Kokorin
  • 2,288
  • 2
  • 16
  • 28
1

It worked for me once the config.guess and config.sub files are updated. In my case, the config.guess and config.sub files are located in the same dir where I need to run ./configure.

In summary, the following command worked for me:

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
C.Lee
  • 10,451
  • 9
  • 31
  • 46