Personal computing discussed

Moderators: SecretSquirrel, notfred

 
cheesyking
Minister of Gerbil Affairs
Topic Author
Posts: 2664
Joined: Sun Jan 25, 2004 7:52 am
Location: That London (or so I'm told)
Contact:

building snaps

Thu Nov 09, 2017 8:27 am

For a bit of fun I decided to have a play around with building snaps with an eye on ubuntu core. However since I've never had anything to do with packaging software for distribution I'm a bit lost. TBH all the programming I do is the occasional webapp in flask and the odd script here and there so I'm in at the deep end.

Anyway, I worked through the super simple gnu hello "build your first snap" example and then thought I'd try something harder and picked google assistant. Since it's all available through pip I figured all I should have to do was create a .yaml that installed google assistant stuff straight from there at which point I thought I'd be able to add an "apps" section that allowed me to call some of the samples like "googlesamples-assistant-pushtotalk".

Calling the google-oathlib[tool] does indeed work just as expected however googlesamples-assistant-pushtotalk does produces this error:
  File "/snap/ga-matt-test/x2/lib/python3.5/site-packages/sounddevice.py", line 2634, in _initialize
    _check(_lib.Pa_Initialize(), 'Error initializing PortAudio')
ffi.error: symbol 'Pa_Initialize' not found in library '<None>': /snap/ga-matt-test/x2/usr/bin/python3: undefined symbol: Pa_Initialize


I assume this is because the snap I've built needs a bunch of extra libraries to support sound but that's the limit of my knowledge. Can someone explain what's going on or point me at some reading material?
Fernando!
Your mother ate my dog!
 
just brew it!
Gold subscriber
Administrator
Posts: 49719
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: building snaps

Thu Nov 09, 2017 8:38 am

That definitely looks like a missing library (PortAudio, in this case). Never having built snaps myself I have no idea how you would go about adding it to the package, but at least you know what you need to add now.
Nostalgia isn't what it used to be.
 
cheesyking
Minister of Gerbil Affairs
Topic Author
Posts: 2664
Joined: Sun Jan 25, 2004 7:52 am
Location: That London (or so I'm told)
Contact:

Re: building snaps

Thu Nov 09, 2017 9:33 am

Thanks.

I've been looking at these two revisions of a yaml for Telegram which uses portaudio:
https://git.launchpad.net/~3v1n0/+git/telegram-build-snap/tree/snapcraft.yaml?id=ba1abd501520216e7b1c1e291350ab86a7ca26df
and
https://git.launchpad.net/~3v1n0/+git/telegram-build-snap/tree/snapcraft.yaml?id=8d33fdf70d77a3ec55f9a7158d72662cf645e554

The first one is building portaudio from scratch while the second uses the repo package but I'm not sure how I'd tell the python packages for GA how to use them. That telegram example looks like it's building telegram with compiler options to include openal which includes portaudio.

I've always tried to avoid stuff that involves working with sound as it seems like a labyrinth libraries and different systems.
Fernando!

Your mother ate my dog!

Who is online

Users browsing this forum: No registered users and 4 guests