How to use a library ported for Native Client(NaCl)?

一个人想着一个人 提交于 2020-01-16 11:27:48

问题


I was looking at the list of naclports for ported libraries and I want to use openssl for my native client extention. I can't find a proper instruction set to install these ported libraries, I downloaded the openssl compressed file and followed the instructions given in INSTALL file but that encountered some errors which I can't resolve.


回答1:


To install a library ported to Native Client as part of naclports you'll need to:

  • Download and install the NaCl SDK: https://developer.chrome.com/native-client/sdk/download

  • Set NACL_SDK_ROOT in your environment to point at the pepper_* version under the location you install it at.

    You may want to explicitly install the very latest version: pepper_canary, with: ./naclsdk install pepper_canary

  • Sync the naclports repository: Checkout guide

    Check out a branch that matches you SDK, or master for pepper_canary

  • To build openssl, do something like this:

    ./bin/naclports --force --from-source install openssl
    

    If you have no local modifications you can drop the --force and --from-source flags

    This will build the newlib NaCl version by default.

    You can set TOOLCHAIN in the environment to: glibc / pnacl / newlib to select an explicit version.

The library will then be installed into your SDK.



来源:https://stackoverflow.com/questions/29148430/how-to-use-a-library-ported-for-native-clientnacl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!