Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. What should I do to deploy run Qt SQL (PostgreSQL) application on android ?

What should I do to deploy run Qt SQL (PostgreSQL) application on android ?

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
sqlpostgresqlandroidsqldriver
8 Posts 3 Posters 2.1k Views
  • 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.
  • N Offline
    N Offline
    noone
    wrote on 25 Sept 2018, 21:21 last edited by
    #1

    I have an application via which user can view tables in database via Network . It Works on my Arch Linux . But then I compiled it for android and I get :-

    W/libFlatSystem.so(28674): (null):0 ((null)): QSqlDatabase: QPSQL driver not loaded
    W/libFlatSystem.so(28674): (null):0 ((null)): QSqlDatabase: available drivers: QSQLITE
    

    So postgreSQL driver is not available on my android system . But I have installed PostgreSQL via temux and PostgreSQL is working fine in temux,Also
    I have no intention to use Progresql installed in temux . My application connects to server and and fetch data from server .
    So what thing I need to consider ?
    Do I need to bunndle Postgresql with my Qt app ?
    or Qt provides some handy way ?

    this is my first android Qt Project and I am very new to SQL world

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 25 Sept 2018, 21:32 last edited by
      #2

      Hi,

      You would have to cross-compile the PostgreSQL client libraries for Android and then build the corresponding Qt plugin.

      One thing you can try is to check with the termux folks whether you could re-use their client libraries build.

      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 26 Sept 2018, 19:28
      1
      • S SGaist
        25 Sept 2018, 21:32

        Hi,

        You would have to cross-compile the PostgreSQL client libraries for Android and then build the corresponding Qt plugin.

        One thing you can try is to check with the termux folks whether you could re-use their client libraries build.

        N Offline
        N Offline
        noone
        wrote on 26 Sept 2018, 19:28 last edited by
        #3

        @SGaist

        As u told me I had successfully compiled postgresql (since last 12 hours ) and I have put libpsql.so in /opt/Qt/5.11.1/android_armv7/plugins/sqldrivers

        % file *
        libpq.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /system/bin/linker, with debug_info, not stripped
        libqsqlite.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /system/bin/linker, not stripped

        but still I am getting same error .

        N 1 Reply Last reply 27 Sept 2018, 16:26
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 26 Sept 2018, 19:30 last edited by
          #4

          Did you build the corresponding Qt plugin ?

          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
          • N Offline
            N Offline
            noone
            wrote on 26 Sept 2018, 20:01 last edited by
            #5

            No ,But will start making it now .
            Looks like I have to do a lot of reading on Qt Docs .

            Thanks

            1 Reply Last reply
            0
            • N noone
              26 Sept 2018, 19:28

              @SGaist

              As u told me I had successfully compiled postgresql (since last 12 hours ) and I have put libpsql.so in /opt/Qt/5.11.1/android_armv7/plugins/sqldrivers

              % file *
              libpq.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /system/bin/linker, with debug_info, not stripped
              libqsqlite.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /system/bin/linker, not stripped

              but still I am getting same error .

              N Offline
              N Offline
              noone
              wrote on 27 Sept 2018, 16:26 last edited by
              #6

              Do I have to compile Qt from Source ??

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 27 Sept 2018, 19:52 last edited by
                #7

                Not the whole of Qt, just the corresponding plugin.

                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
                • I Offline
                  I Offline
                  ivand
                  wrote on 19 Oct 2018, 05:24 last edited by
                  #8

                  Hi,
                  Did you succeed to compile the PostgreSQL plugin for android?

                  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