Skip to content

Fix msys2-runtime based on Cygwin v3.0.1 #2081

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

Closed
dscho opened this issue Feb 21, 2019 · 10 comments
Closed

Fix msys2-runtime based on Cygwin v3.0.1 #2081

dscho opened this issue Feb 21, 2019 · 10 comments
Assignees
Milestone

Comments

@dscho
Copy link
Member

dscho commented Feb 21, 2019

The issue might have been with Cygwin v3.0.0 already, I don't know. The issue is that a couple of fields in uname -a are clipped: they miss the first character.

Most crucially, the output of uname -m does, too, which makes pacman believe that all of the new packages have an incorrect architecture.

This problem was the reason why I pulled the msys2-runtime update out of v2.21.0, and I will have to investigate and fix this issue after that version comes out. Unless somebody else beats me to it 😉

@dscho dscho added this to the v2.21.0(2) milestone Feb 21, 2019
@dscho dscho self-assigned this Feb 21, 2019
@magneticflux-
Copy link

Just got bit by this, I had to run pacman -U --arch x86_64 /var/cache/pacman/pkg/msys2-runtime-devel-2.11.2-1-x86_64.pkg.tar.xz /var/cache/pacman/pkg/msys2-runtime-2.11.2-1-x86_64.pkg.tar.xz to revert the affected packages.

@FlyingWombat
Copy link

Not sure if this is the same issue, or just one very close, but I have a work-around for it.
The issue I'm referring to is msys2/MSYS2-packages#1578 ,
which I believe to be caused by msys2-runtime 3.0.1 as packaged by git-for-windows.

with msys2-runtime 3.0.1 the $arch variable for pacman gets messed up.
Instead of reading x86_64, it reads 86_64.

A work-around for until this gets fixed is to edit /etc/pacman.conf
to change Architecture = auto to Architecture = x86_64

Here are some relevant errors:

debug: url: http://repo.msys2.org/msys/86_64/msys.db
debug: maxsize: 26214400
debug: opened tempfile for download: /var/lib/pacman/sync/msys.db.part (wb)
debug: curl returned error 0 from transfer
debug: response code: 404
error: failed retrieving file 'msys.db' from repo.msys2.org : The requested URL returned error: 404

where the correct URL should have 'x86_64' in it.

and

error: failed to prepare transaction (package architecture is not valid)
:: package git-extra-1.1.336.cef9ac0-1-x86_64 does not have a valid architecture

@magneticflux-
Copy link

@FlyingWombat That was already stated in the original issue.

Most crucially, the output of uname -m does, too, which makes pacman believe that all of the new packages have an incorrect architecture.

It looks like @kevinfengcu is using Git for Windows inside of MSYS2 proper, like I do.

@dscho
Copy link
Member Author

dscho commented Feb 22, 2019

@magneticflux- do feel free to debug the problem further by rebuilding msys-2.0.dll with debug print statements.

@orgads
Copy link

orgads commented Mar 1, 2019

This also affects the build of Git itself in the git-sdk.

Sample output on Bash from Git installer:

$ uname -s
MINGW64_NT-6.1
$ uname -m
x86_64
$ uname -o
Msys
$ uname -r
2.11.2(0.329/5/3)
$ uname -p
unknown
$ uname -v
2018-11-10 14:38

On Git SDK Bash:

$ uname -s
MINGW64_NT-6.1
$ uname -m
86_64
$ uname -o
Msys
$ uname -r
.0.1(0.338/5/3)
$ uname -p
unknown
$ uname -v
019-02-20 14:24

@dscho
Copy link
Member Author

dscho commented Mar 1, 2019

$ uname -r
.0.1(0.338/5/3)

Ah, I get it: this would affect https://github.com/git-for-windows/git/blob/v2.21.0.windows.1/config.mak.uname#L628...

@kevinfengcu
Copy link

@magneticflux- Yes I am using Git for Windows repo in Msys.
I cannot find relevant discussion in Cygwin's mainling list, however there is a change in uname in version 3.0.0 here.

@dscho
Copy link
Member Author

dscho commented Mar 1, 2019

@kevinfengcu since you are trying to use Git for Windows in MSYS2 (I highly doubt that you mean MSys...), you need to understand that you are doing things that require a lot of expertise from you, as it would really be unfair to put even more of a maintenance burden on the Git for Windows project.

@dscho
Copy link
Member Author

dscho commented Mar 1, 2019

For the record, I went through the output of git range-diff 44c8e5632f^{/^Start.the}..44c8e5632f e054c53f7d^{/^Start.the}..e054c53f7d in a checkout of https://github.com/git-for-windows/msys2-runtime again, this time with a focus on public headers that might have been changed as incompatibly as uname.h, and I found that this was the only thing I missed in the rebase to v3.0.0/v3.0.1.

@dscho
Copy link
Member Author

dscho commented Mar 1, 2019

Oh, and also: the build is running and should be done in about 40 minutes from now. After that, it might still be a bit challenging to update for you MSYS2 users, the safest might be to roll back by force-installing https://wingit.blob.core.windows.net/x86-64/msys2-runtime-2.11.2-1-x86_64.pkg.tar.xz (and https://wingit.blob.core.windows.net/x86-64/msys2-runtime-devel-2.11.2-1-x86_64.pkg.tar.xz, if you have installed msys2-runtime-devel for some reason) via pacman -U <file>..., and then update the regular way with pacman -Syu.

Note: if you use Git for Windows' SDK and update by running git pull in a PowerShell or a CMD (i.e. not a Git SDK Bash), you will get this upgrade "for free", through my work.

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

No branches or pull requests

5 participants