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.
  • S Offline
    S Offline
    Slane
    wrote on 23 Aug 2017, 06:34 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 ?

    J 1 Reply Last reply 23 Aug 2017, 06:53
    0
    • S Slane
      23 Aug 2017, 06:34

      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 ?

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 23 Aug 2017, 06:53 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

      S 1 Reply Last reply 23 Aug 2017, 06:57
      0
      • J jsulm
        23 Aug 2017, 06:53

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

        S Offline
        S Offline
        Slane
        wrote on 23 Aug 2017, 06:57 last edited by
        #3

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

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 23 Aug 2017, 20:23 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

          S 1 Reply Last reply 25 Aug 2017, 05:58
          0
          • S SGaist
            23 Aug 2017, 20:23

            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

            S Offline
            S Offline
            Slane
            wrote on 25 Aug 2017, 05:58 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
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 25 Aug 2017, 20:55 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

              S 1 Reply Last reply 28 Aug 2017, 06:22
              0
              • S SGaist
                25 Aug 2017, 20:55

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

                S Offline
                S Offline
                Slane
                wrote on 28 Aug 2017, 06:22 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

                S 1 Reply Last reply 28 Aug 2017, 13:04
                0
                • S Slane
                  28 Aug 2017, 06:22

                  @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

                  S Offline
                  S Offline
                  Slane
                  wrote on 28 Aug 2017, 13:04 last edited by
                  #8

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

                  Z 1 Reply Last reply 29 Aug 2017, 23:03
                  0
                  • S Slane
                    28 Aug 2017, 13:04

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

                    Z Offline
                    Z Offline
                    zhubangbing
                    wrote on 29 Aug 2017, 23:03 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
                    • S Offline
                      S Offline
                      Slane
                      wrote on 30 Aug 2017, 07:17 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

                      1/10

                      23 Aug 2017, 06:34

                      • Login

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