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. Qt5.14 compile QOCI driver on Linux -error [Cannot read /qtsqldrivers-config.pri:]
Forum Updated to NodeBB v4.3 + New Features

Qt5.14 compile QOCI driver on Linux -error [Cannot read /qtsqldrivers-config.pri:]

Scheduled Pinned Locked Moved Solved Installation and Deployment
10 Posts 3 Posters 1.3k 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.
  • Sam_QooS Offline
    Sam_QooS Offline
    Sam_Qoo
    wrote on last edited by
    #1

    I had compiled one QOCI driver(got qsqloci.dll and qsqlocid.dll)on windows10.
    Official doc (qmake console) not work for me:How to Build the OCI Plugin on Unix and macOS
    here is my environment:
    QT VERSION:QT 5.14.0 Linux x64
    SYSTEM:Debian 10 x64
    DATABASE:Oracle 11g x64 (server on windows10)
    I had installed Oracle Instant Client (Base + SDK +SQLPLUS)on Debian, here is my edited [oci.pro] file
    2020-12-16 233343.jpg
    qmake error and it said:
    myerror
    run it and crash:
    2020-12-17 001213.jpg
    There is no qtsqldrivers-config.pri ,What can I do to find it ,or I did wrong at the very start ?
    Thank you so much for seeing my trouble.

    1 Reply Last reply
    0
    • Christian EhrlicherC Christian Ehrlicher

      @Sam_Qoo said in Qt5.14 compile QOCI driver on Linux -error [Cannot read /qtsqldrivers-config.pri:]:

      but I do not want a TDS driver...

      I know - and as you can see the Oracle driver is not found - take a look into the config.log if the include and lib paths you give are correctly used - looks like this is not the case. And please do not post screenshots - it makes reading the whole stuff very complicated for me.

      Don't know why you try to call make when the config output tells you that oci was not found though.
      Please also start over with a clean build dir.

      Sam_QooS Offline
      Sam_QooS Offline
      Sam_Qoo
      wrote on last edited by
      #10

      @Christian-Ehrlicher @jsulm
      Thank you very very much.
      I do not know how to clean qmake file,but I use VM,back to where I start to qmake.
      Just a small mistake,took me lots of time.I did not alter the doc example word(-lnnz10)to my current oracle version(-lnnz11)

      */opt/Qt5.14.0/5.14.0/gcc_64/bin/qmake -- OCI_INCDIR=/usr/include/oracle/11.2/client64 OCI_LIBDIR=/usr/lib/oracle/11.2/client64/lib OCI_LIBS="-Wl,-rpath,/usr/lib/oracle/11.2/client64/lib -lclntsh -lnnz10"*
      
      /opt/Qt5.14.0/5.14.0/gcc_64/bin/qmake -- OCI_INCDIR=/usr/include/oracle/11.2/client64 OCI_LIBDIR=/usr/lib/oracle/11.2/client64/lib OCI_LIBS="-Wl,-rpath,/usr/lib/oracle/11.2/client64/lib -lclntsh -lnnz11"
      

      Running configuration tests...
      Checking for DB2 (IBM)... no
      Checking for InterBase... no
      Checking for MySQL... no
      Checking for OCI (Oracle)... yes
      Checking for ODBC... no
      Checking for PostgreSQL... no
      Checking for SQLite (version 2)... no
      Checking for TDS (Sybase)... no
      Done running configuration tests.

      Configure summary:

      Qt Sql Drivers:
      DB2 (IBM) .............................. no
      InterBase .............................. no
      MySql .................................. no
      OCI (Oracle) ........................... yes
      ODBC ................................... no
      PostgreSQL ............................. no
      SQLite2 ................................ no
      SQLite ................................. yes
      Using system provided SQLite ......... no
      TDS (Sybase) ........................... no

      Qt is now configured for building. Just run 'make'.
      Once everything is built, you must run 'make install'.
      Qt will be installed into '/opt/Qt5.14.0/5.14.0/gcc_64'.

      Prior to reconfiguration, make sure you remove any leftovers from
      the previous build.

      just make

      using:qDebug()<<QSqlDatabase::drivers();

      console:{
      QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
      ("QSQLITE", "QOCI", "QOCI8", "QODBC", "QODBC3", "QPSQL", "QPSQL7")}

      1 Reply Last reply
      1
      • Christian EhrlicherC Online
        Christian EhrlicherC Online
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Please do not edit anything but follow the documentation

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        Sam_QooS 1 Reply Last reply
        2
        • Christian EhrlicherC Christian Ehrlicher

          Please do not edit anything but follow the documentation

          Sam_QooS Offline
          Sam_QooS Offline
          Sam_Qoo
          wrote on last edited by
          #3

          @Christian-Ehrlicher ,Thank you for reply!
          Had restored qtoci files,reinstall Oracle Instant Client.Did as doc said,qmake :
          2020-12-17 145810.jpg
          OCI_INDIR and OCI_LIBDIR ,files are exist:
          2020-12-17 150229.jpg
          found this in configure.log:

          g++ -c -pipe -O2 -w -fPIC -I. -I/home/qt/openssl-1.1.1d/include -I/opt/Qt5.14.0/5.14.0/gcc_64/mkspecs/linux-g++ -o main.o main.cpp
          main.cpp:2:10: fatal error: sybfront.h: no file or url
          #include <sybfront.h>
          ^~~~~~~~~~~~
          compilation terminated.
          make: *** [Makefile:521:main.o]
          => source failed verification.
          test config.sqldrivers.libraries.tds FAILED

          build oci only
          2020-12-17 152918.jpg

          jsulmJ 1 Reply Last reply
          0
          • Sam_QooS Sam_Qoo

            @Christian-Ehrlicher ,Thank you for reply!
            Had restored qtoci files,reinstall Oracle Instant Client.Did as doc said,qmake :
            2020-12-17 145810.jpg
            OCI_INDIR and OCI_LIBDIR ,files are exist:
            2020-12-17 150229.jpg
            found this in configure.log:

            g++ -c -pipe -O2 -w -fPIC -I. -I/home/qt/openssl-1.1.1d/include -I/opt/Qt5.14.0/5.14.0/gcc_64/mkspecs/linux-g++ -o main.o main.cpp
            main.cpp:2:10: fatal error: sybfront.h: no file or url
            #include <sybfront.h>
            ^~~~~~~~~~~~
            compilation terminated.
            make: *** [Makefile:521:main.o]
            => source failed verification.
            test config.sqldrivers.libraries.tds FAILED

            build oci only
            2020-12-17 152918.jpg

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

            @Sam_Qoo said in Qt5.14 compile QOCI driver on Linux -error [Cannot read /qtsqldrivers-config.pri:]:

            main.cpp:2:10: fatal error: sybfront.h: no file or url

            Install freetds-dev package

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

            1 Reply Last reply
            0
            • Sam_QooS Offline
              Sam_QooS Offline
              Sam_Qoo
              wrote on last edited by
              #5

              @Sam_Qoo said in Qt5.14 compile QOCI driver on Linux -error [Cannot read /qtsqldrivers-config.pri:]:
              Thanks.Already did :
              apt-get install freetds-common freetds-dev libct4 libsybdb5

              configure.log tell the same error : (

              1 Reply Last reply
              0
              • Christian EhrlicherC Online
                Christian EhrlicherC Online
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #6

                First: no need to use sudo
                Second: Please take a look in the config log and search for oracle, not sybase when you want to compile the orcale driver

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                Sam_QooS 2 Replies Last reply
                0
                • Christian EhrlicherC Christian Ehrlicher

                  First: no need to use sudo
                  Second: Please take a look in the config log and search for oracle, not sybase when you want to compile the orcale driver

                  Sam_QooS Offline
                  Sam_QooS Offline
                  Sam_Qoo
                  wrote on last edited by
                  #7
                  This post is deleted!
                  1 Reply Last reply
                  0
                  • Christian EhrlicherC Christian Ehrlicher

                    First: no need to use sudo
                    Second: Please take a look in the config log and search for oracle, not sybase when you want to compile the orcale driver

                    Sam_QooS Offline
                    Sam_QooS Offline
                    Sam_Qoo
                    wrote on last edited by
                    #8

                    @Christian-Ehrlicher @jsulm Thank you ,but I do not want a TDS driver...
                    2020-12-17 193116.jpg
                    Here is error of oracle in config.log:
                    2020-12-17 184657.jpg
                    and compile oci only
                    2020-12-17 193520.jpg

                    1 Reply Last reply
                    0
                    • Christian EhrlicherC Online
                      Christian EhrlicherC Online
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on last edited by
                      #9

                      @Sam_Qoo said in Qt5.14 compile QOCI driver on Linux -error [Cannot read /qtsqldrivers-config.pri:]:

                      but I do not want a TDS driver...

                      I know - and as you can see the Oracle driver is not found - take a look into the config.log if the include and lib paths you give are correctly used - looks like this is not the case. And please do not post screenshots - it makes reading the whole stuff very complicated for me.

                      Don't know why you try to call make when the config output tells you that oci was not found though.
                      Please also start over with a clean build dir.

                      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                      Visit the Qt Academy at https://academy.qt.io/catalog

                      Sam_QooS 1 Reply Last reply
                      1
                      • Christian EhrlicherC Christian Ehrlicher

                        @Sam_Qoo said in Qt5.14 compile QOCI driver on Linux -error [Cannot read /qtsqldrivers-config.pri:]:

                        but I do not want a TDS driver...

                        I know - and as you can see the Oracle driver is not found - take a look into the config.log if the include and lib paths you give are correctly used - looks like this is not the case. And please do not post screenshots - it makes reading the whole stuff very complicated for me.

                        Don't know why you try to call make when the config output tells you that oci was not found though.
                        Please also start over with a clean build dir.

                        Sam_QooS Offline
                        Sam_QooS Offline
                        Sam_Qoo
                        wrote on last edited by
                        #10

                        @Christian-Ehrlicher @jsulm
                        Thank you very very much.
                        I do not know how to clean qmake file,but I use VM,back to where I start to qmake.
                        Just a small mistake,took me lots of time.I did not alter the doc example word(-lnnz10)to my current oracle version(-lnnz11)

                        */opt/Qt5.14.0/5.14.0/gcc_64/bin/qmake -- OCI_INCDIR=/usr/include/oracle/11.2/client64 OCI_LIBDIR=/usr/lib/oracle/11.2/client64/lib OCI_LIBS="-Wl,-rpath,/usr/lib/oracle/11.2/client64/lib -lclntsh -lnnz10"*
                        
                        /opt/Qt5.14.0/5.14.0/gcc_64/bin/qmake -- OCI_INCDIR=/usr/include/oracle/11.2/client64 OCI_LIBDIR=/usr/lib/oracle/11.2/client64/lib OCI_LIBS="-Wl,-rpath,/usr/lib/oracle/11.2/client64/lib -lclntsh -lnnz11"
                        

                        Running configuration tests...
                        Checking for DB2 (IBM)... no
                        Checking for InterBase... no
                        Checking for MySQL... no
                        Checking for OCI (Oracle)... yes
                        Checking for ODBC... no
                        Checking for PostgreSQL... no
                        Checking for SQLite (version 2)... no
                        Checking for TDS (Sybase)... no
                        Done running configuration tests.

                        Configure summary:

                        Qt Sql Drivers:
                        DB2 (IBM) .............................. no
                        InterBase .............................. no
                        MySql .................................. no
                        OCI (Oracle) ........................... yes
                        ODBC ................................... no
                        PostgreSQL ............................. no
                        SQLite2 ................................ no
                        SQLite ................................. yes
                        Using system provided SQLite ......... no
                        TDS (Sybase) ........................... no

                        Qt is now configured for building. Just run 'make'.
                        Once everything is built, you must run 'make install'.
                        Qt will be installed into '/opt/Qt5.14.0/5.14.0/gcc_64'.

                        Prior to reconfiguration, make sure you remove any leftovers from
                        the previous build.

                        just make

                        using:qDebug()<<QSqlDatabase::drivers();

                        console:{
                        QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
                        ("QSQLITE", "QOCI", "QOCI8", "QODBC", "QODBC3", "QPSQL", "QPSQL7")}

                        1 Reply Last reply
                        1

                        • Login

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