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

[lua:x64-mingw-dynamic] vcpkg-built lua.exe doesn't work #14667

Closed
vadi2 opened this issue Nov 20, 2020 · 12 comments
Closed

[lua:x64-mingw-dynamic] vcpkg-built lua.exe doesn't work #14667

vadi2 opened this issue Nov 20, 2020 · 12 comments
Assignees
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed

Comments

@vadi2
Copy link
Contributor

vadi2 commented Nov 20, 2020

Describe the bug
Running lua.exe (REPL) that's built by vcpkg produces no output.

Environment

  • OS: Windows 10
  • Compiler: MinGW-w64 8.1.0

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg install lua
  2. run lua.exe
PS C:\Users\username\Desktop\lua> .\luac.exe -v
Lua 5.4.1  Copyright (C) 1994-2020 Lua.org, PUC-Rio
PS C:\Users\username\Desktop\lua> .\lua.exe -v
PS C:\Users\username\Desktop\lua>

Expected behavior
Something along the lines of, adjusting for the Lua version:

Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio

Additional information
luac.exe (compiler) works fine.

@PhoebeHui PhoebeHui added the requires:repro The issue is not currently repro-able label Nov 20, 2020
@PhoebeHui
Copy link
Contributor

@vadi2, I can't repro this issue with vs2017 on windows.

F:\VCPKG\clean\installed\x86-windows\tools\lua>luac.exe -v
Lua 5.4.1  Copyright (C) 1994-2020 Lua.org, PUC-Rio

F:\VCPKG\clean\installed\x86-windows\tools\lua>lua.exe -v
Lua 5.4.1  Copyright (C) 1994-2020 Lua.org, PUC-Rio

@StarGate-One
Copy link
Contributor

@vadi2, I can't repro this issue with vs2017 on windows.

F:\VCPKG\clean\installed\x86-windows\tools\lua>luac.exe -v
Lua 5.4.1  Copyright (C) 1994-2020 Lua.org, PUC-Rio

F:\VCPKG\clean\installed\x86-windows\tools\lua>lua.exe -v
Lua 5.4.1  Copyright (C) 1994-2020 Lua.org, PUC-Rio

I get the same results @PhoebeHui but using the 64-bit binary:

SYSTEM@ANDROMEDA 11/20/2020 12:45:00 D:\vcpkg_x64\vs2019\prod\installed\x64-windows\tools\lua
->lua.exe -v
Lua 5.4.1 Copyright (C) 1994-2020 Lua.org, PUC-Rio

SYSTEM@ANDROMEDA 11/20/2020 12:45:04 D:\vcpkg_x64\vs2019\prod\installed\x64-windows\tools\lua
->luac.exe -v
Lua 5.4.1 Copyright (C) 1994-2020 Lua.org, PUC-Rio

@vadi2
Copy link
Contributor Author

vadi2 commented Nov 20, 2020

Hm, weird. I wouldn't know what the issue is then off the top of my head.

@PhoebeHui
Copy link
Contributor

It looks you copied the lua files to C:\Users\username\Desktop\lua, right? do you copy the lua.dll as well?

@PhoebeHui
Copy link
Contributor

@vadi2, does this still be a problem for you?

@vadi2
Copy link
Contributor Author

vadi2 commented Dec 9, 2020

My Lua in installed/triplet/tools doesn't work, but it seems to work in other locations, check out this build log: https://github.com/vadi2/vcpkg-lua-reproduction/runs/1524389309?check_suite_focus=true

image

How did you get it to work in installed/triplet/tools? My build file to reproduce it is pretty simple: https://github.com/vadi2/vcpkg-lua-reproduction/actions/runs/410402181/workflow

@vadi2
Copy link
Contributor Author

vadi2 commented Dec 9, 2020

The above is the Lua 5.4.1 port that's in vcpkg. When I build my own 5.1.5 port, lua.exe is only installed in $env:GITHUB_WORKSPACE\vcpkg\installed\x64-mingw-dynamic\tools\lua and that is the one that does not work.

@PhoebeHui PhoebeHui added the category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. label Dec 10, 2020
@PhoebeHui PhoebeHui changed the title [lua] vcpkg-built lua.exe doesn't work [lua:x64-mingw-dynamic] vcpkg-built lua.exe doesn't work Dec 10, 2020
@PhoebeHui
Copy link
Contributor

@vadi2, thanks for the information!

It might relate to mingw, I can't repro this issue with x64-windows triplet which built with vs2019 on win10.

Anyone who could help take a look?

@vadi2
Copy link
Contributor Author

vadi2 commented Dec 10, 2020

Are you certain? In the build setup where it does work, I install VCPKG_ROOT/vcpkg install lua:x64-mingw-dynamic. That should use mingw, right?

@PhoebeHui
Copy link
Contributor

Since you configure with triplet x64-mingw-dynamic, it should use mingw.

It's weird, since when install the tools, it will install the lua.exe and lua.dll from vcpkg\buildtrees\lua\x64-mingw-dynamic-rel\ to ./vcpkg/package diretory, after everything checked, vcpkg will copy them from package directory to vcpkg\installed\x64-mingw-dynamic\tools\lua, that means the lua.exe file are same in both paths. However, one works, one doesn't, I suspect it might relate to the dependency, could you double confirm if the lua.dll copy to the installed directory as well?

@vadi2
Copy link
Contributor Author

vadi2 commented Dec 10, 2020

I appreciate your continued assistance in this 👍

lua.dll is not copied to the installed directory, and that was the problem like you've hinted. That is not done neither by my 5.1.5 port nor the vcpkg-native 5.4.1 port, as visible in this screenshot #14667 (comment).

Perhaps it's not copied because there's only support for msvc and clang copying dll's, but not mingw: #14525

I wonder why does the vcpkg 5.4.1 port populate the \buildtrees folder fully (with lua.exe and lua.dll, where it works) vs my 5.1.5 port which is just about the same but for an older version.

As a hacky workaround, I copied lua.dll into the same folder as lua.exe and that did work!

Copy-Item "$env:GITHUB_WORKSPACE\3rdparty\vcpkg\installed\x64-mingw-dynamic\bin\liblua.dll" `
    "$env:GITHUB_WORKSPACE\3rdparty\vcpkg\installed\x64-mingw-dynamic\tools\lua"
  . $env:GITHUB_WORKSPACE\3rdparty\vcpkg\installed\x64-mingw-dynamic\tools\lua\lua.exe -v
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio

So I guess with the vcpkg-native 5.4.1 port, the only issue is: vcpkg\installed\x64-mingw-dynamic\tools\lua\lua.exe doesn't work, possibly because of #14525.

I'm OK with closing this issue as there's one tracking the source of the problem already.

@PhoebeHui
Copy link
Contributor

Glad you got the issue solved!

Since we already have issue #14525 to track, close this issue now.

@PhoebeHui PhoebeHui added category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed and removed requires:repro The issue is not currently repro-able labels Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed
Projects
None yet
Development

No branches or pull requests

3 participants