Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using official docker container for multi-platform builds #1347

Closed
mcred opened this issue May 31, 2019 · 3 comments
Closed

Using official docker container for multi-platform builds #1347

mcred opened this issue May 31, 2019 · 3 comments
Assignees

Comments

@mcred
Copy link

mcred commented May 31, 2019

I've started using the official docker container oracle/graalvm-ce:19.0.0 and I can no longer build for OSX. Is there documentation or can anyone help me figure out how to use the docker container to build for multiple platforms? I'd like to be able to automate builds from jenkins to multiple target platforms. Has anyone done this?

The following command build a linux binary and if I use the command minus the docker container, it builds for OSX.

docker run -v ${PWD}:/cli --workdir /cli oracle/graalvm-ce:19.0.0 native-image -cp ./target/project-$version-jar-with-dependencies.jar\
    -H:Name=project\
    -H:Class=com.project.Cli\
    -H:+ReportUnsupportedElementsAtRuntime\
    -H:ReflectionConfigurationFiles=./reflect-config.json\
    --allow-incomplete-classpath\
    --enable-url-protocols=http
@mcred
Copy link
Author

mcred commented May 31, 2019

@elliots
Copy link

elliots commented Jun 4, 2019

I don't believe it is possible to build for mac from linux. I'm building for mac using circle-ci mac executor.

This is how i'm setting up the mac vm, installing graal and maven.

set -e
cd "${0%/*}"
HOMEBREW_NO_AUTO_UPDATE=1 brew install maven
curl -fLo graal.tar.gz https://glare.now.sh/oracle/graal/graalvm-ce-darwin
tar -zxf graal.tar.gz
export GRAAL_HOME=`pwd`/graalvm-ce-19.0.0
export JAVA_HOME=$GRAAL_HOME/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH
gu install native-image

@ansalond
Copy link
Member

ansalond commented Jun 4, 2019

Hi @mcred, thanks for your interest in GraalVM.

Unfortunately, as mentioned by @elliots, Native Image does not yet support cross-compilation (see #407).

@ansalond ansalond closed this as completed Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants