[cmake-developers] FindRuby doesn't find 64-bit Ruby on Windows
Michael Smith
michael.smith at puppetlabs.com
Fri Feb 6 15:29:43 EST 2015
It appears FindRuby fails to find 64-bit Ruby on Windows. Debug output is
-- --------FindRuby.cmake debug------------
-- _RUBY_POSSIBLE_EXECUTABLE_NAMES:
ruby1.9;ruby19;ruby;ruby2.1;ruby21;ruby2.0;ruby20;ruby1.8;ruby18
-- _RUBY_POSSIBLE_LIB_NAMES:
ruby;ruby-static;ruby2.1;ruby21;ruby-2.1;ruby-2.1.0;msvcr-ruby210;msvcr-ruby210-static;msvcrt-ruby210;msvcrt-ruby210-static
-- RUBY_ARCH_DIR: C:/tools/ruby215/lib/ruby/2.1.0/x64-mingw32
-- RUBY_HDR_DIR: C:/tools/ruby215/include/ruby-2.1.0
-- RUBY_POSSIBLE_LIB_DIR: C:/tools/ruby215/lib
-- Found RUBY_VERSION: "2.1.0" , short: "2.1", nodot: "21"
-- _RUBY_REQUIRED_VARS:
RUBY_EXECUTABLE;RUBY_INCLUDE_DIR;RUBY_LIBRARY;RUBY_CONFIG_INCLUDE_DIR
-- RUBY_EXECUTABLE: C:/tools/ruby215/bin/ruby.exe
-- RUBY_LIBRARY: RUBY_LIBRARY-NOTFOUND
-- RUBY_INCLUDE_DIR: C:/tools/ruby215/include/ruby-2.1.0
-- RUBY_CONFIG_INCLUDE_DIR: C:/tools/ruby215/include/ruby-2.1.0/x64-mingw32
-- --------------------
-- Could NOT find Ruby (missing: RUBY_LIBRARY) (found suitable version
"2.1.0", minimum required is "1.9")
The 64-bit ruby library names are:
* lib/libx64-mscvrt-ruby210-static.a
* lib/libx64-mscvrt-ruby210.dll.a
* bin/x64-mscvrt-ruby210.dll
I've attached a patch that adds "x64-" prefixed lookup, that addresses the
issue in my environment. The new debug output is
-- --------FindRuby.cmake debug------------
-- _RUBY_POSSIBLE_EXECUTABLE_NAMES:
ruby1.9;ruby19;ruby;ruby2.1;ruby21;ruby2.0;ruby20;ruby1.8;ruby18
-- _RUBY_POSSIBLE_LIB_NAMES:
ruby;ruby-static;ruby2.1;ruby21;ruby-2.1;ruby-2.1.0;msvcr-ruby210;msvcr-ruby210-static;msvcrt-ruby210;msvcrt-ruby210-static;x64-msvcr-ruby210;x64-msvcr-ruby210-static;x64-msvcrt-ruby210;x64-msvcrt-ruby210-static
-- RUBY_ARCH_DIR: C:/tools/ruby215/lib/ruby/2.1.0/x64-mingw32
-- RUBY_HDR_DIR: C:/tools/ruby215/include/ruby-2.1.0
-- RUBY_POSSIBLE_LIB_DIR: C:/tools/ruby215/lib
-- Found RUBY_VERSION: "2.1.0" , short: "2.1", nodot: "21"
-- _RUBY_REQUIRED_VARS:
RUBY_EXECUTABLE;RUBY_INCLUDE_DIR;RUBY_LIBRARY;RUBY_CONFIG_INCLUDE_DIR
-- RUBY_EXECUTABLE: C:/tools/ruby215/bin/ruby.exe
-- RUBY_LIBRARY: C:/tools/ruby215/lib/libx64-msvcrt-ruby210.dll.a
-- RUBY_INCLUDE_DIR: C:/tools/ruby215/include/ruby-2.1.0
-- RUBY_CONFIG_INCLUDE_DIR: C:/tools/ruby215/include/ruby-2.1.0/x64-mingw32
-- --------------------
-- Found Ruby: C:/tools/ruby215/bin/ruby.exe (found suitable version
"2.1.0", minimum required is "1.9")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150206/6181320c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-finding-64-bit-Ruby-with-FindRuby-on-Windows.patch
Type: application/octet-stream
Size: 1213 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150206/6181320c/attachment.obj>
More information about the cmake-developers
mailing list