questions about the /app/bin and while loading shared libraries
Rick Spencer
rick.spencer at canonical.com
Wed Jan 13 15:28:22 UTC 2016
Hi Mike,
I'm not 100% what you are trying to do, so this may be way off base.
However, it seems to me that if you are using a stage package, then
snapcraft will install sqlite and all its dependencies in expected places,
so you shouldn't have to copy the file around. You just need to include a
bash file that knows where sqlite lives.
I wrote a snap that might do something similar to what you are trying to
do. Maybe my snapcraft file will help?
http://bazaar.launchpad.net/~rick-rickspencer3/+junk/zork/view/head:/snapcraft.yaml
This sets up frotz and some data and then provides some shell scripts so
that commands work from the command line as expected.
Also, I typically run "$snapcraft clean" before I run "$snapcraft" to
ensure that old dirs and etc... get cleaned out. It takes a bit longer this
way, but it means there is less for me track mentally.
HTH
Cheers, Rick
On Wed, Jan 13, 2016 at 1:13 AM, Mike Guo <hongweig at 163.com> wrote:
> I tried to
> (amd64)ubuntu at mike-snappy:~$ echo $LD_LIBRARY_PATH
>
> no value there.
>
> is there anyone can share with me how to snappy looking for the share
> library in it?
>
>
> thanks
>
> Mike
>
> 在 2016年1月13日,下午2:10,Mike Guo <hongweig at 163.com> 写道:
>
> Hi, All.
>
>
> I tried to build a testing snap app by snap craft.
>
> I got what’s the stage-packages means now, it will use those packages
> which in our ubuntu store.
>
> so, I plan to do a simple one:
>
> here’s my snapcraft.yml
>
> *name**:* sqlite
> *version**:* *0.1*
> *vendor**:* Mike Guo<hongweig at 163.com>
> *summary**:* learning for snappy package
> *description**:*
> the first snappy I create by deb packge which already eixts
> *icon**:* icon.png
>
> *parts**:*
> *sqlite**:*
> *plugin**:* nil
> *stage-packages**:*
> *- *sqlite
>
> *glue**:*
> *plugin**:* copy
> *files**:*
> *snap/usr/bin/sqlite**:* bin/sqlite
>
>
>
> some explain about why I put the plugin copy there.
> because I found when I used this file, snappy always didn’t copy the
> sqlite into /apps/bin/, and in the current path, /apps/bin was include it.
> but other doesn’t. I have to use copy plugin in this file.
>
> weird thing is: I found I don’t need that copy plugin , I just need put
> the a section into snap/meta/package.yml
>
> like this:
> *architectures**:*
> *- *amd64
> *icon**:* meta/icon.png
> *name**:* sqlite
> *vendor**:* Mike Guo<hongweig at 163.com>
> *version**:* *0.1*
> *binaries**:*
> *- **name**:* /usr/bin/sqlite
>
>
> and run snappy build . in snap folder. it will be generate the right
> binary file to /apps/bin
>
> and another thing is:
>
> when I try to run sqlite.sqlite(which is my app).
>
> it told me :
> amd64)ubuntu at mike-snappy:~$ sqlite.sqlite
> /apps/sqlite.sideload/IKHGTNePOOGB/usr/bin/sqlite: error while loading
> shared libraries: libsqlite.so.0: cannot open shared object file: No such
> file or directory
>
>
> but the truth is :all thing is in my apps:
>
> amd64)ubuntu at mike-snappy:~$ ls /apps/sqlite.sideload/current/usr/lib/
> *libsqlite.so.0* libsqlite.so.0.8.6
>
>
>
>
> is there anyone can help me about t his?
>
>
> thanks so much
>
>
> Mike
>
>
>
> --
> snappy-app-devel mailing list
> snappy-app-devel at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/snappy-app-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-app-devel/attachments/20160113/e2e0f109/attachment.html>
More information about the snappy-app-devel
mailing list