Pages

Thursday, January 2, 2014

Ubuntu 13.10: Working on Chrome Plugins

Happy new year all! It's been a while, so why not kick off the new year blogging with a minor annoyance that I've experienced: error while loading shared libraries. GRRRR!

I've been toying with the NfWebCrypto (a NetFlix PolyFill for the W3C Draft Web Crypto implementation) and was able to successfully build the shared object. However, upon launching Chrome with the appropriate arguments to install the plugin, the error above fired.
/opt/google/chrome/chrome --register-pepper-plugins=libnfwebcrypto.so#NfWebCrypto##2.0.0;application/x-ppapi-nfwebcrypto --profile-directory=nfwc --ppapi-out-of-process --user-agent=Mozilla/5.0 (X11; CrOS armv7l 2876.0.0) AppleWebKit/537.10 (KHTML, like Gecko) Chrome/30.0.1262.2 Safari/537.10 http://netflix.github.io/NfWebCrypto/web/test_qa.html
/opt/google/chrome/chrome: error while loading shared libraries: libudev.so.0: cannot open shared object file: No such file or directory
Before you naively use this as the simple "Google-returned fix," note that I am following the configuration presented by the developers: Ubuntu 64-bit with build-essential, libssl-dev-1.0.1c> (I used 1.0.1e), and cmake 2.8> (though, I did use 13.10 vice 12.04). The simple fix to this is as follows:
sudo cp /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libdev.so.0
That's fixed the problem for now, but I will follow up on this post later. For instance, I'd like to explore this with Chromium. I am currently now having problems with significant unit tests failing (AES encryption/decryption - the only real reason for playing with this).

4 comments:

  1. Just a comment that might help someone else out that isn't well versed in cmake (myself included). The CMakeCache.txt is a fairly nice text file to toy with the configuration. I thought that I might be able to fix the multitude of test case failures by replicating the exact specification from the github README.

    That required me to build the latest of openssl. That's a simple enough process. wget http://www.openssl.org/source/openssl-1.0.1f.tar.gz && tar -xvf openssl-1.0.1f.tar.gz && cd openssl-1.0.1f && ./config shared && make && make test && sudo make install.

    After which create your buildDir as described by the README. Replace the CMakeCache.txt with the one found here: https://code.google.com/p/arbitrary-blog-execution/source/browse/trunk/patches/CMakeCache.txt

    ReplyDelete
  2. Or more simply you could do the following: -DOPENSSL_ROOT_DIR

    ReplyDelete
  3. Did this plugin allow you to use Netflix's HTML5 player?

    ReplyDelete
    Replies
    1. Hey Hackel, unfortunately that is still not the case. I've been exploring the plugin to test the performance of the crypto API. I have heard from one of the developers, Paul Adolph, that Chrome Canary supports AES per the W3C Web Crypto specification now. That's one step closer... to Netflixs on Linux and OS X without MicroSoft Silverlight.

      Delete