The project I created depends on a newer version of libvips that is not included in Ubuntu 18 arm64 and armv7. There are no precompiled binaries that can be added at this time. Currently the dependency is being compiled at build. This is certainly not the best way to do this.
What would be the best way to precompile these dependencies and include it in the snap during the build process? Create another snap for my snap?
This is how it’s being built in the snap today.
if [ "$ARCH" != "x86_64" ]; then
git clone --depth 1 --branch v8.10.5 https://github.com/libvips/libvips.git
cd libvips && ./autogen.sh
make -j$(nproc) && make install
cd ../ && rm -rf libvips
fi
I disagree, I think it’s a fine way to do it. That said, if that dependency doesn’t change much, and you feel like the build time is too long, go ahead and make a snap of it, and then you can specify it as a stage snap in your current snap instead of building it, something like:
if that dependency doesn’t change much, and you feel like the build time is too long, go ahead and make a snap of it
It does not change much and currently the build time is over an hour.
Thank you for the example.
I am new to snapcraft and I am not entirely sure how I should build the dependency snap. This is what I was attempting. Do you mind taking a look and pointing me in the right direction?
How would I insure that the main snap is able to find libvips?
I tried with what I posted above but it does not seem to be able to find the new version.
For context. it is a dependency in node for sharp.