Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: 64bit make in Android fails  (Read 3001 times)

0 Members and 2 Guests are viewing this topic.

Suhair Zain

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
64bit make in Android fails
« on: November 08, 2015, 02:13:09 pm »
Hi,
I recently tried to make sfml for armeabi in android, following the tutorial at https://github.com/SFML/SFML/wiki/Tutorial%3A-Building-SFML-for-Android. It works without any issue and same goes for 32 bit architectures such as armeabi-v7a, x86, mips etc.

But once I try a 64bit platform such as arm64-v8a, mips64 or x86_64, an error is thrown. It's got something to do with missing JPEG LIBRARY. Could anyone take a look at it?

Quote
cmake -DANDROID_ABI=x86_64 -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchains/android.toolchain.cmake ../..
-- Adjusting Android API level 'android-9' to 'android-21'
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find JPEG (missing: JPEG_LIBRARY)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindJPEG.cmake:31 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/toolchains/android.toolchain.cmake:1565 (find_package)
  src/SFML/Graphics/CMakeLists.txt:119 (find_host_package)


-- Configuring incomplete, errors occurred!
See also "/home/suhairzain/Downloads/SFML-2.3.2/build/x86_64/CMakeFiles/CMakeOutput.log".

This is the content of CMakeOutput.log
Quote
The target system is: Linux - 1 - x86_64
The host system is: Linux - 3.19.0-32-generic - x86_64

What could be the issue? The page lists 'other valid targets' as: armeabi-v7a, mips, and x86.

Quote
You can repeat the following steps for all available architectures. Unfortunately, you can't build all targets for SFML at once. The following lines create a armeabi build. If you'd like to build for any other target, just replace all occurences. Other valid targets would be armeabi-v7a, mips, and x86.

Is there some extra configuration to be done for 64bit architectures?

[EDIT]
Looking at https://github.com/SFML/SFML/tree/master/extlibs/libs-android, there are only 32bit architectures. How can I build it for the 64bit architectures?
« Last Edit: November 08, 2015, 02:17:35 pm by Suhair Zain »

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: 64bit make in Android fails
« Reply #1 on: November 08, 2015, 04:21:16 pm »
No, you've done everything right. However, so far SFML only "ships" with the x86/armeabi/armeabi-v7a/mips dependencies as precompiled libraries. So you'll have to compile libjpeg and others on your own for this to work.

Edit:
Just saw your edit; you can find a build script under "tools", but you could just check the respective libraries (it's pretty much standard cross-compiling).

Suhair Zain

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Re: 64bit make in Android fails
« Reply #2 on: November 08, 2015, 05:35:45 pm »
I don't have any experience in 'standard cross-compiling'. But I guess I could try it nonetheless. If I get it right, I can push a commit to make it part of SFML, right?  :D

tanarax

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: 64bit make in Android fails
« Reply #3 on: April 12, 2019, 09:55:29 am »
Please any update on this? Since August 2019 cannot be published any android application without included 64bit binaries...

I face similar problem :

-- Android: Targeting API '21' with architecture 'arm64', ABI 'arm64-v8a', and processor 'aarch64'
-- Android: Selected GCC toolchain 'aarch64-linux-android-4.9'
-- The C compiler identification is GNU 4.9.0
-- The CXX compiler identification is GNU 4.9.0
-- Check for working C compiler: /home/UX/PCux/workspace/android-ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-gcc
-- Check for working C compiler: /home/UX/PCux/workspace/android-ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/UX/PCux/workspace/android-ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++
-- Check for working CXX compiler: /home/UX/PCux/workspace/android-ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find OpenAL (missing: OPENAL_LIBRARY)
Call Stack (most recent call first):
  /usr/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.14/Modules/FindOpenAL.cmake:97 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/Macros.cmake:398 (find_package)
  src/SFML/Audio/CMakeLists.txt:69 (sfml_find_package)

EDIT : I made 64bit arm build without audio, just now I do not need it. For graphics I needed libfreetypefont.a which I found here :
https://github.com/fan-ADN/nendSDK-cocos2d-x/blob/master/CocosNendSample/cocos2d/external/freetype2/prebuilt/android/arm64-v8a/libfreetype.a

I created new folder arm64_v8a in ths folder and placed there libfreetype.a
https://github.com/SFML/SFML/tree/master/extlibs/libs-android/

Then I was able build arm8, now I will go to try it, hope it will not crash :D
« Last Edit: April 12, 2019, 10:53:49 am by tanarax »

 

anything