[cmake-developers] FindRuby doesn't find 64-bit Ruby on Windows
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) 0001-Fix-finding-64-bit-Ruby-with-FindRuby-on-Windows.patch Description: Binary data -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] FindRuby doesn't find 64-bit Ruby on Windows
Non-prefixed names shouldn't be used for 64-bit architectures. The only major releases with 64-bit support are 2.0.0 and 2.1.5, and both use the x64- prefix. New patch attached. Follow-up question: Why doesn't FindRuby use Config::CONFIG['LIBRUBY'], 'LIBRUBY_A', 'LIBRUBY_SO' to search for libs? Ruby reports the name of its libraries. On Fri, Feb 6, 2015 at 12:33 PM, Brad King brad.k...@kitware.com wrote: On 02/06/2015 03:29 PM, Michael Smith wrote: 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 Thanks for working on this. Some of the other find modules face similar situation. In order to avoid finding 64-bit binaries when targeting a 32-bit architecture, use of such prefixes could be guarded by if(CMAKE_SIZEOF_VOID_P EQUAL 8) Please revise accordingly. Also please check whether the non-prefixed names should ever be used for 64-bit architectures. Thanks, -Brad 0001-Fix-finding-64-bit-Ruby-with-FindRuby-on-Windows.patch Description: Binary data -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] FindRuby doesn't find 64-bit Ruby on Windows
On Fri, Feb 6, 2015 at 4:42 PM, Ben Boeckel ben.boec...@kitware.com wrote: On Fri, Feb 06, 2015 at 15:00:50 -0800, Michael Smith wrote: Non-prefixed names shouldn't be used for 64-bit architectures. The only major releases with 64-bit support are 2.0.0 and 2.1.5, and both use the x64- prefix. New patch attached. What about AArch64? This only applies to finding libraries on Windows. Follow-up question: Why doesn't FindRuby use Config::CONFIG['LIBRUBY'], 'LIBRUBY_A', 'LIBRUBY_SO' to search for libs? Ruby reports the name of its libraries. Doesn't work for cross-compiles. FindRuby is already querying ruby for libdir. How does that work for cross-compiles but using some of the other config doesn't? --Ben -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers