[GRASS-dev] [GRASS GIS] #3047: MySQL driver failed to install

#3047: MySQL driver failed to install
--------------------------+-------------------------
Reporter: fpouw | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.5
Component: Database | Version: 7.0.4
Keywords: mysql driver | CPU: Unspecified
Platform: MSWindows 7 |
--------------------------+-------------------------
A recent install of GRASS7 is missing the MySQL driver.
The result of db.driver does not list 'mysql' it and the db.connect
command (executed without a driver specified) returns an error that
'mysql' is out of the domain of accepted values.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3047&gt;
GRASS GIS <https://grass.osgeo.org>

#3047: MySQL driver failed to install
--------------------------+------------------------------------
  Reporter: fpouw | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Database | Version: 7.0.4
Resolution: | Keywords: mysql driver, wingrass
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+------------------------------------
Changes (by martinl):

* keywords: mysql driver => mysql driver, wingrass

Comment:

Right, WinGRASS is currently built without mysql support, see build log
(1)

(1)
http://wingrass.fsv.cvut.cz/grass70/x86_64/logs/log-r68516-175/package.log

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3047#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3047: MySQL driver failed to install
--------------------------+------------------------------------
  Reporter: fpouw | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Database | Version: 7.0.4
Resolution: | Keywords: mysql driver, wingrass
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+------------------------------------

Comment (by neteler):

Replying to [comment:1 martinl]:
> Right, WinGRASS is currently built without mysql support, see build log
(1)
>
> (1)
http://wingrass.fsv.cvut.cz/grass70/x86_64/logs/log-r68516-175/package.log

The log says

"checking whether to use MySQL... no"

Is it a matter of enabling it in the configuration or more complex issues?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3047#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3047: MySQL driver failed to install
--------------------------+------------------------------------
  Reporter: fpouw | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Database | Version: 7.0.4
Resolution: | Keywords: mysql driver, wingrass
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+------------------------------------

Comment (by martinl):

Replying to [comment:2 neteler]:

> Is it a matter of enabling it in the configuration or more complex
issues?

I am planning to take a look on this issue. But first of all I need to fix
issued related to the building server (grass72).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3047#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3047: MySQL driver failed to install
--------------------------+------------------------------------
  Reporter: fpouw | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Database | Version: 7.0.4
Resolution: | Keywords: mysql driver, wingrass
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+------------------------------------

Comment (by martinl):

In [changeset:"68620" 68620]:
{{{
#!CommitTicketReference repository="" revision="68620"
wingrass: add mysql_config (see #3047)
}}}

--
Ticket URL: </ticket/3047#comment:4>
GRASS GIS <https://grass.osgeo.org>

#3047: MySQL driver failed to install
--------------------------+------------------------------------
  Reporter: fpouw | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Database | Version: 7.0.4
Resolution: | Keywords: mysql driver, wingrass
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+------------------------------------

Comment (by martinl):

In [changeset:"68621" 68621]:
{{{
#!CommitTicketReference repository="" revision="68621"
wingrass: enable mysql support (see #3047)
}}}

--
Ticket URL: </ticket/3047#comment:5>
GRASS GIS <https://grass.osgeo.org>

#3047: MySQL driver failed to install
--------------------------+------------------------------------
  Reporter: fpouw | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Database | Version: 7.0.4
Resolution: | Keywords: mysql driver, wingrass
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+------------------------------------

Comment (by martinl):

In [changeset:"68653" 68653]:
{{{
#!CommitTicketReference repository="" revision="68653"
wingrass: disable mysql support (broken build), see #3047 for details
}}}

--
Ticket URL: </ticket/3047#comment:6>
GRASS GIS <https://grass.osgeo.org>

#3047: MySQL driver failed to install
--------------------------+------------------------------------
  Reporter: fpouw | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Database | Version: 7.0.4
Resolution: | Keywords: mysql driver, wingrass
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+------------------------------------

Comment (by martinl):

The MYSQL support has been disabled due to compilation errors

{{{
C:/OSGeo4W64/include/mysql.h:64:19: error: unknown type name 'SOCKET'
  #define my_socket SOCKET
                    ^
}}}

I hope will be fixed later.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3047#comment:7&gt;
GRASS GIS <https://grass.osgeo.org>

#3047: MySQL driver failed to install
--------------------------+------------------------------------
  Reporter: fpouw | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Database | Version: 7.0.4
Resolution: | Keywords: mysql driver, wingrass
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+------------------------------------

Comment (by neteler):

Replying to [comment:7 martinl]:
> The MYSQL support has been disabled due to compilation errors
>
> {{{
> C:/OSGeo4W64/include/mysql.h:64:19: error: unknown type name 'SOCKET'
> #define my_socket SOCKET
> ^
> }}}

For a potential solution, see

http://www.technowise.in/2009/08/fixing-socket-does-not-name-type-
error.html

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3047#comment:8&gt;
GRASS GIS <https://grass.osgeo.org>

#3047: MySQL driver failed to install
--------------------------+------------------------------------
  Reporter: fpouw | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.5
Component: Database | Version: 7.0.4
Resolution: | Keywords: mysql driver, wingrass
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+------------------------------------

Comment (by neteler):

Replying to [comment:8 neteler]:
> Replying to [comment:7 martinl]:
> > The MYSQL support has been disabled due to compilation errors
> >
> > {{{
> > C:/OSGeo4W64/include/mysql.h:64:19: error: unknown type name 'SOCKET'
> > #define my_socket SOCKET
> > ^
> > }}}
>
> For a potential solution, see
>
> http://www.technowise.in/2009/08/fixing-socket-does-not-name-type-
error.html
>

Did anyone try the solution? Citation:

{{{
To fix this error, just include winsock.h before including mysql.h header
as shown below:

#include <winsock.h>
#include <mysql.h>
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3047#comment:9&gt;
GRASS GIS <https://grass.osgeo.org>

#3047: MySQL driver failed to install
--------------------------+------------------------------------
  Reporter: fpouw | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.0
Component: Database | Version: 7.0.4
Resolution: | Keywords: mysql driver, wingrass
       CPU: Unspecified | Platform: MSWindows 7
--------------------------+------------------------------------
Changes (by martinl):

* milestone: 7.0.7 => 7.8.0

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3047#comment:12&gt;
GRASS GIS <https://grass.osgeo.org>