Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. Build Postgresql driver for Webassembly
Forum Updated to NodeBB v4.3 + New Features

Build Postgresql driver for Webassembly

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
6 Posts 3 Posters 1.4k 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.
  • Y Offline
    Y Offline
    YasserFathy
    wrote on last edited by
    #1

    Hello all and thanks for your suppot,

    I was working on a QT application and intended to try to build it for webassembly.

    I followed the instructions here "https://doc.qt.io/qt-5/wasm.html" and was able to build qt using emscripten.

    Since my application uses Postgresql, I have to build the drivers for webassembly as well, this is where things got confusing, I tried to follow the instructions here "https://doc.qt.io/qt-5/sql-driver.html":

    "cd $QTDIR/qtbase/src/plugins/sqldrivers
    qmake -- PSQL_INCDIR=/usr/include/pgsql
    make sub-psql"

    where "qmake" is the one resulting from the emscripten build

    but running "make sub-psql" results in a message:
    "Project ERROR: No module claims plugin type 'sqldrivers'
    Makefile:44: recipe for target 'sub-psql' failed"

    Appreciate your help.

    Best Regards,

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

      Hi,

      I haven't used that module yet but the first thing I would check is whether PostgreSQL has libraries for WASM.

      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
      • Y Offline
        Y Offline
        YasserFathy
        wrote on last edited by
        #3

        Hello SGaist,

        Thanks for your response.

        Let me make sure I understand, the commends :
        qmake -- PSQL_INCDIR=/usr/include/pgsql
        make sub-psql"

        builds the SQL library of Qt, but it requires the driver APIs to be compatible, but what I did is that I provided PostgreSQL include path that is a desktop build not emscripten, so the qmake script recognized that and failed ?

        If that's the case, would building PostgreSQL using emscripten be an alternative ? I looked online for a ready build but couldn't find something that seemed mature.

        Appreciate your help.

        BR.

        1 Reply Last reply
        0
        • Y Offline
          Y Offline
          YasserFathy
          wrote on last edited by
          #4

          Let me ask another question, is there a different SQL database solution that would allow me to port my application to WASM with minimal overhead ?

          Thanks.

          JonBJ 1 Reply Last reply
          0
          • Y YasserFathy

            Let me ask another question, is there a different SQL database solution that would allow me to port my application to WASM with minimal overhead ?

            Thanks.

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #5

            @YasserFathy
            So far as I understood, QtSql is not supported (yet?) in WASM, that would include even SQLite. @lorn-potter would be your expert, if he happens to see this.

            1 Reply Last reply
            0
            • Y Offline
              Y Offline
              YasserFathy
              wrote on last edited by
              #6

              Thanks Jon, hope he sees it.

              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