setup-msys2 icon indicating copy to clipboard operation
setup-msys2 copied to clipboard

ERROR in dll

Open Zibri opened this issue 2 years ago • 8 comments

in this situation:

    shell: msys2 {0}
    run: |
         revision=$(svn info --show-item revision https or svn ://address...) 

svn command fails. I inspected the reason and it seems the windows dll path is wrong. so no svn commands will work inside scripts too.

Zibri avatar Jul 30 '23 07:07 Zibri

works fine locally at least:

$ svn info --show-item revision https://svn.apache.org/repos/asf/subversion/trunk
1911359

lazka avatar Jul 30 '23 08:07 lazka

It works in "bash" not inside the msys2 {0}. All svn/svnversion commands in configure scripts fail because of this. As a work-around I made an alias to "svn" and "svnversion" commands.

@lazka what do you mean locally? it does work on windows installation. it does not work on github actions.

Zibri avatar Jul 30 '23 18:07 Zibri

I see, thanks.

Just to double check:

  • Did you install subversion with this action?
  • Could you go into more detail regarding your workaround?

lazka avatar Jul 30 '23 18:07 lazka

Yes.. obvously subversion is installed. I checked also opening a live shell... it's a dll problem (paths probably). My workaround is for me only... not for "production"... The solution is to change the PATHS (probably library paths) My workaround was just to alias svn and svnversion with a curl onliner that gets the revision number.

Zibri avatar Jul 30 '23 19:07 Zibri

Yes.. obvously subversion is installed.

Sorry, I wasn't clear. I was worried about the subversion that comes with GitHub Actions (https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md#tools) and this action could in theory be configured to keep the default GHA PATH intact (via the path-type option) and you end up using the wrong subversion.

My workaround was just to alias svn and svnversion with a curl onliner that gets the revision number.

I see, thanks

lazka avatar Jul 30 '23 19:07 lazka

@lazka subversion inside bash on github actions works. It's the one in your msys2 that does not.. but it's not github fault... I think you just need to set the paths right. I can check that for you or we can do it together on a github special shell :D

Zibri avatar Jul 30 '23 21:07 Zibri

I just found out 2 important things about msys2 and github actions:

  1. the problems above seem to involve only the latest 2 releases. these two are not affected. msys2-x86_64-20220128.exe msys2-x86_64-20230318.exe

  2. to add weirder to weird: in github windows-latest, if I use shell: bash and I do:

shell: bash
run: node -e 'const{spawn:spawn}=require("child_process"),bat=spawn("cmd.exe",["/c","setup.bat"]);bat.stdout.on("data",function(t){process.stdout.write(t)});'

I get a very different result than doing:

shell: cmd
run: setup.bat

setup.bat is:

curl -L "https://repo.msys2.org/distrib/x86_64/msys2-x86_64-20230318.exe" -o msysz.exe

msysz.exe install --root C:\msysz --confirm-command
c:\msysz\usr\bin\bash.exe --login -c "pacman -Suy --noconfirm"
c:\msysz\usr\bin\bash.exe --login -c "run_build_script.sh"

the first one (using a wrapper in nodejs that calls cmd.exe) makes everything work as on my windows pc. the second one "sort of" works but gives all kind of problems. I bet it's some environment variable but I don't know enough to dig this more.

Zibri avatar Aug 02 '23 23:08 Zibri

Could you provide the project link which has that actions yaml file?

Biswa96 avatar Aug 03 '23 04:08 Biswa96