Bug 230959 - databases/mysql-connector-c: Fix build with Clang 6
Summary: databases/mysql-connector-c: Fix build with Clang 6
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
URL: http://beefy11.nyi.freebsd.org/data/h...
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-27 19:41 UTC by Tobias Kortkamp
Modified: 2018-09-10 15:26 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bofh)


Attachments
databases__mysql-connector-c.diff (1.37 KB, patch)
2018-08-27 19:42 UTC, Tobias Kortkamp
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Kortkamp freebsd_committer freebsd_triage 2018-08-27 19:41:45 UTC
The build fails with Clang 6 and soon the port will be marked as
BROKEN on 12.0 and 11.2 if we do not act.

The problem is that Clang 6 has switched to C++14 by default over
C++98 (see [1]) causing all sorts of regressions.  Often this can
easily be fixed by applying a small amount of trivial patches.

We can apply them to the ports tree but if possible (and assuming
upstream development has not ceased), they should be upstreamed to
reduce future maintainance work.

[1] http://releases.llvm.org/6.0.0/tools/clang/docs/ReleaseNotes.html#c-language-changes-in-clang
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2018-08-27 19:42:03 UTC
Created attachment 196611 [details]
databases__mysql-connector-c.diff
Comment 2 Nathan 2018-08-28 03:25:08 UTC
Confirmation: 6.0.1 has this issue and patch fixed build
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-09-10 15:26:36 UTC
A commit references this bug:

Author: tobik
Date: Mon Sep 10 15:26:04 UTC 2018
New revision: 479432
URL: https://svnweb.freebsd.org/changeset/ports/479432

Log:
  databases/mysql-connector-c: Fix build with Clang 6

  sql-common/client_authentication.cc:86:56: error: comparison between pointer and integer ('char *' and 'int')
        mysql->options.extension->server_public_key_path != '\0')
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~

  http://beefy12.nyi.freebsd.org/data/head-amd64-default/p479076_s338486/logs/errors/mysql-connector-c-6.1.11.log

  PR:		230959
  Approved by:	bofh (maintainer timeout, 2 weeks)

Changes:
  head/databases/mysql-connector-c/files/patch-sql-common_client__authentication.cc