Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows build under msys2 fails with config.guess issue #81

Closed
vvuk opened this issue Aug 13, 2015 · 16 comments · Fixed by #105
Closed

windows build under msys2 fails with config.guess issue #81

vvuk opened this issue Aug 13, 2015 · 16 comments · Fixed by #105

Comments

@vvuk
Copy link

vvuk commented Aug 13, 2015

Building under MSYS2 (with a msys2 fresh build of rust) fails, because config.guess can't figure out the system triple. Updating the curl source to have the latest config.guess/config.sub fixes this.

@carllerche
Copy link
Contributor

cc @alexcrichton

@alexcrichton
Copy link
Owner

@vvuk could you gist the logs of this? Our buildbots build Cargo (and transitively, this library) each night in MSYS2 and I've also built this a bunch locally, so I'm surprised this is happening!

@vvuk
Copy link
Author

vvuk commented Aug 17, 2015

Hmm. Maybe it's because I'm using the x64 version of msys2?

$ uname -a
MSYS_NT-6.3 shepherd 2.2.1(0.289/5/3) 2015-08-09 20:04 x86_64 Msys

$ cd curl-rust/curl-sys/curl
$ ./config.guess
./config.guess: unable to guess system type

This script, last modified 2013-06-10, 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 (./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> in order to provide the needed
information to handle your system.

config.guess timestamp = 2013-06-10

uname -m = x86_64
uname -r = 2.2.1(0.289/5/3)
uname -s = MSYS_NT-6.3
uname -v = 2015-08-09 20:04

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

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

UNAME_MACHINE = x86_64
UNAME_RELEASE = 2.2.1(0.289/5/3)
UNAME_SYSTEM  = MSYS_NT-6.3
UNAME_VERSION = 2015-08-09 20:04


$ curl -o config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
$ curl -o config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'
$ ./config.guess
x86_64-pc-msys

@alexcrichton
Copy link
Owner

Can you gist the build logs of Cargo trying to build libcurl? If I run this in a 64-bit msys2 shell it works out ok so I'm not quite sure what's going on.

@kendallsss
Copy link

Replace your
C:\Users\youname.cargo\registry\src\gh.neting.cc-0a35038f75765ae4\curl-sys-0.1.25\curl\config.guess
by
msys64\usr\share\automake-1.15\config.guess

@vvuk
Copy link
Author

vvuk commented Sep 1, 2015

The log is pretty uninteresting, pretty much what I posted above: https://gist.github.com/vvuk/f37ec1d1e4d1bd94e96d

Note that the build totally wedges if I start using mingw64-shell.bat instead of msys-shell.bat (and add /mingw64/bin to the PATH) -- if $MSYSTEM is MINGW64, cmake doesn't recognize the system (and the build wedges earlier). If I use mingw64-shell.bat and then set MSYSTEM=MSYS, then I hit the above.

@alexcrichton
Copy link
Owner

Hm ok, thanks for the logs! Does this branch work for you?

@Seeker14491
Copy link

I'm having this issue too, here's the log: gist.

@alexcrichton your branch doesn't compile for me either, here's the log: gist.

@alexcrichton
Copy link
Owner

@Seeker14491 your second error indicates that you may not have been running inside of an MSYS shell, are you sure you were?

@Seeker14491
Copy link

@alexcrichton Yes, I'm using MSYS2. I followed the install instructions, then ran these commands:

$ pacman -S mingw-w64-x86_64-toolchain

$ pacman -S git

$ pacman -S --needed base-devel

The thing is, I had problems running these commands on my computer, as the downloads would time out on my connection, so I spun up a Windows Server 2012 VPS. I Installed MSYS2 on it and ran all the commands, which completed successfully. I then transferred the C:\msys64 folder from the VPS to my computer.

I should have tried building on the VPS to see if that worked; I'll try that now.

@Seeker14491
Copy link

Ok, I tried building on the VPS, and I get the same error. Here are the exact steps I took:

  • Go to the MSYS2 page; download and install the 64-bit version; follow all installation instructions on that page.
  • Run the following commands in the MSYS2 shell:
$ pacman -S mingw-w64-x86_64-toolchain
$ pacman -S git
$ pacman -S --needed base-devel
  • Add C:\msys64\mingw64\bin to PATH.
  • Install 64-bit Rust nightly; tick installation option to add to PATH.
  • In the MSYS2 shell, run the commands:
$ git clone "https://github.com/alexcrichton/curl-rust.git" --branch "update-curl"
$ cd curl-rust
$ cargo build --release

Here's the output of that cargo build command: gist

@alexcrichton
Copy link
Owner

@Seeker14491 oh right sorry, I read that error message wrong. You'll need to run git submodule update --init to check out the libcurl submodule

@Seeker14491
Copy link

@alexcrichton this sequence of commands still fails:

$ git clone "https://github.com/alexcrichton/curl-rust.git" --branch "update-curl"
$ cd curl-rust
$ git submodule update --init
$ cargo build

The log

@alexcrichton
Copy link
Owner

Ah oops, looks like I forgot to check in a file, wanna try that branch again?

@Seeker14491
Copy link

@alexcrichton Ok, I reran that same sequence of commands, but it still errors.

@alexcrichton
Copy link
Owner

Hm that looks to be the same error as before, so maybe it hasn't been fixed upstream?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants