Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Build 5.9.1 Static with OCI Driver
QtWS25 Last Chance

Qt Build 5.9.1 Static with OCI Driver

Scheduled Pinned Locked Moved Solved General and Desktop
ocidriverstatic buildstatic qtbuild error
10 Posts 4 Posters 4.7k 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.
  • SlaneS Offline
    SlaneS Offline
    Slane
    wrote on last edited by Slane
    #1

    Hi all

    I want to build Qt 5.9.1 in static with the support of OCI driver.

    I configure it with :

    -static -debug-and-release -platform win32-g++ -prefix D:\Qt\5.9.1\5.9.1\Static -opensource -confirm-license -c++std c++14 -nomake examples -skip qtdoc -skip wayland -skip purchasing -skip serialbus -skip qtserialport -skip script -skip scxml -skip speech -skip location -no-opengl -no-angle -qt-zlib -qt-pcre -qt-libpng -no-libjpeg -qt-freetype -sql-oci "OCI_INCDIR=D:\app\013798432\product\11.2.0\client_1\oci\include" "OCI_LIBDIR=D:\app\013798432\product\11.2.0\client_1\oci\lib\msvc" "OCI_LIBS=-loci -lociw32 -loraocci11"
    

    But I have the following error :

    ERROR: Feature 'sql-oci' was enabled, but the pre-condition 'libs.oci' failed.
    

    I also add the INCLUDE path and LIB path in the system environment

    How can I do to compil Qt statically with the OCI support ?

    jsulmJ 1 Reply Last reply
    0
    • SlaneS Slane

      Hi all

      I want to build Qt 5.9.1 in static with the support of OCI driver.

      I configure it with :

      -static -debug-and-release -platform win32-g++ -prefix D:\Qt\5.9.1\5.9.1\Static -opensource -confirm-license -c++std c++14 -nomake examples -skip qtdoc -skip wayland -skip purchasing -skip serialbus -skip qtserialport -skip script -skip scxml -skip speech -skip location -no-opengl -no-angle -qt-zlib -qt-pcre -qt-libpng -no-libjpeg -qt-freetype -sql-oci "OCI_INCDIR=D:\app\013798432\product\11.2.0\client_1\oci\include" "OCI_LIBDIR=D:\app\013798432\product\11.2.0\client_1\oci\lib\msvc" "OCI_LIBS=-loci -lociw32 -loraocci11"
      

      But I have the following error :

      ERROR: Feature 'sql-oci' was enabled, but the pre-condition 'libs.oci' failed.
      

      I also add the INCLUDE path and LIB path in the system environment

      How can I do to compil Qt statically with the OCI support ?

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

      @Slane Add -v parameter to configure and try again: you should then see why exactly it fails.

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

      SlaneS 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Slane Add -v parameter to configure and try again: you should then see why exactly it fails.

        SlaneS Offline
        SlaneS Offline
        Slane
        wrote on last edited by
        #3

        @jsulm I have no more informations on this error with verbose

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

          Hi,

          I'd try with replacing your OCI_* variables with -I "D:\app\013798432\product\11.2.0\client_1\oci\include" and -L "D:\app\013798432\product\11.2.0\client_1\oci\lib\msvc" the space is on purpose.

          Hope it helps

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

          SlaneS 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            I'd try with replacing your OCI_* variables with -I "D:\app\013798432\product\11.2.0\client_1\oci\include" and -L "D:\app\013798432\product\11.2.0\client_1\oci\lib\msvc" the space is on purpose.

            Hope it helps

            SlaneS Offline
            SlaneS Offline
            Slane
            wrote on last edited by
            #5

            @SGaist

            configure.bat -v -static -debug-and-release -platform win32-g++ -prefix D:\Qt\5.9.1\5.9.1\Static -opensource -confirm-license -c++std c++14 -nomake examples -skip qtdoc -skip wayland -skip purchasing -skip serialbus -skip qtserialport -skip script -skip scxml -skip speech -skip location -no-opengl -no-angle -qt-zlib -qt-pcre -qt-libpng -no-libjpeg -qt-freetype -sql-oci -I "D:\app\013798432\product\11.2.0\client_1\oci\include" -L "D:\app\013798432\product\11.2.0\client_1\oci\lib\msvc"
            

            unfortunately same result

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

              Since you have the -v option, did you catch the error message related to OCI ?

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

              SlaneS 1 Reply Last reply
              0
              • SGaistS SGaist

                Since you have the -v option, did you catch the error message related to OCI ?

                SlaneS Offline
                SlaneS Offline
                Slane
                wrote on last edited by
                #7

                @SGaist No i Haven't more information with -v

                But for compiling the OCI in dynamic, I had made some add in the .pro file of the OCI (if not, I had an error when I compil it) but when I remove the add I still have this error

                SlaneS 1 Reply Last reply
                0
                • SlaneS Slane

                  @SGaist No i Haven't more information with -v

                  But for compiling the OCI in dynamic, I had made some add in the .pro file of the OCI (if not, I had an error when I compil it) but when I remove the add I still have this error

                  SlaneS Offline
                  SlaneS Offline
                  Slane
                  wrote on last edited by
                  #8

                  I finaly succeed the compilation... by do some modification of Qt files since 30 days.

                  Z 1 Reply Last reply
                  0
                  • SlaneS Slane

                    I finaly succeed the compilation... by do some modification of Qt files since 30 days.

                    Z Offline
                    Z Offline
                    zhubangbing
                    wrote on last edited by
                    #9

                    @Slane hello,I have the same question,how did you modify the .pro?
                    Thank you very much!!

                    1 Reply Last reply
                    0
                    • SlaneS Offline
                      SlaneS Offline
                      Slane
                      wrote on last edited by Slane
                      #10

                      I made several modifications ... but i think the properly modifications are

                      In : QtSrc\qtbase\mkspecs\win32-g++\qmake.conf add

                      QMAKE_LFLAGS += -static -static-libgcc
                      QMAKE_CFLAGS_RELEASE -= -O2
                      QMAKE_CFLAGS_RELEASE += -Os -momit-leaf-frame-pointer
                      DEFINES += QT_STATIC_BUILD
                      

                      In : QtSrc\qtbase\src\plugins\sqldrivers\oci\oci.pro add

                      QMAKE_LFLAGS += oracle_home\oci\lib\msvc\oci.lib
                      QMAKE_LFLAGS += oracle_home\oci\lib\msvc\ociw32.lib
                      QMAKE_LFLAGS += oracle_home\oci\lib\msvc\oraocci11.lib
                      LIBS += -Loracle_home\oci\lib\msvc -loci -lociw32 -loraocci11
                      INCLUDEPATH += oracle_home\oci\include
                      

                      cmd

                      -static -debug-and-release -platform win32-g++ -prefix QtPath\Static -I C:\\OpenSSL-Win32\\include -L C:\\OpenSSL-Win32\\lib -opensource -confirm-license -c++std c++14 -nomake examples -skip qtdoc -skip wayland -skip purchasing -skip serialbus -skip qtserialport -skip script -skip scxml -skip speech -skip location -no-opengl -no-angle -qt-zlib -qt-pcre -qt-libpng -no-libjpeg -qt-freetype -sql-oci -I oracle_home\oci\include -L oracle_home\oci\lib\msvc
                      

                      try it. the other modifications do not matter

                      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