Linking fails when compiling Android app with Graalvm #9881
              
                Unanswered
              
          
                  
                    
                      ahales1981
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
I have been trying to compile a simple HelloWorld app with Gluon on Ubuntu for Android but have been experiencing problems. I have made some progress after installing GCC as per the suggestion on https://simply-how.com/fix-graalvm-native-image-compilation-issues. However I am still unable to link the project. I get an error: relocation R_AARCH64_ADR_PREL_PG_HI21 cannot be used against symbol 'graalVM'; recompile with -fPIC. I am using graalvm-svm-java17-linux-gluon-22.1.0.1-Final and gradle 7.5.1 to compile the code. Does anyone have any idea what this could be?
I have checked the process link log as per help output and it seems to be failing on the Android NDK compiler clang++. I have tried running the commands in the process log and it points to the correct path for clang in the ndk but still produces the same error. I have also tried compiling with the new version of the gluon graalvm, graalvm-java23-linux-amd64-gluon-23+25.1-dev but this does not even get past the compilation step.
Beta Was this translation helpful? Give feedback.
All reactions