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

It's not working on Ubuntu 14.04 #53

Closed
blacktop opened this issue Jul 27, 2014 · 15 comments
Closed

It's not working on Ubuntu 14.04 #53

blacktop opened this issue Jul 27, 2014 · 15 comments

Comments

@blacktop
Copy link

user@ubuntu:~$ gdb -q
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/voltron-0.1-py2.7.egg/dbgentry.py", line 1, in <module>
    import voltron
ImportError: No module named 'voltron'
/home/user/.gdbinit:2: Error in sourced command file:
Undefined command: "voltron".  Try "help".
(gdb) 
user@ubuntu:~$ cat .gdbinit 
source /usr/local/lib/python2.7/dist-packages/voltron-0.1-py2.7.egg/dbgentry.py
voltron start
user@ubuntu:~$ which voltron 
/usr/local/bin/voltron
user@ubuntu:~$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import voltron
>>> voltron.__file__
'/usr/local/lib/python2.7/dist-packages/voltron-0.1-py2.7.egg/voltron/__init__.pyc'
@snare
Copy link
Owner

snare commented Jul 27, 2014

I'll spin up a VM and give it a try.

@snare
Copy link
Owner

snare commented Jul 27, 2014

What version of GDB?

@blacktop
Copy link
Author

GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Thanks!

@snare
Copy link
Owner

snare commented Jul 27, 2014

Seems that 14.04 comes with Python 2.7 and Python 3.4, GDB is linked with 3.4 but /usr/bin/python is 2.7 (and going to stay that way).

I got voltron installed into the 3.4 site-packages by:

$ sudo apt-get install lib64readline6-dev python3-dev python3-setuptools
$ cd voltron
$ sudo python3 setup.py install

There was a small Python 3 incompatibility in scruffy so you'll need to grab the new version from my github and install it (though that should happen when you install voltron into python3's site-packages.)

GDB should then load voltron.

New version with a full core rewrite and new API coming very soon :)

@snare
Copy link
Owner

snare commented Jul 27, 2014

I'm hitting this on exit as well:

Python Exception <class 'TypeError'> 'str' does not support the buffer interface:

I'll look into it later but I won't spend too much time on it since the rewrite is almost ready.

@blacktop
Copy link
Author

Thanks, ya no rush on my end. I think this is a great project and am excited to try the rewrite. When I installed it and tried to import it to test it I got this error:

user@ubuntu:~$ python3
Python 3.4.0 (default, Apr 11 2014, 13:05:11) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import voltron
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.4/dist-packages/voltron-0.1-py3.4.egg/voltron/__init__.py", line 4, in <module>
    from .cmd import *
  File "/usr/local/lib/python3.4/dist-packages/voltron-0.1-py3.4.egg/voltron/cmd.py", line 7, in <module>
    from .comms import *
  File "/usr/local/lib/python3.4/dist-packages/voltron-0.1-py3.4.egg/voltron/comms.py", line 16, in <module>
    from .env import *
  File "/usr/local/lib/python3.4/dist-packages/voltron-0.1-py3.4.egg/voltron/env.py", line 34, in <module>
    'basename': 'voltron'
  File "/usr/local/lib/python3.4/dist-packages/scruffy-0.1-py3.4.egg/scruffy/env.py", line 34, in __init__
  File "/usr/local/lib/python3.4/dist-packages/scruffy-0.1-py3.4.egg/scruffy/env.py", line 52, in init_files
TypeError: unsupported operand type(s) for +: 'filter' and 'filter'

@snare
Copy link
Owner

snare commented Jul 27, 2014

Ahh seems I didn't push it to github. If you grab scruffy from here: https://github.com/snarez/scruffy

and install it the same way, that should fix that problem.

@snare
Copy link
Owner

snare commented Jul 27, 2014

Glad you like it :)

@blasty
Copy link

blasty commented Sep 26, 2014

Ubuntu 14.04 (or some abomination thereof, this box went through quite some quirky dist-upgrades :-/)

  File "/usr/local/lib/python3.4/dist-packages/scruffy-0.1-py3.4.egg/scruffy/env.py", line 7, in 
    from plugin import PluginManager
ImportError: No module named 'plugin'
$ ls -la /usr/local/lib/python3.4/dist-packages/scruffy-0.1-py3.4.egg/scruffy/plugin.py 
-rw-r--r-- 1 root staff 2190 Sep 26 19:39 /usr/local/lib/python3.4/dist-packages/scruffy-0.1-py3.4.egg/scruffy/plugin.py

PYTHON IMPORT PATHS, HOW DO THEY WORK ???

@snare
Copy link
Owner

snare commented Sep 26, 2014

(╯°□°)╯︵ ┻━┻

@snare
Copy link
Owner

snare commented Sep 26, 2014

Maybe drop into python-interactive and poke around in sys.path etc? I have no idea :\

Or try changing that to a relative import?

from .plugin import PluginManager

@blasty
Copy link

blasty commented Sep 28, 2014

Hah, that totally helped/worked. (the relative import thing) Voltron works now. Not sure who's to blame here.

@blasty
Copy link

blasty commented Sep 28, 2014

Also hitting the "Python Exception <class 'TypeError'> 'str' does not support the buffer interface:" thing on exit here. How's that rewrite coming along, snare? ;)

@snare
Copy link
Owner

snare commented Sep 28, 2014

Haha rewrite is actually almost done. I got the GDB support working on a plane today. Will push it out tonight and merge it into master soon.

On 28 Sep 2014, at 10:58 pm, blasty notifications@github.com wrote:

Also hitting the "Python Exception 'str' does not support the buffer interface:" thing on exit here. How's that rewrite coming along, snare? ;)


Reply to this email directly or view it on GitHub.

@snare
Copy link
Owner

snare commented Sep 28, 2014

Yeah GDB seems to do weird shit with module paths, I’ve had that problem before and using a relative import “fixed” it so I left it alone. I’ll add that in scruffy because it might as well be relative.

On 28 Sep 2014, at 10:39 pm, blasty notifications@github.com wrote:

Hah, that totally helped/worked. (the relative import thing) Voltron works now. Not sure who's to blame here.


Reply to this email directly or view it on GitHub.

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

3 participants