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

Linking issue on Android #114

Open
AshishDurgapal opened this issue Jul 29, 2021 · 5 comments
Open

Linking issue on Android #114

AshishDurgapal opened this issue Jul 29, 2021 · 5 comments

Comments

@AshishDurgapal
Copy link

Hi,

I am not able to compile the libhydrogen source code in android as it is throwing error while liking with test sample (tests.c).

Please check the given below linking errors.

/home/Compiler/android_aarch64_clang_toolchain3.5/bin/../lib/gcc/aarch64-linux-android/4.9/../../../../aarch64-linux-android/bin/ld: /tmp/hydrogen-d0e9ef.o: unrecognized relocation (0x20c) in section `.text'
/home/Compiler/android_aarch64_clang_toolchain3.5/bin/../lib/gcc/aarch64-linux-android/4.9/../../../../aarch64-linux-android/bin/ld: final link failed: Bad value

How to Reproduce :
I have added a entry of android toolchain in make file and then just run make.

Please let me know what causing this issue.

@jedisct1
Copy link
Owner

Feels to me that some of the tools are from the Android tool chains, but they get mixed by other tools with the same name, also in your PATH, but for a different architecture.

Given the simple structure of that project, it is probably easier to just ignore the Makefile and import the files directly in your project.

@AshishDurgapal
Copy link
Author

Hi @jedisct1 ,

I am getting the same error when I include the file directly in my project.

When I link the library made from inclusion of hydrogenlib source code then it is throwing same error while it is working fine with Windows, Linux and MacOS.

Is there any special flag that I have to include ?

@AshishDurgapal
Copy link
Author

Is this source is compatible with android platform or we have to port the code for android platform.?

@jedisct1
Copy link
Owner

Can you compile a simple hello world or add() function also written in C?

@AshishDurgapal
Copy link
Author

Yes, I am able to compile and run the C sample using same tool chain and it is working fine.

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

2 participants