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

require 'libsvm' fails (MS windows) #10

Open
jeppevb opened this issue Sep 6, 2012 · 12 comments
Open

require 'libsvm' fails (MS windows) #10

jeppevb opened this issue Sep 6, 2012 · 12 comments

Comments

@jeppevb
Copy link

jeppevb commented Sep 6, 2012

I've installed ruby, devkit and rubygems and sucessfully installed the rb-libsvm gem. When I try to run the examples or go require 'libsvm' in irb i get this:

C:\dev>ruby
require 'libsvm'
^Z
c:/dev/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': 193: %1 is not a valid Win32 application.   - c:/dev/ruby193/lib/ruby/gems/1.9.1/gems/rb-libsvm-1.0.8/lib/libsvm/libsvm_ext.so (LoadError)
        from c:/dev/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from c:/dev/ruby193/lib/ruby/gems/1.9.1/gems/rb-libsvm-1.0.8/lib/libsvm.rb:2:in `'
        from c:/dev/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
        from c:/dev/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
        from c:/dev/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
        from -:1:in `'
@febeling
Copy link
Owner

febeling commented Sep 6, 2012

I don't have access to a Windows machine, so I can't really help. Patches would be welcome.

@jeppevb
Copy link
Author

jeppevb commented Sep 6, 2012

I'll look into it. I suppose the module does not compile properly for
windows.

On 6 September 2012 21:52, Florian Ebeling [email protected] wrote:

I don't have access to a Windows machine, so I can't really help. Patches
would be welcome.


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-8345049.

@neovintage
Copy link
Collaborator

I only have access to windows via a virtual machine. I'll see if I have
everything I need to try to do it.

On Thu, Sep 6, 2012 at 12:52 PM, Florian Ebeling
[email protected]:

I don't have access to a Windows machine, so I can't really help. Patches
would be welcome.


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-8345049.

@jeppevb
Copy link
Author

jeppevb commented Sep 6, 2012

I installed the libsvm-ruby-swig (0.4.0) gem (both gems installed) and the error changed.

C:\dev\Ruby193\lib\ruby\gems\1.9.1\gems\rb-libsvm-1.0.8\examples>ruby toy.rb
toy.rb:4:in `': uninitialized constant Libsvm::Problem (NameError)
C:\dev\Ruby193\lib\ruby\gems\1.9.1\gems\rb-libsvm-1.0.8\examples>ruby text.rb
text.rb:30:in `block in ': uninitialized constant Libsvm::Node (NameError)
        from text.rb:28:in `each'
        from text.rb:28:in `'
C:\dev\Ruby193\lib\ruby\gems\1.9.1\gems\rb-libsvm-1.0.8\examples>gem list

@ksaveras
Copy link

ksaveras commented Nov 2, 2013

Need MS windows version also

@ksaveras
Copy link

ksaveras commented Nov 2, 2013

when You install libsvm-ruby-swig, it loads libsvm.rb file, not extension.
When You have rb-libsvm only - it tries to load libsvm_ext.so but fails on windows

@febeling
Copy link
Owner

febeling commented Nov 2, 2013

This package, rb-libsvm, doesn't support Windows, unfortunately (unless somebody supplies a patch).

Please note that libsvm-ruby-swig and rb-libsvm packages are alternatives and not meant to be used together.

@febeling
Copy link
Owner

Just saw that rake-compiler has support for cross-compiling now, and also provides a special rake-compiler-dev-box VM for this. Might make implementing this thing easier.

https://github.com/rake-compiler/rake-compiler#cross-compilation---the-future-is-now

@febeling
Copy link
Owner

I don't find the time to do this. So the new status pretty much is: PR welcome.

@georgeu2000
Copy link

@jeppevb - Not really an answer to your issue, but I'll share with you my experience. Using Ruby on Windows makes it more difficult than Mac or Ubuntu. I suggest installing Ubuntu in Windows. It is very simple and you do not need dual boot.

Repository owner deleted a comment Feb 26, 2023
@febeling
Copy link
Owner

@Kraviscloud What is gp?

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

No branches or pull requests

6 participants
@neovintage @febeling @ksaveras @georgeu2000 @jeppevb and others