selfrestraint icon indicating copy to clipboard operation
selfrestraint copied to clipboard

Linux binary has a hardcoded path

Open joelburget opened this issue 13 years ago • 9 comments

I tried running the version of SelfRestraint I downloaded from your website and got this

joel@arch Downloads  $ ./SelfRestraint 
Script not started as root. Running sudo..
Traceback (most recent call last):
  File "<string>", line 218, in <module>
  File "/home/parkerkuivila/Desktop/selfrestraint/build/pyi.linux2/SelfRestraint/outPYZ1.pyz/os", line 336, in execlpe
  File "/home/parkerkuivila/Desktop/selfrestraint/build/pyi.linux2/SelfRestraint/outPYZ1.pyz/os", line 353, in execvpe
  File "/home/parkerkuivila/Desktop/selfrestraint/build/pyi.linux2/SelfRestraint/outPYZ1.pyz/os", line 380, in _execvpe
OSError: [Errno 2] No such file or directory

I don't have a /home/parkerkuivila/ ;)

joelburget avatar Feb 06 '12 04:02 joelburget

It's an odd error, seems to have something to do with Pyinstaller. Would you kindly try the binary on my fork to see if it does the same thing?

shauncarpenter avatar Feb 10 '12 10:02 shauncarpenter

@shauncarpenter I get a similar error:

Script not started as root. Running sudo..
Traceback (most recent call last):
  File "<string>", line 218, in <module>
  File "./build/pyi.linux2/SelfRestraint/outPYZ1.pyz/os", line 336, in execlpe
  File "./build/pyi.linux2/SelfRestraint/outPYZ1.pyz/os", line 353, in execvpe
  File "./build/pyi.linux2/SelfRestraint/outPYZ1.pyz/os", line 380, in _execvpe
OSError: [Errno 2] No such file or directory

I'm not familiar with that exact error message (usually it would say "No such file or directory: 'filename'") but I think not having a /home/parkerkuivila/ directory might have been a red herring. Looking at the error message more carefully, it seems to indicate that the file in home/parkerkuivila is running, hence the traceback. I'm not sure if that's how Pyinstaller works, again I'm not familiar with it.

joelburget avatar Feb 10 '12 15:02 joelburget

After a lot of searching I've got absolutely nowhere. The only reason for the difference seems to be that I executed Pyinstaller in the SelfRestraint directory, while parker executes Pyinstaller in it's own directory, hence the absolute vs relative path.

I'm guessing you're on Arch Linux; could you possibly try installing the headers/dev packages and such for python 2.7, I'm thinking that may change something...

I'm going to investigate just using py2exe for windows, and use the standard python methods for linux (distutils + setuptools + PyPI).

shauncarpenter avatar Feb 10 '12 16:02 shauncarpenter

Ohhh, whoops. Sorry about that Joel, I'll take a look into that ;)

ParkerK avatar Mar 14 '12 23:03 ParkerK

And shaun is right, this seems to be an issue with PyInstaller handing the bundling

ParkerK avatar Mar 15 '12 00:03 ParkerK

Is the Linux testing still on? I can't find anyway to complie/install it! (I tried the tarball)

slashbang avatar Aug 14 '12 17:08 slashbang

You're always free to test :) Linux is not my main OS of choice, so I'm of little help. I will be looking more into fixing this though now that Windows v0.3 is out

ParkerK avatar Aug 15 '12 00:08 ParkerK

well I'd love to help but i can't understand how it is supposed to compile. Usually on linux source is compiled & installed in 3 steps:

  1. ./configure
  2. make
  3. make install

In the tarball there isn't any configure or make scripts!!!

Anyways, it works with the zip as "joelburget" did (1st comment),

slashbang avatar Aug 15 '12 01:08 slashbang

I use PyInstaller, so the attached file is an executable. The build instructions should be the same for Windows as they are for Linux. (See README). I haven't make a make file yet or anything though :/

ParkerK avatar Aug 17 '12 18:08 ParkerK