Bug 249358 - mail/mailutils doesn't build with either mysql or postgresql selected.
Summary: mail/mailutils doesn't build with either mysql or postgresql selected.
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: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-16 04:07 UTC by dgilbert
Modified: 2020-09-17 06:32 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dgilbert 2020-09-16 04:07:43 UTC
Build mailutils with either mysql or postgresql selected and it will fail the build with an undefined symbol: get_size.
Comment 1 Bugzilla Automation freebsd_committer 2020-09-16 04:07:43 UTC
Maintainer informed via mail
Comment 2 dgilbert 2020-09-16 04:11:15 UTC
I've tried to attach my build log a few times, but it's too big.  Important bit pasted in below, but it can be accessed at: 

https://pkg.daveg.ca/data/freebsd_12_1_x64-ONE/2020-09-14_12h15m35s/logs/errors/mailutils-3.10.log

What follows is the important part of the build log:

Making all in lib
gmake[4]: Entering directory '/wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10/mda/lib'
cc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I. -I../../include -I../../lib -I../../lib/gnu -I../../lib/gnu -I../.. -I../../include -I/usr/local/include/python3.7m -I/usr/local/include/python3.7m "-DUSE_MAILBOX_QUOTAS=1" -DLIBICONV_PLUG -I/usr/local/include -I/usr/local/include -isystem /usr/local/include -DSYSCONFDIR=\"/usr/local/etc\"  -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -g -MT deliver.o -MD -MP -MF .deps/deliver.Tpo -c -o deliver.o deliver.c
cc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I. -I../../include -I../../lib -I../../lib/gnu -I../../lib/gnu -I../.. -I../../include -I/usr/local/include/python3.7m -I/usr/local/include/python3.7m "-DUSE_MAILBOX_QUOTAS=1" -DLIBICONV_PLUG -I/usr/local/include -I/usr/local/include -isystem /usr/local/include -DSYSCONFDIR=\"/usr/local/etc\"  -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -g -MT forward.o -MD -MP -MF .deps/forward.Tpo -c -o forward.o forward.c
cc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I. -I../../include -I../../lib -I../../lib/gnu -I../../lib/gnu -I../.. -I../../include -I/usr/local/include/python3.7m -I/usr/local/include/python3.7m "-DUSE_MAILBOX_QUOTAS=1" -DLIBICONV_PLUG -I/usr/local/include -I/usr/local/include -isystem /usr/local/include -DSYSCONFDIR=\"/usr/local/etc\"  -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -g -MT script.o -MD -MP -MF .deps/script.Tpo -c -o script.o script.c
cc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I. -I../../include -I../../lib -I../../lib/gnu -I../../lib/gnu -I../.. -I../../include -I/usr/local/include/python3.7m -I/usr/local/include/python3.7m "-DUSE_MAILBOX_QUOTAS=1" -DLIBICONV_PLUG -I/usr/local/include -I/usr/local/include -isystem /usr/local/include -DSYSCONFDIR=\"/usr/local/etc\"  -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -g -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
cc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I. -I../../include -I../../lib -I../../lib/gnu -I../../lib/gnu -I../.. -I../../include -I/usr/local/include/python3.7m -I/usr/local/include/python3.7m "-DUSE_MAILBOX_QUOTAS=1" -DLIBICONV_PLUG -I/usr/local/include -I/usr/local/include -isystem /usr/local/include -DSYSCONFDIR=\"/usr/local/etc\"  -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -g -MT mailquota.o -MD -MP -MF .deps/mailquota.Tpo -c -o mailquota.o mailquota.c
mv -f .deps/script.Tpo .deps/script.Po
mv -f .deps/deliver.Tpo .deps/deliver.Po
mailquota.c:277:8: warning: implicit declaration of function 'get_size' is invalid in C99 [-Wimplicit-function-declaration]
          if (get_size (tmp, quota, &p))
              ^
1 warning generated.
mv -f .deps/util.Tpo .deps/util.Po
mv -f .deps/mailquota.Tpo .deps/mailquota.Po
mv -f .deps/forward.Tpo .deps/forward.Po
rm -f libmda.a
ar cr libmda.a deliver.o forward.o script.o util.o mailquota.o 
ranlib libmda.a
gmake[4]: Leaving directory '/wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10/mda/lib'
Making all in mda
gmake[4]: Entering directory '/wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10/mda/mda'
Making all in .
gmake[5]: Entering directory '/wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10/mda/mda'
cc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I. -I../../include -I../../lib -I../../lib/gnu -I../../lib/gnu -I../.. -I../../include -I./../lib -DLIBICONV_PLUG -I/usr/local/include -I/usr/local/include -isystem /usr/local/include -DSYSCONFDIR=\"/usr/local/etc\"  -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -g -MT mda.o -MD -MP -MF .deps/mda.Tpo -c -o mda.o mda.c
mv -f .deps/mda.Tpo .deps/mda.Po
/bin/sh ../../libtool  --tag=CC   --mode=link cc  -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -g  -L/usr/local/lib -L/usr/local/lib -fstack-protector-strong  -o mda mda.o ../lib/libmda.a ../../lib/libmuscript.a ../../lib/libmuaux.la -lunistring ../../libmu_sieve/libmu_sieve.la ../../libproto/mbox/libmu_mbox.la  ../../libproto/maildir/libmu_maildir.la ../../libproto/dotmail/libmu_dotmail.la ../../libproto/imap/libmu_imap.la ../../libproto/pop/libmu_pop.la ../../libmu_auth/libmu_auth.la ../../libproto/mailer/libmu_mailer.la -lgnutls  -lpam -ldl ../../libmailutils/libmailutils.la ../../python/libmu_py/libmu_py.la ../../libmu_dbm/libmu_dbm.la -lpython3.7m -lcrypt -lintl -ldl -L/usr/local/lib -lintl -lutil -lm -lgdbm -L/usr/local/lib -lintl -R/usr/local/lib  -lcrypt -L/usr/local/lib -lpthread
libtool: link: cc -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -g -fstack-protector-strong -o .libs/mda mda.o  -L/usr/local/lib ../lib/libmda.a ../../lib/libmuscript.a ../../lib/.libs/libmuaux.so -lunistring ../../libmu_sieve/.libs/libmu_sieve.so ../../libproto/mbox/.libs/libmu_mbox.so ../../libproto/maildir/.libs/libmu_maildir.so ../../libproto/dotmail/.libs/libmu_dotmail.so ../../libproto/imap/.libs/libmu_imap.so -L/usr/local/lib/mysql ../../libproto/pop/.libs/libmu_pop.so ../../libmu_auth/.libs/libmu_auth.so ../../libproto/mailer/.libs/libmu_mailer.so ../../libmailutils/.libs/libmailutils.so ../../python/libmu_py/.libs/libmu_py.so /wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10/libproto/mbox/.libs/libmu_mbox.so /wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10/libproto/maildir/.libs/libmu_maildir.so /wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10/libproto/dotmail/.libs/libmu_dotmail.so /wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10/libproto/imap/.libs/libmu_imap.so /wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10/libproto/pop/.libs/libmu_pop.so /wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10/libproto/mailer/.libs/libmu_mailer.so /wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10/libmu_auth/.libs/libmu_auth.so /wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10/libmu_sieve/.libs/libmu_sieve.so /usr/local/lib/libltdl.so ../../libmu_dbm/.libs/libmu_dbm.so /wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10/libmailutils/.libs/libmailutils.so /usr/local/lib/libgdbm.so -lpython3.7m -lutil -lmysqlclient -lm -lpq -lgnutls -lpam -ldl -lintl -lcrypt -lpthread -Wl,-rpath -Wl,/usr/local/lib
ld: error: undefined symbol: get_size
>>> referenced by mailquota.c:277
>>>               mailquota.o:(sql_retrieve_quota) in archive ../lib/libmda.a
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[5]: *** [Makefile:1135: mda] Error 1
gmake[5]: Leaving directory '/wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10/mda/mda'
gmake[4]: *** [Makefile:1225: all-recursive] Error 1
gmake[4]: Leaving directory '/wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10/mda/mda'
gmake[3]: *** [Makefile:1069: all-recursive] Error 1
gmake[3]: Leaving directory '/wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10/mda'
gmake[2]: *** [Makefile:1150: all-recursive] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10'
gmake[1]: *** [Makefile:1035: all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/mail/mailutils/work/mailutils-3.10'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Comment 3 Alexey Dokuchaev freebsd_committer 2020-09-17 02:50:22 UTC
(In reply to dgilbert from comment #2)
> I've tried to attach my build log a few times, but it's too big.
Please do not attach (upload) build logs unless being explicitly asked for, e.g. if the problem cannot be easily reproduced.  Otherwise they'd just clutter Bugzilla and eat disk space, and most likely no one will look into them.

I'll see what I can do about this particular problem.
Comment 4 Alexey Dokuchaev freebsd_committer 2020-09-17 03:58:32 UTC
The bug was introduced with this upstream commit:

http://git.savannah.gnu.org/cgit/mailutils.git/commit/mda/lib/mailquota.c?id=fd9a86d37b96789d59e25e64b5d9db8974158a2c

As you can see, get_size() function was replaced with get_quota()+mu_strtosize() and caller code in the dbm_retrieve_quota() updated, but not in the sql_retrieve_quota().  The fix should be rather trivial.  In the meantime, I'll notify upstream maintainer.
Comment 5 commit-hook freebsd_committer 2020-09-17 06:28:34 UTC
A commit references this bug:

Author: danfe
Date: Thu Sep 17 06:28:00 UTC 2020
New revision: 548813
URL: https://svnweb.freebsd.org/changeset/ports/548813

Log:
  Backport upstream patch to unbreak the build with SQL support enabled.

  PR:	249358

Changes:
  head/mail/mailutils/files/patch-mda_lib_mailquota.c
Comment 6 Alexey Dokuchaev freebsd_committer 2020-09-17 06:32:38 UTC
I'm an idiot, it already had been fixed upstream one month ago!  I've committed the patch in ports r548813, thanks for reporting this bug.