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

All archs SIMDs are being built for libjpeg-turbo on Android builds #144

Open
cocus opened this issue Feb 4, 2021 · 4 comments
Open

All archs SIMDs are being built for libjpeg-turbo on Android builds #144

cocus opened this issue Feb 4, 2021 · 4 comments

Comments

@cocus
Copy link

cocus commented Feb 4, 2021

Hi,
I'm trying to build this under the Android build system for an aarch64 target. I've hit some other issues, but this one seems to be the most interesting.
I had some errors while running the suggested build GLMark2, pointing to "undefined instructions" errors on some mips assembly file. This is weird,, since this architecture is not MIPS.

After fixing (or rather, hacking) the Android.mk so only *arm64*S files are being included on LOCAL_SRC_FILES, I hit another issue.
This time ALL the .c files from the simd/ directory were being added. Specifically the "altivec" ones; which are not supported on aarch64. I've also hacked this by just adding /src/libjpeg-turbo/simd/jsimd_arm64.c instead of ALL simd c files on the same LOCAL_SRC_FILES variable.
Since the sources are NOT architecture aware (maybe the original autoconfig files are), there should be some kind of logic on this Android.mk file that only adds architecture dependant sources; and not ALL files.

@afrantzis
Copy link
Contributor

Hi! Are you following the instructions at the top of INSTALL.android or using some different method? Running the build.sh script should end up using jni/Android.ndk.mk which builds a non-simd version of libjpeg-turbo, specifically to avoid the architecture issues you mention.

@cocus
Copy link
Author

cocus commented Feb 18, 2021

I actually ran the step under "Building using the Android build system", where I only had to run "make GLMark2".
Should I go for the instructions at the top?

@afrantzis
Copy link
Contributor

@cocus Yes, the top instructions describe the currently supported way to build. We need to go through the android documentation to clean things up, since a lot has changed since these were first written.

Perhaps "make GLMark2" could also by simply fixed by replacing jni/Android.mk with jni/Android.ndk.mk in the android/Android.mk file.

@cocus
Copy link
Author

cocus commented Feb 25, 2021

I haven't tried sadly, I asked the vendor to try to compile this by themselves and I got the apk out of them. I think they mostly followed the top instructions. You can close this issue :)
(but I would like to see some changes in the docu)

Thanks!

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