Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Undefined symbol: SQLAllocHandle
Forum Updated to NodeBB v4.3 + New Features

Undefined symbol: SQLAllocHandle

Scheduled Pinned Locked Moved 3rd Party Software
6 Posts 2 Posters 4.2k 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.
  • R Offline
    R Offline
    redusek
    wrote on last edited by
    #1

    Hello all,

    I'm trying to build and run a Qt application on SLES 11 SP 1.

    I'm using Qt SDK 1.2 (4.8.0). I've tried installing a newer version of the Qt SDK on SLES 11 SP 1, and it doesn't install (libstdc++ is too old to run the installer for 1.2.1).

    So, I've built the Qt ODBC driver located at "QtSDK/QtSources/4.8.0/src/plugins/sqldrivers/odbc" in the 1.2 SDK. I actually compiled it on the machine I'm trying to use it on. That produces a libqsqlodbc.so binary.

    When I try to use this driver, I get the following error:

    @
    prompt:~ # MyExecutable
    prompt:~ # /path/to/MyExecutable: symbol lookup error: /opt/mypath/bin/sqldrivers/libqsqlodbc.so: undefined symbol: SQLAllocHandle
    @

    When I do an objdump on libqsqlodbc.so, I see the placeholder for SQLAllocHandle.

    @
    prompt:~ # objdump -T /opt/mypath/bin/sqldrivers/libqsqlodbc.so | grep SQLAllocHandle
    00000000 D UND 00000000 SQLAllocHandle
    @

    And, here's my driver that I'm loading via odbc...

    @
    prompt:~ # objdump -T /usr/lib/psqlodbcw.so | grep SQLAllocHandle
    00063760 g DF .text 00000142 Base SQLAllocHandle
    @

    At least I think I'm loading that thing. It's the only psqlodbc driver installed on the machine. Since the odbc driver is loaded at run time, based on the DSN used, ldd doesn't tell me anything valuable (at least not valuable to my fairly untrained eyes).

    My /etc/unixODBC/odbc.ini file only has one DSN defined, and I only have one driver defined in odbcinst.ini. And, the drivers match :)

    I have tried using a psqlodbc driver from OpenSuse and I've tried building my own driver from psqlodbc source. Both drivers exhibit this same behavior.

    I can't seem to get past this. I'm hoping someone else has run into this.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pritamghanghas
      wrote on last edited by
      #2

      you can do a cat of memory maps for your process that will tell you, what has been loaded and from where and possibly other info that may be helpful.

      cat /proc/<pid>/maps

      1 Reply Last reply
      0
      • R Offline
        R Offline
        redusek
        wrote on last edited by
        #3

        That doesn't work on my system.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          redusek
          wrote on last edited by
          #4

          We solved this problem. It turns out that our app was picking up the wrong version of the odbc library when it was loading.

          To resolve it, we added the following to the odbc.pro file when we compiled the qt odbc driver..

          @
          unix {
          LIBS += -L/usr/lib -lodbc
          }
          @

          Thank you to pritamghanghas for trying to help. Much appreciated.

          1 Reply Last reply
          0
          • P Offline
            P Offline
            pritamghanghas
            wrote on last edited by
            #5

            actually It was my mistake in last post. I had written pid in tags in between that probably got removed as a unidentified tag.

            it should be cat /proc/pid/maps

            1 Reply Last reply
            0
            • P Offline
              P Offline
              pritamghanghas
              wrote on last edited by
              #6

              where pid is the pid of your running application.

              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