Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. How to build OpenAL-Soft and set up it in Qt Creator for Android
Forum Updated to NodeBB v4.3 + New Features

How to build OpenAL-Soft and set up it in Qt Creator for Android

Scheduled Pinned Locked Moved Solved Game Development
27 Posts 4 Posters 4.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 8Observer88 8Observer8

    I tried to build OpenAL-Soft for Android but I have these errors: https://github.com/DJLink/android-openal-soft/issues/1

    E:\Libs\open-soft-android\android-openal-soft-master\jni>ndk-build
    fcntl(): Bad file descriptor
    Android NDK: The armeabi ABI is no longer supported. Use armeabi-v7a.
    Android NDK: NDK Application 'local' targets unknown ABI(s): armeabi
    Android NDK: Please fix the APP_ABI definition in E:/Libs/open-soft-android/android-openal-soft-master/jni/Application.mk E:/AppData/Android/SDK/ndk/22.1.7171670/build//../build/core/setup-app.mk:76: *** Android NDK: Aborting . Stop.

    JoeCFDJ Offline
    JoeCFDJ Offline
    JoeCFD
    wrote on last edited by
    #6

    @8Observer8 You need to show the picture of Tools->Options->Devices->Android

    8Observer88 1 Reply Last reply
    0
    • JoeCFDJ JoeCFD

      @8Observer8 You need to show the picture of Tools->Options->Devices->Android

      8Observer88 Offline
      8Observer88 Offline
      8Observer8
      wrote on last edited by 8Observer8
      #7

      @JoeCFD,

      8c71b56a-dbdd-47a6-bfd9-f8754d28bfaa-image.png

      JoeCFDJ 1 Reply Last reply
      0
      • 8Observer88 8Observer8

        @JoeCFD,

        8c71b56a-dbdd-47a6-bfd9-f8754d28bfaa-image.png

        JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by
        #8

        @8Observer8 what is your targeted android version(s)?

        8Observer88 1 Reply Last reply
        0
        • JoeCFDJ JoeCFD

          @8Observer8 what is your targeted android version(s)?

          8Observer88 Offline
          8Observer88 Offline
          8Observer8
          wrote on last edited by
          #9

          @JoeCFD,

          522c21ca-0cf7-4d8e-8a42-15a4d8d3e33d-image.png

          JoeCFDJ 1 Reply Last reply
          0
          • 8Observer88 Offline
            8Observer88 Offline
            8Observer8
            wrote on last edited by
            #10

            I added Bullet Physics to the project using sources. It works for emulator and for smartphone too:

            c00807a0-f584-4fe8-a5ac-0dad84e55b09-image.png

            1 Reply Last reply
            0
            • 8Observer88 8Observer8

              @JoeCFD,

              522c21ca-0cf7-4d8e-8a42-15a4d8d3e33d-image.png

              JoeCFDJ Offline
              JoeCFDJ Offline
              JoeCFD
              wrote on last edited by JoeCFD
              #11

              @8Observer8
              from here:
              https://developer.android.com/build/jdks

              14 (API 34) 17 Core libraries
              13 (API 33) 11 Core libraries
              12 (API 32) 11 Java API
              11 and lower Android versions

              =============================
              your JDK version should be 11, not 17 for Android 7.
              Still Android 7? I guess most Android phones have version 12 or 13 now.

              8Observer88 1 Reply Last reply
              0
              • JoeCFDJ JoeCFD

                @8Observer8
                from here:
                https://developer.android.com/build/jdks

                14 (API 34) 17 Core libraries
                13 (API 33) 11 Core libraries
                12 (API 32) 11 Java API
                11 and lower Android versions

                =============================
                your JDK version should be 11, not 17 for Android 7.
                Still Android 7? I guess most Android phones have version 12 or 13 now.

                8Observer88 Offline
                8Observer88 Offline
                8Observer8
                wrote on last edited by 8Observer8
                #12

                @JoeCFD said in How to install OpenAL-Soft for Android in Qt Creator by copying OpenAL-Soft sources into a project:

                Still Android 7?

                I have Redmi 4x with Android 7

                JoeCFDJ 1 Reply Last reply
                0
                • 8Observer88 8Observer8

                  @JoeCFD said in How to install OpenAL-Soft for Android in Qt Creator by copying OpenAL-Soft sources into a project:

                  Still Android 7?

                  I have Redmi 4x with Android 7

                  JoeCFDJ Offline
                  JoeCFDJ Offline
                  JoeCFD
                  wrote on last edited by
                  #13

                  @8Observer8 That is very old. Then your JDK version is wrong at the first place.

                  8Observer88 1 Reply Last reply
                  0
                  • JoeCFDJ JoeCFD

                    @8Observer8 That is very old. Then your JDK version is wrong at the first place.

                    8Observer88 Offline
                    8Observer88 Offline
                    8Observer8
                    wrote on last edited by 8Observer8
                    #14

                    @JoeCFD,

                    Android NDK: The armeabi ABI is no longer supported. Use armeabi-v7a.

                    I use armeabi-v7a when I build for smartphone (and x86_64 - for emulator) but how to use armeabi-v7a when I build from the console? It will be good to have at lease a library for smartphone.

                    8f6cedfa-b1c2-44b5-b168-c3bdfb414448-image.png

                    JoeCFDJ 1 Reply Last reply
                    0
                    • 8Observer88 8Observer8

                      @JoeCFD,

                      Android NDK: The armeabi ABI is no longer supported. Use armeabi-v7a.

                      I use armeabi-v7a when I build for smartphone (and x86_64 - for emulator) but how to use armeabi-v7a when I build from the console? It will be good to have at lease a library for smartphone.

                      8f6cedfa-b1c2-44b5-b168-c3bdfb414448-image.png

                      JoeCFDJ Offline
                      JoeCFDJ Offline
                      JoeCFD
                      wrote on last edited by JoeCFD
                      #15

                      @8Observer8 show Projects->Build(Android)->Build Settings
                      click qmake "Details" button under Build Steps. You will see options for ABIs on QtCreator 11.0.1(comes with Qt-5.15.2)
                      I use arm64-v8a and my JDK version is 11. My target Android versions are 12/13.

                      8Observer88 1 Reply Last reply
                      0
                      • JoeCFDJ JoeCFD

                        @8Observer8 show Projects->Build(Android)->Build Settings
                        click qmake "Details" button under Build Steps. You will see options for ABIs on QtCreator 11.0.1(comes with Qt-5.15.2)
                        I use arm64-v8a and my JDK version is 11. My target Android versions are 12/13.

                        8Observer88 Offline
                        8Observer88 Offline
                        8Observer8
                        wrote on last edited by
                        #16

                        @JoeCFD,

                        For emulator:

                        dae70765-35fa-467e-ac86-250e95d9e48e-image.png

                        For APK:

                        08c1afca-46c1-4727-a3a8-7d820e008ea6-image.png

                        But I want to try to build the OpenAL-Soft shared (or static) library from the console using this command ndk-build. How to choose armeabi-v7a?

                        JoeCFDJ 1 Reply Last reply
                        0
                        • 8Observer88 8Observer8

                          @JoeCFD,

                          For emulator:

                          dae70765-35fa-467e-ac86-250e95d9e48e-image.png

                          For APK:

                          08c1afca-46c1-4727-a3a8-7d820e008ea6-image.png

                          But I want to try to build the OpenAL-Soft shared (or static) library from the console using this command ndk-build. How to choose armeabi-v7a?

                          JoeCFDJ Offline
                          JoeCFDJ Offline
                          JoeCFD
                          wrote on last edited by
                          #17

                          @8Observer8 I guess you have a different version of qt creator. I do not know yours.

                          8Observer88 1 Reply Last reply
                          0
                          • JoeCFDJ JoeCFD

                            @8Observer8 I guess you have a different version of qt creator. I do not know yours.

                            8Observer88 Offline
                            8Observer88 Offline
                            8Observer8
                            wrote on last edited by
                            #18

                            @JoeCFD My version of Qt Creator is 7.0.0. But I use pure NDK from the console to build OpenAL-Soft from sources. How do you know that OpenAL-Soft doesn't support Android 7?

                            7b149c89-bd99-4cc3-a28e-7e8da9dc73d8-image.png

                            JoeCFDJ 1 Reply Last reply
                            0
                            • 8Observer88 8Observer8

                              @JoeCFD My version of Qt Creator is 7.0.0. But I use pure NDK from the console to build OpenAL-Soft from sources. How do you know that OpenAL-Soft doesn't support Android 7?

                              7b149c89-bd99-4cc3-a28e-7e8da9dc73d8-image.png

                              JoeCFDJ Offline
                              JoeCFDJ Offline
                              JoeCFD
                              wrote on last edited by JoeCFD
                              #19

                              @8Observer8 You build OpenAL-Soft for Android 7. I did not say it does not support Android 7.
                              Instead you need JDK 11 to build C++ apps for Android 7. But in your settings, JDK 17 is used.

                              8Observer88 1 Reply Last reply
                              0
                              • JoeCFDJ JoeCFD

                                @8Observer8 You build OpenAL-Soft for Android 7. I did not say it does not support Android 7.
                                Instead you need JDK 11 to build C++ apps for Android 7. But in your settings, JDK 17 is used.

                                8Observer88 Offline
                                8Observer88 Offline
                                8Observer8
                                wrote on last edited by 8Observer8
                                #20

                                @JoeCFD said in How to install OpenAL-Soft for Android in Qt Creator by copying OpenAL-Soft sources into a project:

                                Instead you need JDK 11 to build C++ apps for Android 7. But in your settings, JDK 17 is used.

                                I tried to run apps with Box2D and Bullet Physics on real smartphone Redmi 4x with Android 7. I use JDK 17 and it works. I tried to run an example with QMediaPlayer on my smartphone and it plays music. I think I found a solution. I should try to use Bass Audio Library for 3D sounds on Android. It's is too difficult to add OpenAL-Soft directly with sources. Now I know this information:

                                Note that OpenAL is LGPL-licensed. Which means you need to release the source to your application if you make it part of your application.

                                JoeCFDJ 1 Reply Last reply
                                0
                                • 8Observer88 8Observer8

                                  @JoeCFD said in How to install OpenAL-Soft for Android in Qt Creator by copying OpenAL-Soft sources into a project:

                                  Instead you need JDK 11 to build C++ apps for Android 7. But in your settings, JDK 17 is used.

                                  I tried to run apps with Box2D and Bullet Physics on real smartphone Redmi 4x with Android 7. I use JDK 17 and it works. I tried to run an example with QMediaPlayer on my smartphone and it plays music. I think I found a solution. I should try to use Bass Audio Library for 3D sounds on Android. It's is too difficult to add OpenAL-Soft directly with sources. Now I know this information:

                                  Note that OpenAL is LGPL-licensed. Which means you need to release the source to your application if you make it part of your application.

                                  JoeCFDJ Offline
                                  JoeCFDJ Offline
                                  JoeCFD
                                  wrote on last edited by
                                  #21

                                  @8Observer8 Great it works for you with JDK 17. You can still build OpenAL-Soft to dynamic lib and add it to your app for Android. It does not violate LGPL-license.

                                  8Observer88 1 Reply Last reply
                                  0
                                  • JoeCFDJ JoeCFD

                                    @8Observer8 Great it works for you with JDK 17. You can still build OpenAL-Soft to dynamic lib and add it to your app for Android. It does not violate LGPL-license.

                                    8Observer88 Offline
                                    8Observer88 Offline
                                    8Observer8
                                    wrote on last edited by
                                    #22

                                    @JoeCFD what do you think about this? https://github.com/AerialX/openal-soft-android How to build it?

                                    JoeCFDJ 1 Reply Last reply
                                    0
                                    • 8Observer88 Offline
                                      8Observer88 Offline
                                      8Observer8
                                      wrote on last edited by
                                      #23

                                      Does anyone have compiled libraries (.so) of OpenAL-Soft for Android? I mean armeabi-v7a and x86_64. I can't find step by step instructions.

                                      1 Reply Last reply
                                      0
                                      • 8Observer88 8Observer8

                                        @JoeCFD what do you think about this? https://github.com/AerialX/openal-soft-android How to build it?

                                        JoeCFDJ Offline
                                        JoeCFDJ Offline
                                        JoeCFD
                                        wrote on last edited by JoeCFD
                                        #24

                                        @8Observer8 you may need to change CMakefile or create a pro file for Android. And build it for Android. It is just another project.

                                        JoeCFDJ 1 Reply Last reply
                                        0
                                        • JoeCFDJ JoeCFD

                                          @8Observer8 you may need to change CMakefile or create a pro file for Android. And build it for Android. It is just another project.

                                          JoeCFDJ Offline
                                          JoeCFDJ Offline
                                          JoeCFD
                                          wrote on last edited by JoeCFD
                                          #25

                                          @JoeCFD A lazy way to do it is that you find out all settings(flags and libs) for Android build in the Makefile(made from pro or cmakefile) of your Android project. Then, you open CMakefile of OpenAL-Soft with cmake-gui and add(or replace) all these settings to the corresponding locations. Do make and you will get the right lib for Android. I did it once for some testing and it worked.

                                          Sure it is better to do it properly. It should not be that hard.

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved