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

Compiling in Quantal (Ubuntu 12.10) #7

Open
arski opened this issue Jan 7, 2013 · 7 comments
Open

Compiling in Quantal (Ubuntu 12.10) #7

arski opened this issue Jan 7, 2013 · 7 comments

Comments

@arski
Copy link

arski commented Jan 7, 2013

Getting these errors:

make
compiling libsvm_wrap.cxx
libsvm_wrap.cxx: In function ‘void SWIG_Ruby_define_class(swig_type_info_)’:
libsvm_wrap.cxx:1284:9: warning: variable ‘klass’ set but not used [-Wunused-but-set-variable]
libsvm_wrap.cxx: In function ‘int SWIG_AsCharPtrAndSize(VALUE, char__, size_t_, int_)’:
libsvm_wrap.cxx:1707:30: error: ‘STR2CSTR’ was not declared in this scope
make: *_* [libsvm_wrap.o] Error 1

Any idea how to fix?

@arski
Copy link
Author

arski commented Jan 8, 2013

PS. If I try to install the gem from this repo, and not the 'libsvm-ruby-swig', I also get a bunch of errors like the following:

libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_svm_type_set(int, VALUE*, VALUE)’:
libsvm_wrap.cxx:2144:5: error: format not a string literal and no format arguments [-Werror=format-security]
libsvm_wrap.cxx:2149:5: error: format not a string literal and no format arguments [-Werror=format-security]

These are the same as in many other gems, e.g. eventmachine/eventmachine#345 - should be an easy enough fix.

Cheers

@tomz
Copy link
Owner

tomz commented Jan 8, 2013

I think this was fixed in liblinear-ruby-swig with this pull request tomz/liblinear-ruby-swig@719b307, looks like we have the same issue here, feel free to patch it the same way. I will take a look at this once I have a dev environment set up for Ubuntu 12.10

shantanubala added a commit to EbookGlue/libsvm-ruby-swig that referenced this issue Mar 24, 2013
This fixes issue tomz#7 that involves problems compiling in Ubuntu 12.10.
@hh
Copy link

hh commented Sep 9, 2013

+1 please relook at this. More and more folks on Ubuntu 12.10 now

@LogIN-
Copy link

LogIN- commented Nov 30, 2014

👍

@amiraliakbari
Copy link

+1

Error message on Ubuntu 14.10:

compiling libsvm_wrap.cxx
libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_svm_type_set(int, VALUE*, VALUE)’:
libsvm_wrap.cxx:1396:83: error: format not a string literal and no format arguments [-Werror=format-security]
 #define SWIG_Error(code, msg)              rb_raise(SWIG_Ruby_ErrorType(code), msg)
                                                                                   ^
libsvm_wrap.cxx:1796:45: note: in expansion of macro ‘SWIG_Error’
 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
                                             ^
libsvm_wrap.cxx:2144:5: note: in expansion of macro ‘SWIG_exception_fail’
     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "svm_parameter *","svm_type", 1, self ));

# many more similar error lines...

libsvm_wrap.cxx:4001:5: note: in expansion of macro ‘SWIG_exception_fail’
     SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "svm_node **","svm_node_matrix_destroy", 1, argv[0] )); 
     ^
cc1plus: some warnings being treated as errors
Makefile:212: recipe for target 'libsvm_wrap.o' failed
make: *** [libsvm_wrap.o] Error 1

make failed, exit code 2

@msegado
Copy link

msegado commented Nov 6, 2015

+1. Ubuntu 14.04

@msegado
Copy link

msegado commented Nov 6, 2015

...thankfully user EbookGlue has a fork that fixes this. The following worked on Ubuntu 14.04:

gem install specific_install
gem specific_install https://github.com/EbookGlue/libsvm-ruby-swig.git

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

No branches or pull requests

6 participants