View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012172CMakeModulespublic2011-05-09 23:122012-04-19 13:05
ReporterLuiz Angelo Daros de Luca 
Assigned ToAlex Neundorf 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSUbuntuOS Version11.04
Product VersionCMake 2.8.3 
Target VersionCMake 2.8.8Fixed in VersionCMake 2.8.8 
Summary0012172: [PATCH] FindRuby does not find ruby-1.9.1 shipped with (k)ubuntu
DescriptionHello,

FindRuby only found the 1.8.6 version of my ruby installation, even if I force the RUBY_EXECUTABLE name.
Steps To Reproduceinstall ubuntu
install both ruby1.8-dev and ruby1.9.1-dev

Use in cmake:

FIND_PACKAGE( Ruby REQUIRED )
SET( RUBY_EXECUTABLE "ruby1.9.1" )

It did not find the ruby library. because it misses a "-" and it does not use full version. Also, RUBY_EXECUTABLE is not an common input. My config is kind of a hack but the fix is still valid.
Additional InformationI did a patch to fix this issue when library is libruby-1.x.x.

I also noticed that there is both RUBY_MAJOR_VERSION and RUBY_VERSION_MAJOR. Is it all right?

Also, some parameters use Ruby_XXX form instead of RUBY_XXX. I guess the default in cmake should be the latter (but it will break previous uses).

At Last, if I have multiple ruby installations, I cannot simply set:

(Ruby_FIND_VERSION "1.9")

This should be the easiest solution. However, I'm no expert in cmake lang.
TagsNo tags attached.
Attached Filespatch file icon find-ruby-library.patch [^] (1,022 bytes) 2011-05-09 23:12 [Show Content]

 Relationships
related to 0005531closedAlex Neundorf Special handling for ruby vendor directories 

  Notes
(0026638)
Alex Neundorf (developer)
2011-05-27 15:40

So your issue is actually two issues ?

1) also look for ruby-${_RUBY_VERSION_SHORT} ruby-${RUBY_VERSION}

2) support specifying which version of ruby you want ?

Alex
(0026639)
Luiz Angelo Daros de Luca (reporter)
2011-05-27 15:53

Yes. The first is the critical one and I have provided a patch.

The second one is just a suggestion that a cmake expert can fix quickly
(0028202)
Alex Neundorf (developer)
2012-01-05 15:55

Fixed RUBY_VERSION_MAJOR vs. RUBY_MAJOR_VERSION with 93c55ec (will be in 2.8.8)

Alex
(0028204)
Alex Neundorf (developer)
2012-01-05 16:18

Specifying the required version is already supported since 2.8.3 via the standard syntax, e.g.:
find_package(Ruby 1.9)

The other two fixes are now merged into next and will be in 2.8.8.

 Issue History
Date Modified Username Field Change
2011-05-09 23:12 Luiz Angelo Daros de Luca New Issue
2011-05-09 23:12 Luiz Angelo Daros de Luca File Added: find-ruby-library.patch
2011-05-10 15:44 Alex Neundorf Assigned To => Alex Neundorf
2011-05-10 15:44 Alex Neundorf Status new => assigned
2011-05-27 15:40 Alex Neundorf Note Added: 0026638
2011-05-27 15:53 Luiz Angelo Daros de Luca Note Added: 0026639
2012-01-04 16:13 Alex Neundorf Relationship added related to 0005531
2012-01-05 15:55 Alex Neundorf Note Added: 0028202
2012-01-05 16:18 Alex Neundorf Note Added: 0028204
2012-01-05 16:18 Alex Neundorf Status assigned => closed
2012-01-05 16:18 Alex Neundorf Resolution open => fixed
2012-04-19 13:05 David Cole Fixed in Version => CMake 2.8.8
2012-04-19 13:05 David Cole Target Version => CMake 2.8.8


Copyright © 2000 - 2018 MantisBT Team