Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-12148

Sphinx : compile error with /Zc:strictStrings

    XMLWordPrintable

Details

    Description

      When compilng Sphinx on Windows, with VS2015 and option /Zc:strictStrings, the compilation fails with
      errors about converting const char[N] to char *

      To reproduce, run cmake with

      cmake . -DCMAKE_CXX_FLAGS=/Zc:strictStrings

      strictStrings might be made default option in the future.

      See related bug in MySQL https://bugs.mysql.com/bug.php?id=85157
      Below are the 10.0 errors.

      Error	C2440	'initializing': cannot convert from 'const char [7]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\snippets_udf.cc	261	
      Error	C2440	'initializing': cannot convert from 'const char [2]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\ha_sphinx.cc	1043	
      Error	C2440	'initializing': cannot convert from 'const char [2]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\ha_sphinx.cc	1311	
      Error	C2440	'initializing': cannot convert from 'const char [2]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\snippets_udf.cc	261	
      Error	C2440	'initializing': cannot convert from 'const char [1]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\ha_sphinx.cc	1311	
      Error	C2440	'initializing': cannot convert from 'const char [10]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\ha_sphinx.cc	1042	
      Error	C2440	'initializing': cannot convert from 'const char [10]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\snippets_udf.cc	261	
      Error	C2439	'CSphUrl::m_sScheme': member could not be initialized	sphinx	D:\work\10.1\storage\sphinx\snippets_udf.cc	261	
      Error	C2439	'CSphUrl::m_sIndex': member could not be initialized	sphinx	D:\work\10.1\storage\sphinx\snippets_udf.cc	261	
      Error	C2439	'CSphUrl::m_sHost': member could not be initialized	sphinx	D:\work\10.1\storage\sphinx\snippets_udf.cc	261	
      Error	C2439	'CSphSEQuery::m_sSelect': member could not be initialized	sphinx	D:\work\10.1\storage\sphinx\ha_sphinx.cc	1311	
      Error	C2439	'CSphSEQuery::m_sComment': member could not be initialized	sphinx	D:\work\10.1\storage\sphinx\ha_sphinx.cc	1311	
      Error	C2440	'=': cannot convert from 'const char [34]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\snippets_udf.cc	468	
      Error	C2440	'=': cannot convert from 'const char [31]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\snippets_udf.cc	456	
      Error	C2440	'=': cannot convert from 'const char [30]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\snippets_udf.cc	474	
      Error	C2440	'=': cannot convert from 'const char [2]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\ha_sphinx.cc	1069	
      Error	C2440	'=': cannot convert from 'const char [2]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\ha_sphinx.cc	1074	
      Error	C2440	'=': cannot convert from 'const char [2]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\ha_sphinx.cc	1096	
      Error	C2440	'=': cannot convert from 'const char [2]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\ha_sphinx.cc	1108	
      Error	C2440	'=': cannot convert from 'const char [2]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\snippets_udf.cc	315	
      Error	C2440	'=': cannot convert from 'const char [2]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\snippets_udf.cc	320	
      Error	C2440	'=': cannot convert from 'const char [2]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\snippets_udf.cc	340	
      Error	C2440	'=': cannot convert from 'const char [2]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\snippets_udf.cc	352	
      Error	C2440	'=': cannot convert from 'const char [29]' to 'char *'	sphinx	D:\work\10.1\storage\sphinx\snippets_udf.cc	462	
      

      Attachments

        Issue Links

          Activity

            People

              wlad Vladislav Vaintroub
              wlad Vladislav Vaintroub
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.