CrossRef / pdfextract

MOVED TO https://gitlab.com/crossref/pdfextract
https://gitlab.com/crossref/pdfextract
MIT License
508 stars 89 forks source link

Install Error #26

Open antoniocaruso opened 9 years ago

antoniocaruso commented 9 years ago

Fedora 22 ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux] gcc version 5.1.1 20150422 (Red Hat 5.1.1-1) (GCC)

I try to build and install with gem install pdf-extract

this is the output:

Fetching: libsvm-ruby-swig-0.4.0.gem (100%) Building native extensions. This could take a while... /usr/share/rubygems/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /home/antonio in PATH, mode 040777 ERROR: Error installing pdf-extract: ERROR: Failed to build gem native extension.

/usr/bin/ruby -r ./siteconf20150527-13449-o56yyi.rb extconf.rb

creating Makefile

make "DESTDIR=" clean rm -f rm -f libsvm.so .o *.bak mkmf.log ..time

make "DESTDIR=" g++ -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic -m64 -o libsvm_wrap.o -c libsvm_wrap.cxx libsvm_wrap.cxx: In function ‘void SWIG_Ruby_define_class(swig_typeinfo)’: libsvm_wrap.cxx:1487:9: warning: variable ‘klass’ set but not used [-Wunused-but-set-variable] VALUE klass; ^ libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_svm_typeset(int, VALUE, VALUE)’: libsvm_wrap.cxx:2126:136: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:2131:131: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_svm_typeget(int, VALUE, VALUE)’: libsvm_wrap.cxx:2154:136: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_kernel_typeset(int, VALUE, VALUE)’: libsvm_wrap.cxx:2179:139: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:2184:134: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_kernel_typeget(int, VALUE, VALUE)’: libsvm_wrap.cxx:2207:139: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_degreeset(int, VALUE, VALUE)’: libsvm_wrap.cxx:2232:134: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:2237:129: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_degreeget(int, VALUE, VALUE)’: libsvm_wrap.cxx:2260:134: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_gammaset(int, VALUE, VALUE)’: libsvm_wrap.cxx:2285:133: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:2290:131: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_gammaget(int, VALUE, VALUE)’: libsvm_wrap.cxx:2313:133: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_coef0set(int, VALUE, VALUE)’: libsvm_wrap.cxx:2338:133: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:2343:131: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_coef0get(int, VALUE, VALUE)’: libsvm_wrap.cxx:2366:133: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_cache_sizeset(int, VALUE, VALUE)’: libsvm_wrap.cxx:2391:138: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:2396:136: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_cache_sizeget(int, VALUE, VALUE)’: libsvm_wrap.cxx:2419:138: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_epsset(int, VALUE, VALUE)’: libsvm_wrap.cxx:2444:131: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:2449:129: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_epsget(int, VALUE, VALUE)’: libsvm_wrap.cxx:2472:131: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_Cset(int, VALUE, VALUE)’: libsvm_wrap.cxx:2497:129: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:2502:127: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_Cget(int, VALUE, VALUE)’: libsvm_wrap.cxx:2525:129: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_nr_weightset(int, VALUE, VALUE)’: libsvm_wrap.cxx:2550:137: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:2555:132: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_nr_weightget(int, VALUE, VALUE)’: libsvm_wrap.cxx:2578:137: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_weight_labelset(int, VALUE, VALUE)’: libsvm_wrap.cxx:2603:140: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:2608:133: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_weight_labelget(int, VALUE, VALUE)’: libsvm_wrap.cxx:2631:140: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_weightset(int, VALUE, VALUE)’: libsvm_wrap.cxx:2656:134: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:2661:130: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_weightget(int, VALUE, VALUE)’: libsvm_wrap.cxx:2684:134: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_nuset(int, VALUE, VALUE)’: libsvm_wrap.cxx:2709:130: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:2714:128: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_nuget(int, VALUE, VALUE)’: libsvm_wrap.cxx:2737:130: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_pset(int, VALUE, VALUE)’: libsvm_wrap.cxx:2762:129: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:2767:127: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_pget(int, VALUE, VALUE)’: libsvm_wrap.cxx:2790:129: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_shrinkingset(int, VALUE, VALUE)’: libsvm_wrap.cxx:2815:137: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:2820:132: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_shrinkingget(int, VALUE, VALUE)’: libsvm_wrap.cxx:2843:137: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_probabilityset(int, VALUE, VALUE)’: libsvm_wrap.cxx:2868:139: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:2873:134: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_parameter_probabilityget(int, VALUE, VALUE)’: libsvm_wrap.cxx:2896:139: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_problem_lset(int, VALUE, VALUE)’: libsvm_wrap.cxx:2960:127: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:2965:124: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_problem_lget(int, VALUE, VALUE)’: libsvm_wrap.cxx:2988:127: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_problem_yset(int, VALUE, VALUE)’: libsvm_wrap.cxx:3013:127: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3018:125: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_problem_yget(int, VALUE, VALUE)’: libsvm_wrap.cxx:3041:127: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_problem_xset(int, VALUE, VALUE)’: libsvm_wrap.cxx:3066:127: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3071:128: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_problem_xget(int, VALUE, VALUE)’: libsvm_wrap.cxx:3094:127: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svmtrain(int, VALUE, VALUE)’: libsvm_wrap.cxx:3158:144: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3163:146: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_crossvalidation(int, VALUE, VALUE)’: libsvm_wrap.cxx:3194:155: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3199:157: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3204:143: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3209:144: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_savemodel(int, VALUE, VALUE)’: libsvm_wrap.cxx:3236:142: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3241:147: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_loadmodel(int, VALUE, VALUE)’: libsvm_wrap.cxx:3268:142: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_get_svmtype(int, VALUE, VALUE)’: libsvm_wrap.cxx:3294:149: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_get_nrclass(int, VALUE, VALUE)’: libsvm_wrap.cxx:3318:149: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_getlabels(int, VALUE, VALUE)’: libsvm_wrap.cxx:3343:147: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3348:135: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_get_svrprobability(int, VALUE, VALUE)’: libsvm_wrap.cxx:3371:156: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_predictvalues(int, VALUE, VALUE)’: libsvm_wrap.cxx:3399:151: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3404:150: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3409:142: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svmpredict(int, VALUE, VALUE)’: libsvm_wrap.cxx:3435:144: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3440:143: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_predictprobability(int, VALUE, VALUE)’: libsvm_wrap.cxx:3470:156: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3475:155: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3480:147: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_destroymodel(int, VALUE, VALUE)’: libsvm_wrap.cxx:3502:144: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_checkparameter(int, VALUE, VALUE)’: libsvm_wrap.cxx:3528:154: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3533:156: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_check_probabilitymodel(int, VALUE, VALUE)’: libsvm_wrap.cxx:3557:160: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_newint(int, VALUE, VALUE)’: libsvm_wrap.cxx:3581:133: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_deleteint(int, VALUE, VALUE)’: libsvm_wrap.cxx:3603:131: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_intgetitem(int, VALUE, VALUE)’: libsvm_wrap.cxx:3629:132: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3634:137: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_intsetitem(int, VALUE, VALUE)’: libsvm_wrap.cxx:3662:132: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3667:137: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3672:134: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_newdouble(int, VALUE, VALUE)’: libsvm_wrap.cxx:3695:136: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_deletedouble(int, VALUE, VALUE)’: libsvm_wrap.cxx:3717:137: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_doublegetitem(int, VALUE, VALUE)’: libsvm_wrap.cxx:3743:138: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3748:140: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_doublesetitem(int, VALUE, VALUE)’: libsvm_wrap.cxx:3776:138: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3781:140: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3786:140: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_nodearray(int, VALUE, VALUE)’: libsvm_wrap.cxx:3834:137: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_node_arrayset(int, VALUE, VALUE)’: libsvm_wrap.cxx:3865:144: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3870:141: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3875:141: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3880:144: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_node_arraydestroy(int, VALUE, VALUE)’: libsvm_wrap.cxx:3901:148: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_nodematrix(int, VALUE, VALUE)’: libsvm_wrap.cxx:3924:138: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_node_matrixset(int, VALUE, VALUE)’: libsvm_wrap.cxx:3952:146: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3957:142: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx:3962:145: error: format not a string literal and no format arguments [-Werror=format-security] libsvm_wrap.cxx: In function ‘VALUE _wrap_svm_node_matrixdestroy(int, VALUE, VALUE)’: libsvm_wrap.cxx:3983:150: error: format not a string literal and no format arguments [-Werror=format-security] cc1plus: some warnings being treated as errors Makefile:222: set di istruzioni per l'obiettivo "libsvmwrap.o" non riuscito make: ** [libsvm_wrap.o] Errore 1

make failed, exit code 2

Gem files will remain installed in /home/antonio/.gem/ruby/gems/libsvm-ruby-swig-0.4.0 for inspection.

Results logged to /home/antonio/.gem/ruby/extensions/x86_64-linux/libsvm-ruby-swig-0.4.0/gem_make.out

rossmounce commented 9 years ago

I have a similar problem, related to https://github.com/CrossRef/pdfextract/issues/13 perhaps? I can't install pdf-extract via the suggested gem install route :-1:

$ gcc --version gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2 $ ruby --version ruby 2.1.2p95 (2014-05-08) [x86_64-linux-gnu]

blah blah...

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

Gem files will remain installed in /var/lib/gems/2.1.0/gems/libsvm-ruby-swig-0.4.0 for inspection. Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/libsvm-ruby-swig-0.4.0/gem_make.out

Azzaare commented 8 years ago

I have a similar problem with a config similar to rossmounce in the previous post.

Any update on a solution?

msegado commented 8 years ago

+1 =/

msegado commented 8 years ago

OK, thankfully someone maintains a fork of libsvm-ruby-swig that fixes the install issue (https://github.com/EbookGlue/libsvm-ruby-swig). To use:

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

With this and the fixes in #4, I was able to install and run on Ubuntu 14.04.

jhedrick commented 8 years ago

Same issue on Ubuntu 15.04 (Linux 3.19.0-31-generic #36-Ubuntu i686) Thanks msegado for the work around! used the following procedure on a fresh install.

sudo apt-get install build-essential
sudo apt-get install ruby-full
sudo apt-get install zlib1g-dev
gem install nokogiri
sudo apt-get install libsqlite3-dev
sudo gem install specific_install
sudo gem specific_install https://github.com/EbookGlue/libsvm-ruby-swig.git
sudo gem install pdf-reader -v 1.1.1
sudo gem install prawn -v 0.12.0
sudo gem install pdf-extract
xuhdev commented 8 years ago

@jhedrick It seems that the latest version no longer uses libsvm-ruby-swig . But you have to install it from the repository, which has not been uploaded to rubygem yet.

omri9741 commented 7 years ago

Thanks @jhedrick! works for Ubuntu 16.04

Chutlhu commented 6 years ago

Thanks @jhedrick! works for me (Mint 18) as well