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-Compile sysbench for aarch64 #294

Closed
Theil opened this issue Mar 4, 2019 · 6 comments
Closed

Cross-Compile sysbench for aarch64 #294

Theil opened this issue Mar 4, 2019 · 6 comments

Comments

@Theil
Copy link

Theil commented Mar 4, 2019

Hi,

I am trying to cross-compile sysbench from the latest sources (especially for aarch64).
I have seen that there are aarch64 packages available at packagecloud, and the Makefile structure also indicates that cross-compilation might already work.

However I had some issues to figure out how to do it on my own.
After some changes to the Makefiles and config Files I got an arm64 executable but I get the same error as Huang Jinhua:
#109
Unfortunately this issue was closed without a proper solution...

Without touching the Makefiles and Config Files I was not able to compile at all.
Did you already try to cross-compile it? Should it work out of the box?

Thanks in advance

@akopytov
Copy link
Owner

akopytov commented Mar 4, 2019

Unfortunately, I can't help here. I've never tried cross-compilation for aarch64. The existing packages on packagecloud were built natively. I have also never seen the error from #109 myself, so never had a chance to look into it.

@Theil
Copy link
Author

Theil commented Mar 4, 2019

Hi @akopytov
Thank you very much for the quick response.

Actually I was able to solve it by adding the -rdynamic flag as you mentioned in #174
Now I can run the statically linked sysbench on my arm64 target.

The hacks that I did to the Makefiles are very ugly but basically not complicated.
I will clean it up and also have a look at compiling for arm32, after that I will share it in some way.

Thank you very much
BR

@Theil Theil closed this as completed Mar 4, 2019
@akopytov
Copy link
Owner

akopytov commented Mar 4, 2019

Thanks for the update.

@zeehha
Copy link

zeehha commented Jun 15, 2020

Can you please explain how to build sysbench as a statically linked binary? I was trying
./configure CFLAGS="-static" LDFLAGS="-static --with-gnu-ld ...",
./make
but the resulting binary is still dynamically linked.

Best,
Chris

@tavianr
Copy link

tavianr commented Feb 8, 2021

@Theil @akopytov I was wondering if you had any updates on this. I am not able to compile sysbench for arm64 at all as it says the compiler needs updated, but this should not cause and issue. Is there anyway I could get the executable for sysbench that is statically linked with arm64 compilation.

@RomanovSergey
Copy link

Have you tried compiling this sysbench for arm64? :
https://github.com/logicalclocks/sysbench-0.4.12

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

5 participants