Last Updated: February 25, 2016
·
751
· dmglab

building RPM with node-webkit (and the libudev.0 problem)

Everybody, who's developing or working with a node-webkit application knows this stupid libudev.so.0 problem

There are many workarounds, how to start your application without problems.

But when you try to install your self baked RPM package of your node-webkit application, you will get a really annoying error message:

error: Failed dependencies:    
        libudev.so.0()(64bit) is needed by

Even though you linked your libudev.so.1 to libudev.so.0, RPM can't find a package, providing libudev.so.0.

Problem Source: Auto Dependency from rpmbuild

How does RPM knows, that your software depends on libudev.so.0?

rpmbuild tries to find requirements automaticly. You can see it at this big output while building:

+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
+ /usr/lib/rpm/redhat/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-java-repack-jars

Processing files: [...]
Requires: ld-linux-x86-64.so.2()(64bit) ld-linux-x86-64.so.2(GLIBC_2.2.5)(64bit) libX11.so.6()(64bit) libXcomposite.so.1()(64bit) libXdamage.so.1()(64bit) libXext.so.6()(64bit) libXfixes.so.3()(64bit) libXi.so.6()(64bit)
[...even more output...]
libstdc++.so.6(GLIBCXX_3.4.11)(64bit) libstdc++.so.6(GLIBCXX_3.4.15)(64bit) libstdc++.so.6(GLIBCXX_3.4.5)(64bit) libstdc++.so.6(GLIBCXX_3.4.9)(64bit) libudev.so.0()(64bit) rtld(GNU_HASH)

You can read at the end libudev.so.0()(64bit) rtld(GNU_HASH)

Solutions

To prevent rpmbuild, to add libudev.so.0 to your deps, you can try chromiums's rpmbuild script. They've got similar issues.

Or you can add this little flag to your preamble in your .spec file: AutoReqProv: no

This will deactivate any kind of Automatic Dependency Processing