[QGIS-Developer] Compiling in Windows 10 with Oracle support

Diego Felipe diegosps at gmail.com
Tue Mar 3 13:22:59 PST 2020


Hello.

I was able to build it in Visual Studio 2017 doing some changes at the
scripts.
However, I can't get any oracle support. The button is not present at the
layer browser window and in DB Manager I get this error when try to connect
to any oracle database:

2020-03-03T14:20:48     CRITICAL    Qt : QSqlDatabase: QOCISPATIAL
driver not loaded
2020-03-03T14:20:48     CRITICAL    Qt : QSqlDatabase: available
drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7

There is also other erros on startup:

2020-03-03T17:33:58     WARNING    Falha ao carregar
D:/workspace/github/QGIS/ms-windows/osgeo4w/build-qgis-test-x86_64/output/plugins/RelWithDebInfo/grassplugin7.dll
(Razão: Cannot load library
D:\workspace\github\QGIS\ms-windows\osgeo4w\build-qgis-test-x86_64\output\plugins\RelWithDebInfo\grassplugin7.dll:
Não foi possível encontrar o módulo especificado.)
2020-03-03T17:33:58     WARNING    Falha ao carregar
D:/workspace/github/QGIS/ms-windows/osgeo4w/build-qgis-test-x86_64/output/plugins/RelWithDebInfo/grassprovider7.dll
(Razão: Cannot load library
D:\workspace\github\QGIS\ms-windows\osgeo4w\build-qgis-test-x86_64\output\plugins\RelWithDebInfo\grassprovider7.dll:
Não foi possível encontrar o módulo especificado.)
2020-03-03T17:33:59     WARNING    Falha ao carregar
D:/workspace/github/QGIS/ms-windows/osgeo4w/build-qgis-test-x86_64/output/plugins/RelWithDebInfo/grassrasterprovider7.dll
(Razão: Cannot load library
D:\workspace\github\QGIS\ms-windows\osgeo4w\build-qgis-test-x86_64\output\plugins\RelWithDebInfo\grassrasterprovider7.dll:
Não foi possível encontrar o módulo especificado.)
2020-03-03T17:33:59     WARNING    Falha ao carregar
D:/workspace/github/QGIS/ms-windows/osgeo4w/build-qgis-test-x86_64/output/plugins/RelWithDebInfo/qgisgrass7.dll
(Razão: Cannot load library
D:\workspace\github\QGIS\ms-windows\osgeo4w\build-qgis-test-x86_64\output\plugins\RelWithDebInfo\qgisgrass7.dll:
Não foi possível encontrar o módulo especificado.)

2020-03-03T17:33:59     WARNING    Erro Python : Impossível carregar
complemento 'MetaSearch' Devido a um erro ao chamar o método Class
Factory(). Consulte o registro de mensagens (Erro Python) para mais
detalhes.
2020-03-03T17:33:59     WARNING    Complemento processing : O
complemento será desabilitado porque ele fechou o QGIS durante seu
último início. Por favor, reporte um erro e reabilite o complemento
quando o problema estiver resolvido.
2020-03-03T17:33:59     CRITICAL    Qt : QString::arg: 9 argument(s)
missing in O estado do aplicativo:
             QGIS_PREFIX_PATH env var: ??% 1
             Prefixo: ??% 2
             Caminho do Complemento: ??% 3
             Caminho de Dados Pacote: ?% 4
             Ativo Theme Name: ?% 5
             Caminho Tema ativo: ?% 6
             Tema Padr�o Caminho: ?% 7
             SVG caminhos de pesquisa: ?% 8
             Usu�rio DB Path: ?% 9
             Auth DB Path: ?% 10

I used these
<http://htmlpreview.github.io/?https://raw.github.com/qgis/QGIS/master/doc/INSTALL.html>
instructions.
And also looked here
<https://github.com/qgis/QGIS/blob/master/ms-windows/osgeo4w/package-nightly.cmd>.
But no luck.

Now I'm trying different oracle parameters when creating the vs solution.

I don't have Oracle Client installed at my machine. But if you go to their
website
<https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html>,
you can see they now provide the OCI dlls without any installation at all.

At my last attempt, I download the latest version and tried to generate the
visual studio solution with the following parameters in *msvc-env.bat*:

path %PATH%;D:\Ferramentas\oracle_instant_client\instantclient_19_5
set OCI_INCLUDEDIR=D:\Ferramentas\oracle_instant_client\instantclient_19_5
set OCI_INCDIR=D:\Ferramentas\oracle_instant_client\instantclient_19_5
set OCI_LIBDIR=D:\Ferramentas\oracle_instant_client\instantclient_19_5
set ORACLE_HOME=D:\Ferramentas\oracle_instant_client\instantclient_19_5
set ORACLE_INCLUDEDIR=D:\Ferramentas\oracle_instant_client\instantclient_19_5
set ORACLE_LIBDIR=D:\Ferramentas\oracle_instant_client\instantclient_19_5

Also in *qgis\CMakeList.txt* I did this edit:

IF(WITH_ORACLE)
    SET(HAVE_ORACLE TRUE)
    SET(ORACLE_INCLUDEDIR ${ORACLE_INCLUDEDIR} CACHE STRING "Path to
OCI headers")
    SET(ORACLE_LIBDIR ${ORACLE_LIBDIR} CACHE STRING "Path to OCI libraries")
  ENDIF(WITH_ORACLE)

To be able to compile and run the program in visual studio, I had to copy
all qt5 dlls, proj_7_1.dll and gdal301.dll to the output diretocry.

I also noticed that \OSGeo4W\apps\Qt5\plugins\sqldrivers does not have the
OCI driver.

Anyway, can someone point me exactly what I have to do to build qgis in
windows with oracle support? I need to fix this issue
<https://github.com/qgis/QGIS/issues/24539>

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200303/4b8fe0ae/attachment.html>


More information about the QGIS-Developer mailing list