Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Lib.so issues when calling Pygments::Lexer #10
Comments
|
Try :exe => 'python2.6' On Sat, Oct 22, 2011 at 2:25 PM, Yorick <
|
yholkamp
closed this
Oct 22, 2011
yholkamp
reopened this
Oct 22, 2011
|
This must be an issue with the .so lookup code /cc @halostatue Can you make sure you have a python-dev package installed? |
yholkamp
commented
Oct 22, 2011
|
After running a |
yholkamp
closed this
Oct 22, 2011
|
Can you check what The python-dev package adds a .so symlink to an existing libpython.so.1 usually, which rubypython also looks for. What is the full filename for libpython on your machine? |
halostatue
commented
Oct 23, 2011
|
wouldn't it be ls -alh /usr/lib/libpython2_so_ (no dots) to get the best information? |
yholkamp
commented
Oct 23, 2011
|
Running that command even more generic gives the following output;
|
halostatue
commented
Oct 23, 2011
|
Interesting. I'm guessing that if you removed python-dev (actually python2.6-dev), both symlinks (libpython2.6.so and libpython2.6.so.1) would be removed. I can add another special case for .so.1.0 so that python-dev isn't necessary, but that seems a little ugly. |
halostatue
commented
Oct 23, 2011
|
OK, so that guess was wrong. However, we should be looking for libpython2.6.so.1 anyway, per pythonexec.rb line 61. I'm confused, now. |
|
Can you try something like: |
sairam
commented
Oct 23, 2011
|
If you are looking for the solution for a install python-devel via yum . it would point the yum install python-devel
cd /usr/lib
ln -sf /usr/lib64/libpython2.6.so
ln -sf /usr/lib64/libpython2.6.so.1.0 |
halostatue
commented
Oct 23, 2011
|
@sairam: that's no longer necessary as of rubypython 0.5.3. The problem is that for some reason, libpython2.6.so.1 isn't being seen and it should be. |
sairam
commented
Oct 24, 2011
|
looks like rubypython 0.5.3 was released just yesterday. tried upgrading to 0.5.3 . my gemfile locked it to 0.5.1 and hence the problem . Thanks @halostatue |
yholkamp
commented
Oct 24, 2011
|
@tmm1:```
|
lmarburger
commented
Nov 26, 2011
|
I'm having the same issue running on Heroku's cedar stack since upgrading to the latest version fo pygments.rb and rubypython. Here's the output from the command @tmm1 pasted:
Things seem to be fine rolling back to rubypython 0.5.1 and pygments.rb 0.2.3. |
halostatue
commented
Nov 27, 2011
|
@lmarburger, I'm not familiar with Heroku, so can you grab the latest rubypython from git (I'm working on 0.6) and give me the output of the following? require 'rubypython'
p RubyPython::Instance.new({}).libraryI'm trying to figure out why things are failing; it worked just fine for me on Ubuntu 11.04 after I installed libpython. |
lmarburger
commented
Nov 27, 2011
|
No problem, @halostatue. I grabbed HEAD from https://github.com/halostatue/rubypython and I get For the record, I think something's broken with python2.7 on their stack. I have an open support ticket, but they haven't repsonded.
I just use python2.6 in production and everything seems to be fine. |
halostatue
commented
Nov 27, 2011
|
Please forgive me for being an idiot. It's RubyPython::Interpreter, not I am not surprised that the '.a' is failing. -a On Sat, Nov 26, 2011 at 8:21 PM, Larry Marburger <
Austin Ziegler austin@zieglers.ca austin@halostatue.ca |
lmarburger
commented
Nov 27, 2011
|
That explains it. I figured it was just a typo. Here's the output:
|
capsensitive
commented
Dec 30, 2011
|
I encountered similar issue under Archlinux X86-64. Archlinux does not have a I have tried both My # ----------------------- # # Main Configs # # ----------------------- # url: http://capsensitive.github.com title: Titile subtitle: A blogging framework for hackers. author: Author simple_search: http://google.com/search description: # Default date format is "ordinal" (resulting in "July 22nd 2007") # You can customize the format as defined in # http://www.ruby-doc.org/core-1.9.2/Time.html#method-i-strftime # Additionally, %o will give you the ordinal representation of the day date_format: "ordinal" # RSS / Email (optional) subscription links (change if using something like Feedburner) subscribe_rss: /atom.xml subscribe_email: # RSS feeds can list your email address if you like email: # ----------------------- # # Jekyll & Plugins # # ----------------------- # # If publishing to a subdirectory as in http://site.com/project set 'root: /project' root: / permalink: /blog/:year/:month/:day/:title/ source: source destination: public plugins: plugins code_dir: downloads/code category_dir: blog/categories markdown: rdiscount pygments: false # default python pygments have been replaced by pygments.rb paginate: 10 # Posts per page on the blog index pagination_dir: blog # Directory base for pagination URLs eg. /blog/page/2/ recent_posts: 5 # Posts in the sidebar Recent Posts section excerpt_link: "Read on →" # "Continue reading" link text at the bottom of excerpted articles titlecase: true # Converts page and post titles to tilecase # list each of the sidebar modules you want to include, in the order you want them to appear. # To add custom asides, create files in /source/_includes/custom/asides/ and add them to the list like 'custom/asides/custom_aside_name.html' default_asides: [asides/recent_posts.html, asides/github.html, asides/twitter.html, asides/delicious.html, asides/pinboard.html, asides/googleplus.html] # Each layout uses the default asides, but they can have their own asides instead. Simply uncomment the lines below # and add an array with the asides you want to use. # blog_index_asides: # post_asides: # page_asides: Error message in ## Generating Site with Jekyll
unchanged sass/screen.scss
Configuration from /home/user/.sync/Dropbox/src/octopress/_config.yml
Building site: source -> public
/home/user/.rvm/gems/ruby-1.9.2-head/gems/ffi-1.0.11/lib/ffi/library.rb:121:in `block in ffi_lib': Could not open library 'lib.so': lib.so: cannot open shared object file: No such file or directory (LoadError)
from /home/user/.rvm/gems/ruby-1.9.2-head/gems/ffi-1.0.11/lib/ffi/library.rb:88:in `map'
from /home/user/.rvm/gems/ruby-1.9.2-head/gems/ffi-1.0.11/lib/ffi/library.rb:88:in `ffi_lib'
from /home/user/.rvm/gems/ruby-1.9.2-head/gems/rubypython-0.5.3/lib/rubypython/python.rb:29:in `'
from /home/user/.rvm/gems/ruby-1.9.2-head/gems/rubypython-0.5.3/lib/rubypython/python.rb:21:in `'
from /home/user/.rvm/gems/ruby-1.9.2-head/gems/rubypython-0.5.3/lib/rubypython.rb:261:in `load'
from /home/user/.rvm/gems/ruby-1.9.2-head/gems/rubypython-0.5.3/lib/rubypython.rb:261:in `reload_library'
from /home/user/.rvm/gems/ruby-1.9.2-head/gems/rubypython-0.5.3/lib/rubypython.rb:104:in `start'
from /home/user/.rvm/gems/ruby-1.9.2-head/gems/pygments.rb-0.2.4/lib/pygments/ffi.rb:8:in `start'
from /home/user/.rvm/gems/ruby-1.9.2-head/gems/pygments.rb-0.2.4/lib/pygments/ffi.rb:82:in `highlight'
from /home/user/.sync/Dropbox/src/octopress/plugins/pygments_code.rb:27:in `pygments'
from /home/user/.sync/Dropbox/src/octopress/plugins/pygments_code.rb:17:in `highlight'
from /home/user/.sync/Dropbox/src/octopress/plugins/backtick_code_block.rb:37:in `block in render_code_block'
from /home/user/.sync/Dropbox/src/octopress/plugins/backtick_code_block.rb:13:in `gsub'
from /home/user/.sync/Dropbox/src/octopress/plugins/backtick_code_block.rb:13:in `render_code_block'
from /home/user/.sync/Dropbox/src/octopress/plugins/octopress_filters.rb:12:in `pre_filter'
from /home/user/.sync/Dropbox/src/octopress/plugins/octopress_filters.rb:27:in `pre_render'
from /home/user/.sync/Dropbox/src/octopress/plugins/post_filters.rb:112:in `block in pre_render'
from /home/user/.sync/Dropbox/src/octopress/plugins/post_filters.rb:111:in `each'
from /home/user/.sync/Dropbox/src/octopress/plugins/post_filters.rb:111:in `pre_render'
from /home/user/.sync/Dropbox/src/octopress/plugins/post_filters.rb:166:in `do_layout'
from /home/user/.rvm/gems/ruby-1.9.2-head/gems/jekyll-0.11.0/lib/jekyll/post.rb:189:in `render'
from /home/user/.rvm/gems/ruby-1.9.2-head/gems/jekyll-0.11.0/lib/jekyll/site.rb:193:in `block in render'
from /home/user/.rvm/gems/ruby-1.9.2-head/gems/jekyll-0.11.0/lib/jekyll/site.rb:192:in `each'
from /home/user/.rvm/gems/ruby-1.9.2-head/gems/jekyll-0.11.0/lib/jekyll/site.rb:192:in `render'
from /home/user/.rvm/gems/ruby-1.9.2-head/gems/jekyll-0.11.0/lib/jekyll/site.rb:40:in `process'
from /home/user/.rvm/gems/ruby-1.9.2-head/gems/jekyll-0.11.0/bin/jekyll:250:in `'
from /home/user/.rvm/gems/ruby-1.9.2-head/bin/jekyll:19:in `load'
from /home/user/.rvm/gems/ruby-1.9.2-head/bin/jekyll:19:in `'
gem infomation ( albino (1.3.3) blankslate (2.1.2.4) bundler (1.0.21 ruby) chunky_png (1.2.5) classifier (1.3.3) compass (0.11.6) directory_watcher (1.4.1) fast-stemmer (1.0.0) ffi (1.0.11) fssm (0.2.7) haml (3.1.4) jekyll (0.11.0) kramdown (0.13.4) liquid (2.2.2) maruku (0.6.0) posix-spawn (0.3.6) pygments.rb (0.2.4) rack (1.4.0) rake (0.9.2.2, 0.9.2) rb-fsevent (0.4.3.1) rdiscount (1.6.8) RedCloth (4.2.9) rubypants (0.2.0) rubypython (0.5.3) sass (3.1.12) sinatra (1.2.6) stringex (1.3.0) syntax (1.0.0) tilt (1.3.3) albino (1.3.3) blankslate (2.1.2.4) bundler (1.0.21 ruby) chunky_png (1.2.5) classifier (1.3.3) compass (0.11.6) directory_watcher (1.4.1) fast-stemmer (1.0.0) ffi (1.0.11) fssm (0.2.7) haml (3.1.4) jekyll (0.11.0) kramdown (0.13.4) liquid (2.2.2) maruku (0.6.0) posix-spawn (0.3.6) pygments.rb (0.2.4) rack (1.4.0) rake (0.9.2.2, 0.9.2) rb-fsevent (0.4.3.1) rdiscount (1.6.8) RedCloth (4.2.9) rubypants (0.2.0) rubypython (0.5.3) sass (3.1.12) sinatra (1.2.6) stringex (1.3.0) syntax (1.0.0) tilt (1.3.3) |
Gonzih
commented
Dec 30, 2011
|
I have same issue on archlinux x64 |
halostatue
commented
Jan 6, 2012
|
@capsensitive & @Gonzih, can you try the results of what I asked of @lmarburger in November? Unfortunately, I won't be able to look at this problem further until after an internet-free vacation that starts on Sunday, but if the new code in HEAD works for discovering the Python library properly, I will try to get a new version of RubyPython out ASAP after I'm done. |
Gonzih
commented
Jan 6, 2012
|
I was trying to install rubypython from git using bundler and Gemfile and i got following:
After that i was trying to build gem manually from source, but here also was some troubles:
With installed rubypython-0.5.3 i got following output:
|
capsensitive
commented
Jan 7, 2012
|
I installed rubypython via rvm. Rubypython is a dependence for octopress, I use
|
pimvullers
commented
Jan 9, 2012
|
Getting the same error here on Gentoo Linux (trying to run GitLab) with pygments.rb 0.2.3, rubypython 0.5.3 and python 2.7.2 / 3.1.4:
|
Rolinh
commented
Jan 12, 2012
|
Hi there, I am having the same issue and output as capsensitive on Archlinux (both 64 and 32-bit). rubypython is at version 0.5.3. require 'rubypython'
RubyPython.configure :python_exe => 'python2.7'
p RubyPython::Interpreter.new({}).libraryReturns
Same when setting python_exe to python2. |
capsensitive
commented
Jan 17, 2012
|
Hi, I believe that this
That workaround should also work under Gentoo, I think. But I have no idea why newer |
Rolinh
commented
Jan 17, 2012
|
Hi, I wish I could confirm your workaround but unfortunately, I can't. It actually made things worst.
Before that, I could |
Gonzih
commented
Jan 17, 2012
|
I have same situation as @Rolinh have. Here list of my gems:
|
capsensitive
commented
Jan 17, 2012
|
Looks like you have to downgrade
|
Gonzih
commented
Jan 17, 2012
|
@capsensitive now it works fine, thanks a lot! |
capsensitive
commented
Jan 17, 2012
|
It indeed is weird - When I tried to combine I actually lock Hope that can help. this morning I just pull |
Rolinh
commented
Jan 17, 2012
|
I tried to rollback rubypython version but I still got the problem. Here is my list of gems:
So... same as yours exactly and I still got the same issue. |
capsensitive
commented
Jan 17, 2012
|
@Rolinh Sorry, I have no idea :-( Also, Is your octopress up-to-date? I got an older version of octopress from @roylez, which can generate hilight by default, but after |
Rolinh
commented
Jan 17, 2012
|
That's OK ;-) Thanks for informing us about a solution that works for you! |
eldios
commented
Feb 3, 2012
|
I finally found where was the bug :) it was rubypython's fault and I'm now working flawlessly with pygmente.rb 0.2.4 and rubypython 0.5.3. I only had to change the following file: like so: looks like they completely changed the python execution (at last) and it's quite more effective now. Still this is a pretty decent workaround as for now.. let me knw if this helps anybody of you :) cheers |
Rolinh
commented
Feb 3, 2012
|
Wow: I can confirm that this fixes the bug! Thank you so much, you made my day! |
capsensitive
commented
Feb 3, 2012
|
@eldios It works! Thanks!
|
ab5tract
commented
Feb 9, 2012
|
Hmm, I'm still getting this error using @eldios' workaround. ArchLinux i686. I'm encountering this issue while attempting to require github's Linguist. |
ab5tract
commented
Feb 10, 2012
|
My solution was to set I also set python_executable to 'python2' manually. This is all in the |
rash-pro
commented
Feb 16, 2012
|
I can confirm on Arch x86_64 that the changes made by @ab5stract works just fine! |
gregf
commented
Mar 20, 2012
|
I'm on Arch x86_64 I had to do two things. First was to follow @eldios advise about patching pythonexec.rb, the second was to do what @ab5tract mentioned. The reason find_python_lib isn't working is it doesn't know what to even look for. Top of the function has the following. libbase = "#{FFI::Platform::LIBPREFIX}#{@basename}" Which should return something like libpython2.7.so, but what I'm getting back is So when you do |
secjex
commented
Apr 2, 2012
|
here is my gem
after installed python-pygments, it still not working. |
secjex
commented
Apr 2, 2012
|
after install the python-devel
|
akzhan
commented
May 18, 2012
|
Should be fixed in rubypython 0.6.1 by https://bitbucket.org/raineszm/rubypython/changeset/f63756cd2a4d Just released today. |
akzhan
referenced this issue
May 18, 2012
Closed
64bit compatibility: Actually we support rubypython 0.6 series #26
akzhan
commented
May 18, 2012
|
While this PR isn't accepted, fell free to use :git option in Gemfile. |
akzhan
commented
May 19, 2012
|
Just updated GitLabHQ to eliminate this issue using proposed PR #26. |
akzhan
referenced this issue
Jun 9, 2012
Closed
64bit compatibility: Actually we support rubypython 0.6 series #28
buyhome
commented
Jul 26, 2012
|
@capsensitive well done.. |
This was referenced Sep 14, 2012
kfirlavi
commented
Nov 6, 2012
|
in octopress I have changed the line in the Gemfile then ran: This allow pygments use rubypython 0.6.3 |
yholkamp commentedOct 22, 2011
When running the Pyagments::Lexer class (as shown below) it complains about the lib.so file not being found. As the issue seemed similar to issue #7 I've tried following the steps there but this did not resolve the issue, the output below also contains an attempt at using the RubyPython configuration but neither the options 'python' nor 'python2' seem to help (which makes sense as python is available under the 'python' alias rather than python2).
The path suggested for 64-bit RHEL as suggested on http://www.dejaaugustine.com/2011/10/rubypython-on-64-bit-rhel5centos/ did not resolve this issue either.
This is on a machine with Debian 6 x64 with ia32 libs installed, Python 2.6.6 and Ruby 1.9.2. I suppose this should just be able to run or am I overlooking another requirement? Thanks in advance either way.