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

Cross compilation, make linker recognize hwloc #12

Open
0xffffa opened this issue Jun 29, 2024 · 1 comment
Open

Cross compilation, make linker recognize hwloc #12

0xffffa opened this issue Jun 29, 2024 · 1 comment

Comments

@0xffffa
Copy link

0xffffa commented Jun 29, 2024

First I would like to start off by starting thank you for spending your free time in improving and helping others in this library. People like you are the reason why I do the same and wish to continue to grow open source code.

That being said, I do have one issue that I'm having trouble fixing due to me being inexperienced with cross compilation toolchains.

Currently I get the error below, even though for the architecture I'm trying to compile for (android arm64) I have built the hwloc library for.
'hwloc.h' file not found

How can I make golang recognize hwloc libraries I've built for the specific architecture? I've tried using CFLAGS and LDFlags with no affect

@c0mm4nd
Copy link
Owner

c0mm4nd commented Jul 3, 2024

Cross-compilation with CGO is a complex task. Besides golang, you need a target-platform compatible GCC and static-lib (like hwloc) compiled with the compatible GCC.

image

image
(Or compile from github source code by yourself)

Another simpler solution is to try to finish go build on your Android device with terminal software like Termux.

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