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
Unable to build x64 version via Luarocks on Windows or without it on Linux #316
Comments
It seems that https://sourceforge.net/projects/luabinaries/files/5.1.5/Tools%20Executables/ is built with Visual C++. |
@kou, thank you, I tried it. There were no errors but no final binary too. I used cygwin with exported environment variables from Visual C++.
x86
After two days of googling and building I can rest:) Glad that Arch exists. Anyway, thank you for your answer! And your PR #312 helped me to build x86 with Lua 5.1. WIthout the PR I got an error. |
Why did you use Cygwin to use Visual C++? |
FYI: Here are my try to build 64bit binary on Debian GNU/Linux: wget https://www.lua.org/ftp/lua-5.1.5.tar.gz
tar xf lua-5.1.5.tar.gz
cd lua-5.1.5
make INSTALL_TOP=/tmp/lua.mingw64 CC=x86_64-w64-mingw32-gcc TO_BIN="lua.exe luac.exe lua51.dll" mingw install
cd -
git clone https://github.com/diegonehab/luasocket.git
cd luasocket/src
make \
prefix=/tmp/lua.mingw64 \
LDIR_mingw=bin/lua \
CDIR_mingw=bin \
LUAINC_mingw=/tmp/lua.mingw64/include \
LUALIB_mingw=/tmp/lua.mingw64/bin/lua51.dll \
CC_mingw=x86_64-w64-mingw32-gcc \
LD_mingw=x86_64-w64-mingw32-gcc \
PLAT=mingw \
all install
cd -
/tmp/lua.mingw64/bin/lua.exe -e 'print(require("socket"))'
# -> table: 0000000000423EF0 |
It was one of my tries when other methods didn't work. I literally lost more time on building luasocket then on making my lua lib with 300 lines of code:)
This is the best answer ever! I'm curious why such things are not in readme? Top level readme file is actually useless right now but this info could be really helpfull for every visitor |
Can we close this? |
@avently This is external_deps_dirs = {
'c:\\my\\mingw64',
'c:\\my\\mingw64\\x86_64-w64-mingw32',
'c:\\Windows\\System32'
} In Set luarocks config variables.PLAT 'mingw' |
Hello. Actually I can't build x64 version of the library using all known ways. But since Luarocks should be the easiest solution I included it in the subject. So if you know any method I can use to build the x64 version of the lib, please, let me know (I can build x86 via Luarocks just fine).
So, what I did:
.\install.cmd
include
directory insiseC:\lua5.1
luarocks install luasocket --server https://luarocks.org/dev
Output:
This is my config-5.1.lua:
How do you build Luasocket with x64 arch?
The text was updated successfully, but these errors were encountered: