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

cmake build does not generate 64 bit build for windows. #382

Closed
xpol opened this issue Jun 7, 2015 · 5 comments · Fixed by #383
Closed

cmake build does not generate 64 bit build for windows. #382

xpol opened this issue Jun 7, 2015 · 5 comments · Fixed by #383
Assignees

Comments

@xpol
Copy link
Contributor

xpol commented Jun 7, 2015

cmake build does not generate 64 bit build for windows when luarocks installed with a 64 bit lua.

@ignacio
Copy link
Contributor

ignacio commented Jun 8, 2015

We need to add -DCMAKE_GENERATOR_PLATFORM=x64 to the command line.
I wonder why CMake does not do that by default.

ignacio added a commit to ignacio/luarocks that referenced this issue Jun 8, 2015
Adds -DCMAKE_GENERATOR_PLATFORM=x64 when needed. It seems that
CMake does not do that by default (although I might be wrong on that).

fixes luarocks#382
@ignacio
Copy link
Contributor

ignacio commented Jun 8, 2015

@xpol could you try the fix I submitted here ?

@ignacio ignacio self-assigned this Jun 8, 2015
@ignacio
Copy link
Contributor

ignacio commented Jun 16, 2015

Meh, I'm not happy with this. To be able to use CMAKE_GENERATOR_PLATFORM=x64 we need to know if we're on Windows, using MSVC and Lua has been built as 64 bits.
When using makefiles, the above does not apply. I also don't know what happens when using Mingw.

Right now, I'm looking for a way to get cmake to report which compiler is going to use.

ignacio added a commit to ignacio/luarocks that referenced this issue Jun 17, 2015
Only when using Windows 64 bits and the msvc compiler. CMake
uses the x86 generator by default. We need to tell it explicitly
that we wan't to use the x64 generator.

refs luarocks#382
ignacio added a commit to ignacio/luarocks that referenced this issue Jun 24, 2015
Adds -DCMAKE_GENERATOR_PLATFORM=x64 when needed. It seems that
CMake does not do that by default (although I might be wrong on that).

fixes luarocks#382
ignacio added a commit to ignacio/luarocks that referenced this issue Jun 24, 2015
Only when using Windows 64 bits and the msvc compiler. CMake
uses the x86 generator by default. We need to tell it explicitly
that we wan't to use the x64 generator.

refs luarocks#382
ignacio added a commit to ignacio/luarocks that referenced this issue Jun 25, 2015
Adds -DCMAKE_GENERATOR_PLATFORM=x64 when needed. It seems that
CMake does not do that by default (although I might be wrong on that).

fixes luarocks#382
ignacio added a commit to ignacio/luarocks that referenced this issue Jun 25, 2015
Only when using Windows 64 bits and the msvc compiler. CMake
uses the x86 generator by default. We need to tell it explicitly
that we wan't to use the x64 generator.

refs luarocks#382
@xpol
Copy link
Contributor Author

xpol commented Sep 7, 2015

I'm back here again.
Today i tried the Windows 64 bit build for lua-rapidjson.

But it seems have issue when install busted.
Every depended module has no install error but it still reports the missing depends.

Missing dependencies for busted:
say >= 1.3-0
mediator_lua >= 1.1.1-0
penlight >= 1.3.2-2
luassert >= 1.7.8-0
dkjson >= 2.1.0
lua_cliargs >= 2.5-0
luasocket >= 2.0.1
lua-term >= 0.1-1
luafilesystem >= 1.5.0

Missing dependencies for penlight:
luafilesystem

See full build log here on appveyor.

I don't know exactly is this due to luarocks or busted or just my install_lua.bat has gone wrong.

@ignacio
Copy link
Contributor

ignacio commented Sep 7, 2015

This may not be a LuaRocks issue. It is CMake that it is using a newer Visual Studio version instead of the one you chose in appveyor. You need to choose the generator when building, and you should do that in your config.lua, by setting cmake_generator to the appropiate value.
This might be a nice addition to https://github.com/ignacio/lua-appveyor-example

I'm testing a fix for that.

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

Successfully merging a pull request may close this issue.

2 participants