komanda icon indicating copy to clipboard operation
komanda copied to clipboard

Linux libudev link issue / General Linux Startup Issues

Open eugene-bulkin opened this issue 10 years ago • 11 comments

Running results in following error:

./Komanda: error while loading shared libraries: libudev.so.0: cannot open shared object file: No such file or directory

I believe the issue is related to this but putting symbolic links anywhere doesn't work, no matter where I put them. Since this is all built rather than running node-webkit manually, I don't know how to work around this.

eugene-bulkin avatar Jun 16 '14 18:06 eugene-bulkin

@eugene-bulkin looks like it's a know node-webkit issue. https://github.com/rogerwang/node-webkit/wiki/The-solution-of-lacking-libudev.so.0 I'll see if i can get a workaround in place.

djcas9 avatar Jun 16 '14 18:06 djcas9

I experimented with symbolically linking libudev.so.1 in (1) the same directory as the Komanda binary, (2) the top directory, (3) the directory in the cache folder with nw in it, but none of those worked. So it may require a workaround elsewhere.

eugene-bulkin avatar Jun 16 '14 18:06 eugene-bulkin

Note: I successfully found a symlink location to get it to work. Komanda now runs successfully. To do so I did ln -s /usr/lib64/libudev.so.1 /usr/lib64/libudev.so.0.

Ideally, during the build process a symlink should be done, but I feel that the grunt node-webkit builder may get in the way of that working correctly.

eugene-bulkin avatar Jun 16 '14 19:06 eugene-bulkin

@eugene-bulkin awesome man - i'll get this added to the wiki under FAQ - I wonder if there is a way for Komanda to check and do this automatically?

djcas9 avatar Jun 16 '14 19:06 djcas9

It's possible but I don't think it can be done with any sort of reliability. You would essentially have to run a command to find libudev.so.0 and if it's not found, automatically do some linking. But I had to use sudo to run that link, so there would have to be some sort of place to put the .so file that would allow it to be local and still run correctly.

Perhaps running with a PATH set or something.

eugene-bulkin avatar Jun 16 '14 19:06 eugene-bulkin

@eugene-bulkin we will just have to wait for a new version of node-webkit or I can pull the source and build a new linux binary with the path changes for newer systems.

djcas9 avatar Jun 16 '14 20:06 djcas9

@eugene-bulkin @mephux , the best and most effective way is just to do a symlink this problem has been known for some time and mostlikly not be fixed unless its done manually.

cvespa avatar Jun 17 '14 14:06 cvespa

do we want to close this issue or keep it

cvespa avatar Jun 24 '14 17:06 cvespa

keep - for now.

djcas9 avatar Jun 24 '14 19:06 djcas9

It's not advisable to ask the user to ever add a symlink in their /lib64 or /usr/lib64 directories to a soname of a different ABI (in this case a libudev.so.0 symlink to libudev.so.1). Here's an ok explanation of why: http://askubuntu.com/questions/369310/how-to-fix-missing-libudev-so-0-for-chrome-to-start-again/531098#531098

There's plenty more on stackoverflow and others why this is a bad idea, but the summary is: applications expecting libudev.so.0 will try to link to that, seeing the sharedlib in the respective directory. However, since it's a symlink, they'll actually get libudev.so.1, which may implement a completely different, possibly incompatible ABI. After that, the user may get linker errors with binaries linked to libudev.so.1, but expecting libudev.so.0 which will cause trouble in the future.

There's some decent advice here: https://github.com/nwjs/nw.js/wiki/The-solution-of-lacking-libudev.so.0, pretty much all of which will work. The shell script will work the best, because it adds a symlink to libudev.so.1 for nw running Komanda only. In the first item on that link they actually have already done a lot of the heavy lifting for you in terms of finding what the directories are on each flavor of linux. Just my $0.02, as I ran into this problem, implemented the symlink solution, but didn't realize my folly until much later!

pshahid avatar Aug 29 '15 16:08 pshahid

Thank you, I too ran into issues just resonantly because of this

cvespa avatar Sep 01 '15 15:09 cvespa