Bug 243035 - mail/dspam: Fails to configure with MariaDB 10.x: error: Unsupported version of MySQL (Missing CR_ERROR_FIRST)
Summary: mail/dspam: Fails to configure with MariaDB 10.x: error: Unsupported version ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Alexey Dokuchaev
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2020-01-02 10:23 UTC by Vikash Badal
Modified: 2020-07-22 14:25 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (danny)
koobs: maintainer-feedback? (brnrd)
koobs: merge-quarterly?


Attachments
configure patch (1.10 KB, patch)
2020-01-02 10:23 UTC, Vikash Badal
no flags Details | Diff
patch for mysql_drv.m4 (1.02 KB, application/x-m4)
2020-01-02 10:24 UTC, Vikash Badal
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vikash Badal 2020-01-02 10:23:57 UTC
Created attachment 210385 [details]
configure patch

the configure stage current fails when using mariadb 10.x:

configure: error: Unsupported version of MySQL (no PROTOCOL_VERSION or ER_LOCK_DEADLOCK or ER_LOCK_WAIT_TIMEOUT or ER_LOCK_OR_ACTIVE_TRANSACTION or CR_ERROR_FIRST defined)

this is because CR_ERROR_FIRST is no longer present in library

attached patch files remove this check, however i do not know how to patch conditionally i.e only patch is using mariadb 10.x

is there a way to patch conditional ?
Comment 1 Vikash Badal 2020-01-02 10:24:51 UTC
Created attachment 210386 [details]
patch for mysql_drv.m4
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2020-01-02 10:30:16 UTC
Thank you for the report and initial patch Vikash

Something like checking the "mysql" DEFAULT_VERSION value in a condition and using EXTRA_PATCHES if the condition is true, should be ok

@Vikash Also, this should probably be resolved properly upstream, would you mind reporting the issue if you haven't already?

^Triage: Request feedback from databases/mariadb101-server maintainer on conditional patching advice
Comment 3 Vikash Badal 2020-01-02 14:32:26 UTC
(In reply to Kubilay Kocak from comment #2)

@Kubilay ticket:
https://sourceforge.net/p/dspam/bug-tracker/174/

there seems to be no activity since 2014 though.
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-07-22 14:21:45 UTC
A commit references this bug:

Author: danfe
Date: Wed Jul 22 14:20:58 UTC 2020
New revision: 542858
URL: https://svnweb.freebsd.org/changeset/ports/542858

Log:
  Unbreak the build against MariaDB and MySQL 8.0 (the latter replaced
  my_bool with C99 bool, while earlier versions used typedef to char).

  PR:	243035

Changes:
  head/mail/dspam/Makefile
  head/mail/dspam/files/patch-src_mysql__drv.c
Comment 5 Alexey Dokuchaev freebsd_committer freebsd_triage 2020-07-22 14:25:15 UTC
Should be fixed as of ports r542858, please test and reopen the bug if anything's still missing.