Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt 5.13.0 - Build postgres driver for android
Forum Updated to NodeBB v4.3 + New Features

Qt 5.13.0 - Build postgres driver for android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
21 Posts 4 Posters 3.9k 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.
  • NickVN NickV

    @jsulm
    export ANDROID_NDK_ROOT="/<path-to-ndk>/android-ndk-r15c"
    SR="$ANDROID_NDK_ROOT/platforms/android-21/arch-arm"
    BR="$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-"

    and then cd to postgres folder
    STRIP="$BR"strip RANLIB="$BR"ranlib OBJDUMP="$BR"objdump AR="$BR"ar CC="$BR"gcc CFLAGS=--sysroot=$SR CPP="$BR"cpp CPPFLAGS=$CFLAGS ./configure --prefix=$SR/usr --host=arm-linux-androideabi --target=arm-linux-androideabi --build="$CHOST" --without-readline --with-openssl --with-includes=/<path-to-openssl>/openssl-1.0.2n/include --with-libs=/<path-to-openssl>/openssl-1.0.2n

    sed -e 's/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)/lib$(NAME)$(DLSUFFIX)/g' -i src/Makefile.shlib
    sed -e 's/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)/lib$(NAME)$(DLSUFFIX)/g' -i src/Makefile.shlib

    make -C src/interfaces/libpq

    WIth this instructions i made it to create a libpq.so form arm architecture but it is for 32bit not for 64bit. If i use android ndk r18b then the libpq.so that produced is for x86_64 architecture.

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #11

    @NickV How do you build with r18b?

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • NickVN Offline
      NickVN Offline
      NickV
      wrote on last edited by
      #12

      @jsulm
      I am doing exactly the same thing but i use
      export ANDROID_NDK_ROOT="/<path-to-ndk>/android-ndk-r18b"

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #13

        Since you are building for 5.13 you should change to NDK r19 at least.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • NickVN Offline
          NickVN Offline
          NickV
          wrote on last edited by NickV
          #14

          @SGaist
          I've also tried with android ndk r19c. Still having problems.

          1 Reply Last reply
          0
          • NickVN Offline
            NickVN Offline
            NickV
            wrote on last edited by
            #15

            Does postgres supports android 64 bit cpu architectures?

            jsulmJ 1 Reply Last reply
            0
            • NickVN NickV

              Does postgres supports android 64 bit cpu architectures?

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #16

              @NickV This is something you should ask postgres developers

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #17

                It should be since it's available on Debian for arm64. However there might be a flag to set somewhere.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  Nogood
                  wrote on last edited by
                  #18

                  Hi, has anyone managed to put together a psql android plugin for qt qml app? My application is not connecting to postgres database on another machine.

                  SGaistS 1 Reply Last reply
                  0
                  • N Nogood

                    Hi, has anyone managed to put together a psql android plugin for qt qml app? My application is not connecting to postgres database on another machine.

                    SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #19

                    @Nogood said in Qt 5.13.0 - Build postgres driver for android:

                    Hi, has anyone managed to put together a psql android plugin for qt qml app? My application is not connecting to postgres database on another machine.

                    Hi and welcome to devnet,

                    Did you follow the guide @NickV used ?
                    If not, what did you do ?
                    If you did, what error message do you get ?
                    Also, are you sure you can access that database remotely from another computer ?
                    Did you start your application with the QT_DEBUG_PLUGINS environment variable set to 1 in order to have more information ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    N 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      @Nogood said in Qt 5.13.0 - Build postgres driver for android:

                      Hi, has anyone managed to put together a psql android plugin for qt qml app? My application is not connecting to postgres database on another machine.

                      Hi and welcome to devnet,

                      Did you follow the guide @NickV used ?
                      If not, what did you do ?
                      If you did, what error message do you get ?
                      Also, are you sure you can access that database remotely from another computer ?
                      Did you start your application with the QT_DEBUG_PLUGINS environment variable set to 1 in order to have more information ?

                      N Offline
                      N Offline
                      Nogood
                      wrote on last edited by
                      #20

                      @SGaist said in Qt 5.13.0 - Build postgres driver for android:

                      guide

                      Yes, i used guide. But I didn't find the arm-linux-androideabi-gcc file.

                      everything is fine with the database, the program works well on windows.

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #21

                        Androïd switched to clang.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        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