Le 10/10/2016 à 23:49, Jian LUO a écrit :
> I don't think it counts as cross compiling since Java (at least in my
> case) is cross platform. Just wanted to compile Java with one JDK and
> run with another.
I'm adding Sergio to the conversation, but I think the easiest path is
to create a custom plugin, inheriting from the base java one, which is
outputting a wrapper scripts with different JAVA env variables.
That way, you keep the current building behavior (build with java on the
machine), but output a script which will point to an armhf java path for
instance and download the correct version and packages version for all
Cross-compilation-like may be needed as Manik suggested as you will need
to pull some packages which are architectures specific.
On how to create a custom plugin, here is some documentation:
http://snapcraft.io/docs/build-snaps/plugins and the playpen has some
I'll let Sergio adding more info as needed :)
> On Oct 10, 2016 20:05, "Manik Taneja" <ma...@canonical.com
> <mailto:ma...@canonical.com>> wrote:
> On Mon, Oct 10, 2016 at 6:33 AM, Jian LUO <jian.luo...@gmail.com
> <mailto:jian.luo...@gmail.com>> wrote:
> Hi List,
> Is there any formal way in snapcraft to set environment
> variables separately for build time and run time? The use case
> I'm facing is building a Java snap on amd64 host for armhf target.
> Snapcraft does not support cross-compilation. Consider building
> natively on armhf, or using this as reference-
> and let us know if you see any issues.
Snapcraft mailing list
Modify settings or unsubscribe at: