Bug 226266 - mail/postfix Cannot install with mysql flag
Summary: mail/postfix Cannot install with mysql flag
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: Olli Hauer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-28 19:03 UTC by Zilon
Modified: 2018-02-28 22:19 UTC (History)
0 users

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


Attachments
patch incompatible mysql API (1.99 KB, patch)
2018-02-28 21:21 UTC, Olli Hauer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zilon 2018-02-28 19:03:13 UTC
Since the latest update the mysql support seems to be broken. When I try to isntall postfix, I get the message:

dict_mysql.c:661:26: error: use of undeclared identifier 'MYSQL_OPT_SSL_MODE'
        mysql_options(host->db, MYSQL_OPT_SSL_MODE,

and the installation stops.
Comment 1 Zilon 2018-02-28 19:29:55 UTC
Solved. Upgraded mariadb100-client to mariadb102-client
Comment 2 Olli Hauer freebsd_committer 2018-02-28 21:21:09 UTC
Created attachment 191089 [details]
patch incompatible mysql API
Comment 3 Olli Hauer freebsd_committer 2018-02-28 21:28:08 UTC
Thanks for the report!

It seems mariadb100 does not define MARIADB_VERSION_ID.

Would you mind to do a test with mariadb100 client and a drop in replacement for postfix/files/patch-src_global_dict__mysql.c ?

Just use the attached patch or download https://people.freebsd.org/~ohauer/postfix.dict__mysql/patch-src_global_dict__mysql.c_v2.diff and replace postfix/files/patch-src_global_dict__mysql.c with this version.

My test build with the new patch against mariadb100 client was OK
Comment 4 commit-hook freebsd_committer 2018-02-28 21:50:27 UTC
A commit references this bug:

Author: ohauer
Date: Wed Feb 28 21:49:47 UTC 2018
New revision: 463264
URL: https://svnweb.freebsd.org/changeset/ports/463264

Log:
  - fix build agains maraidb100 [1]

  Firt definition of MARIADB_VERSION_ID can be found in mariadb102
  therefore we have to use MARIADB_BASE_VERSION which is defined in
  mariadb55 and mariadb10x

  PR:		226266 [1], 220224
  Reported by:	Zilon [1]

Changes:
  head/mail/postfix/files/patch-src_global_dict__mysql.c
Comment 5 commit-hook freebsd_committer 2018-02-28 21:50:33 UTC
A commit references this bug:

Author: ohauer
Date: Wed Feb 28 21:50:21 UTC 2018
New revision: 463265
URL: https://svnweb.freebsd.org/changeset/ports/463265

Log:
  - fix build agains maraidb100 [1]

  Firt definition of MARIADB_VERSION_ID can be found in mariadb102
  therefore we have to use MARIADB_BASE_VERSION which is defined in
  mariadb55 and mariadb10x

  PR:             226266 [1], 220224
  Reported by:    Zilon [1]

Changes:
  head/mail/postfix-current/files/patch-src_global_dict__mysql.c
Comment 6 Olli Hauer freebsd_committer 2018-02-28 22:19:16 UTC
I've done some test builds, and committed the patch already.

Thanks for your report!