msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.27k stars 1.21k forks source link

script.exe missing after MSYS2-Win64 update #4497

Open LigH-de opened 6 years ago

LigH-de commented 6 years ago

After starting MABS an update for MSYS2 was first applied; the following compile script failed:

H:\development\media-autobuild_suite-master\msys64\usr\bin\script.exe: Exit 126.
Failed to run 'H:\development\media-autobuild_suite-master\msys64\usr\bin\script.exe': No such file or directory

The last entries in msys64/var/log/pacman.log are:

[2018-10-02 18:57] [PACMAN] Running 'pacman -Sy'
[2018-10-02 18:57] [PACMAN] synchronizing package lists
[2018-10-02 18:58] [PACMAN] Running 'pacman -S --noconfirm --ask 20 --overwrite /mingw64/* --overwrite /mingw32/* --overwrite /usr/* bison brotli expat libexpat libutil-linux mintty util-linux'
[2018-10-02 18:58] [ALPM] transaction started
[2018-10-02 18:58] [ALPM] upgraded bison (3.0.5-1 -> 3.1-1)
[2018-10-02 18:58] [ALPM] upgraded brotli (1.0.5-2 -> 1.0.6-1)
[2018-10-02 18:58] [ALPM] upgraded expat (2.2.5-1 -> 2.2.6-1)
[2018-10-02 18:58] [ALPM] upgraded libexpat (2.2.5-1 -> 2.2.6-1)
[2018-10-02 18:58] [ALPM] upgraded libutil-linux (2.26.2-1 -> 2.32.1-1)
[2018-10-02 18:58] [ALPM] upgraded mintty (1~2.9.0-1 -> 1~2.9.1-1)
[2018-10-02 18:58] [ALPM] upgraded util-linux (2.26.2-1 -> 2.32.1-1)
[2018-10-02 18:58] [ALPM] transaction completed
[2018-10-02 18:58] [PACMAN] Running 'pacman -S --needed --noconfirm --ask=20 --asdeps bash pacman msys2-runtime'
[2018-10-02 18:58] [ALPM] transaction started
[2018-10-02 18:58] [ALPM] upgraded pacman (5.1.1-2 -> 5.1.1-3)
[2018-10-02 18:58] [ALPM] transaction completed
LigH-de commented 6 years ago

Package util-linux may be incomplete. In IRC, johnjay told me that pacman -Qo script reported that.

lazka commented 6 years ago

@peterbud

LigH-de commented 6 years ago

The reason appears to be that it suddenly needs headers only available under a real Linux.

I don't know if you would consider clamping its sources to a last working release if you don't find a more elegant fix.

peterbud commented 6 years ago

It's an upstream decision to use those Unix-only header (signalfd.h), see configure.ac:

UL_BUILD_INIT([script], [check])
UL_REQUIRES_HAVE([script], [sys_signalfd_h], [sys/signalfd.h header])
AM_CONDITIONAL([BUILD_SCRIPT], [test "x$build_script" = xyes])

Also uuiddhas to be removed for the very same reason, see the PR with util-linux update. Also there are many other utils which are disabled in the Windows/MSYS2 version for a good reason - check the PKGBUILD file.

One could probably start commenting out/refactoring calls around signalfd() to make it work without signalfd present, but (1) I don't have the necessary knowledge for that, (2) I don't have the need. If someone has the (1) knowledge and (2) the need, I believe a good PR is always welcomed here. The real solution is nevertheless is to have it modified at the upstream project.

Also I saw the rather emotional discussion at the MABS project, but getting emotional is not a solution. There are two options for the time being for MABS project:

LigH-de commented 6 years ago

The third option for MABS is: Logging the console output with a different method.

LigH-de commented 6 years ago

I just noticed that I posted in the wrong branch ... MABS uses MSYS2, so of course I noticed it as issue for MSYS2 packages.

And as it doesn't seem like you can do much about it, shall I close this report?

sskras commented 6 years ago

I would like to keep this open until the root cause is known at least to me (5 whys are answered) about:

script is part of util-linux, and it’s been around apparently since 3.0BSD, which translates to around 1979 and the same time the users command was added. So it’s probably available to you.

1480c1 commented 5 years ago

It seems that script.exe is now included

LigH-de commented 5 years ago

True, so formally closing this issue, whether or not you may re-support using it.

sskras commented 5 years ago

Does anyone know a commit that fixed it?

LigH-de commented 5 years ago

Sorry, missed your request, reopening until full explanation.

sskras commented 4 years ago

@1480c1 on Sep 25, 2019 wrote:

It seems that script.exe is now included

I updated the package, but:

$ pacman -S util-linux
resolving dependencies...
looking for conflicting packages...

Packages (1) util-linux-2.32.1-1

Total Installed Size:  7.65 MiB
Net Upgrade Size:      1.33 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                       [###########################] 100%
(1/1) checking package integrity                     [###########################] 100%
(1/1) loading package files                          [###########################] 100%
(1/1) checking for file conflicts                    [###########################] 100%
(1/1) checking available disk space                  [###########################] 100%
:: Processing package changes...
(1/1) upgrading util-linux                           [###########################] 100%

I still can't find it:

$ pacman -Ql util-linux | grep script
util-linux /usr/bin/scriptreplay.exe
util-linux /usr/share/bash-completion/completions/scriptreplay
util-linux /usr/share/man/man1/scriptreplay.1.gz

$ pacman -Ql util-linux | grep -c exe
40

$ date
Fri, Jan  3, 2020  5:12:35 PM

@1480c1, any ideas?

mati865 commented 4 years ago

@sskras your pacman database is outdated:

$ pacman -Q util-linux
util-linux 2.34-1

$ pacman -Ql util-linux | grep script
util-linux /usr/bin/script.exe
util-linux /usr/bin/scriptreplay.exe
util-linux /usr/share/bash-completion/completions/script
util-linux /usr/share/bash-completion/completions/scriptreplay
util-linux /usr/share/man/man1/script.1.gz
util-linux /usr/share/man/man1/scriptreplay.1.gz

Run pacman -Syu to update all your packages.

1480c1 commented 4 years ago
cddeg@ccom-pc /trunk
$ pacman -F script.exe
msys/util-linux 2.34-1 (base) [installed]
    usr/bin/script.exe
sskras commented 4 years ago

Thanks. I guess it was due to older, unupgraded msys2-runtime or maybe pacman + pacman-mirrors. Which I avoided namely for not knowing the exact commit of the fix.

After the upgrade:

$ uname -a
MSYS_NT-10.0-17134 SAUKRSXM1 3.0.7-338.x86_64 2019-07-11 10:58 UTC x86_64 Msys

saukrs@SAUKRSXM1 MSYS ~/debug/scripts
$ pacman -Q pacman pacman-mirrors msys2-runtime
error: GPGME error: Invalid crypto engine
error: GPGME error: Invalid crypto engine
error: GPGME error: Invalid crypto engine
pacman 5.2.1-6
pacman-mirrors 20200329-1
msys2-runtime 3.0.7-6

... I got my beloved script back:

$ pacman -Qo $(which script.exe)
/usr/bin/script.exe is owned by util-linux 2.35.1-1

I confirm the issue was fixed and could be closed. Thanks again.