meh / ruby-tesseract-ocr

A Ruby wrapper library to the tesseract-ocr API.
629 stars 74 forks source link

CompliationError #18

Closed kiwiwin closed 11 years ago

kiwiwin commented 11 years ago
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/ffi-inline-0.0.4.3/lib/ffi/inline/compilers/gcc.rb:35:in `compile': compile error: see logs at /tmp/.ffi-inline-1000/a8cf93ed3dd2ddcfa6919b6e0decd89a36a9dd30.log (CompilationError)
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/ffi-inline-0.0.4.3/lib/ffi/inline/builders/c.rb:114:in `shared_object'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/ffi-inline-0.0.4.3/lib/ffi/inline/builders.rb:90:in `block in build'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/ffi-inline-0.0.4.3/lib/ffi/inline/builders.rb:87:in `instance_eval'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/ffi-inline-0.0.4.3/lib/ffi/inline/builders.rb:87:in `build'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/ffi-inline-0.0.4.3/lib/ffi/inline/inline.rb:54:in `singleton_inline'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/ffi-inline-0.0.4.3/lib/ffi/inline/inline.rb:39:in `inline'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/tesseract-ocr-0.1.5/lib/tesseract/c.rb:34:in `<module:C>'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/tesseract-ocr-0.1.5/lib/tesseract/c.rb:31:in `<module:Tesseract>'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/tesseract-ocr-0.1.5/lib/tesseract/c.rb:29:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/tesseract-ocr-0.1.5/lib/tesseract/api.rb:26:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/tesseract-ocr-0.1.5/lib/tesseract-ocr.rb:35:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/tesseract-ocr-0.1.5/lib/tesseract.rb:25:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from test.rb:1:in `<main>'
kiwiwin commented 11 years ago

i look into the log . found this error information. Is misspelling error in ffi-inline?

g++ -shared -fPIC    -o /tmp/.ffi-inline-1000/a8cf93ed3dd2ddcfa6919b6e0decd89a36a9dd30.so /tmp/.ffi-inline-1000/a8cf93ed3dd2ddcfa6919b6e0decd89a36a9dd30.cpp -ltesseract 2>>/tmp/.ffi-inline-1000/a8cf93ed3dd2ddcfa6919b6e0decd89a36a9dd30.log
/tmp/.ffi-inline-1000/a8cf93ed3dd2ddcfa6919b6e0decd89a36a9dd30.cpp:1:30: fatal error: tesseract/strngs.h: No such file or directory
compilation terminated.
g++ -shared -fPIC    -o /tmp/.ffi-inline-1000/a8cf93ed3dd2ddcfa6919b6e0decd89a36a9dd30.so /tmp/.ffi-inline-1000/a8cf93ed3dd2ddcfa6919b6e0decd89a36a9dd30.cpp -ltesseract 2>>/tmp/.ffi-inline-1000/a8cf93ed3dd2ddcfa6919b6e0decd89a36a9dd30.log
/tmp/.ffi-inline-1000/a8cf93ed3dd2ddcfa6919b6e0decd89a36a9dd30.cpp:1:30: fatal error: tesseract/strngs.h: No such file or directory
compilation terminated.
g++ -shared -fPIC    -o /tmp/.ffi-inline-1000/a8cf93ed3dd2ddcfa6919b6e0decd89a36a9dd30.so /tmp/.ffi-inline-1000/a8cf93ed3dd2ddcfa6919b6e0decd89a36a9dd30.cpp -ltesseract 2>>/tmp/.ffi-inline-1000/a8cf93ed3dd2ddcfa6919b6e0decd89a36a9dd30.log
/tmp/.ffi-inline-1000/a8cf93ed3dd2ddcfa6919b6e0decd89a36a9dd30.cpp:1:30: fatal error: tesseract/strngs.h: No such file or directory
compilation terminated.
meh commented 11 years ago

You're missing tesseract-ocr headers.

kiwiwin commented 11 years ago

thanks my problem fixed

leoromanovsky commented 10 years ago

@kiwiwin How did you fix it?

coreyleveen commented 8 years ago

@leoromanovsky I was able to fix by installing libleptonica-dev and libtesseract-dev