View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012184 | CMake | Modules | public | 2011-05-11 16:44 | 2014-06-02 08:39 | ||||
Reporter | wheat | ||||||||
Assigned To | jschueller | ||||||||
Priority | normal | Severity | tweak | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Apple | OS | Mac OS X | OS Version | Snow Leopard | ||||
Product Version | CMake 2.8.4 | ||||||||
Target Version | Fixed in Version | CMake 3.0 | |||||||
Summary | 0012184: SWIG_ADD_MODULE generates wrong file name for Ruby under Mac OS X | ||||||||
Description | Ruby requires the extension to be named as "foo.bundle", but SWIG_ADD_MODULE generates the target as "libfoo.so". | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | 0001-UseSWIG-adjust-module-name-for-ruby.patch [^] (4,807 bytes) 2012-04-02 16:03 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0029060) Felix Schwitzer (reporter) 2012-04-02 16:11 |
The problem exists not only on Mac OSX, but also on linux and windows (cygwin and mingw). I dug into ruby's own build system and makefile generator (generate_makefile in mkmf.rb) and found, that the name for the extension module is "$(TARGET).#{CONFIG['DLEXT']}", so the library name is the module name without prefix and the extension(suffix) is platform dependent (.so on linux/cygwin/wingw, .bundle on mac). I believe the best is to ask the ruby-interpreter for the extension, like FindRuby.cmake it does for RUBY_ARCH and others. I implemented this approach in the attached patch. The patch generates a dependency to FindRuby, but when building a ruby extension the assumption that a ruby interpreter is installed on the build machine is reasonable, or isn't it? |
(0034607) jschueller (developer) 2013-11-28 04:28 |
Here is a more naive approach: http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=74f5545d0aa0a4ba6856b1280782b2c23185a6e1 [^] |
(0034612) Felix Schwitzer (reporter) 2013-11-28 16:16 |
Great. I tested your patch and it works fine for me, thanks. I checked also the naming convention for ruby 2.0 and it seems that nothing changed here. Maybe my initial approach was a little bit too intrusive... |
(0034680) jschueller (developer) 2013-12-02 13:06 |
http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=f3a10191e714e39965c43b704ac17024968bbf31;hp=406635fd6c35e046a2f8b5647c49beae6c7f5f00 [^] |
(0036097) Robert Maynard (manager) 2014-06-02 08:39 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-05-11 16:44 | wheat | New Issue | |
2012-02-11 11:55 | Rolf Eike Beer | Assigned To | => Mathieu Malaterre |
2012-02-11 11:55 | Rolf Eike Beer | Status | new => assigned |
2012-02-11 11:55 | Rolf Eike Beer | Category | CMake => Modules |
2012-04-02 16:03 | Felix Schwitzer | File Added: 0001-UseSWIG-adjust-module-name-for-ruby.patch | |
2012-04-02 16:11 | Felix Schwitzer | Note Added: 0029060 | |
2013-11-28 04:27 | jschueller | Assigned To | Mathieu Malaterre => jschueller |
2013-11-28 04:28 | jschueller | Note Added: 0034607 | |
2013-11-28 16:16 | Felix Schwitzer | Note Added: 0034612 | |
2013-12-02 13:06 | jschueller | Note Added: 0034680 | |
2013-12-02 13:06 | jschueller | Status | assigned => resolved |
2013-12-02 13:06 | jschueller | Fixed in Version | => CMake 3.0 |
2013-12-02 13:06 | jschueller | Resolution | open => fixed |
2014-06-02 08:39 | Robert Maynard | Note Added: 0036097 | |
2014-06-02 08:39 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |