Bug 234123

Summary: net-im/ejabberd: Update to 18.12 fails with compilation error
Product: Ports & Packages Reporter: neil
Component: Individual Port(s)Assignee: Ashish SHUKLA <ashish>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (ashish)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
net-im/ejabberd update to 18.12.1 none

Description neil 2018-12-18 09:24:49 UTC
Attempted builds without and with -DMAKE_JOBS_UNSAFE=yes results in the following error:

Compiled src/ejabberd_captcha.erl
Compiled src/ejabberd_c2s.erl
Compiled src/ejabberd_backend_sup.erl
src/ejabberd_auth_sql.erl:253: unknown type specifier 'l'
src/ejabberd_auth_sql.erl:35: function which_users_exists/2 undefined
Compiling src/ejabberd_auth_sql.erl failed:
ERROR: compile failed while processing /usr/ports/net-im/ejabberd/work/ejabberd-18.12: rebar_abort
gmake[2]: *** [Makefile:109: deps/.built] Error 1
gmake[2]: Leaving directory '/usr/ports/net-im/ejabberd/work/ejabberd-18.12'
===> Compilation failed unexpectedly.

Environment:
$ uname -a
FreeBSD ratchet.darlow.co.uk 11.2-RELEASE-p5 FreeBSD 11.2-RELEASE-p5 #0: Tue Nov 27 09:33:52 UTC 2018     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

$ freebsd-version
11.2-RELEASE-p6
Comment 1 Ashish SHUKLA freebsd_committer freebsd_triage 2018-12-18 17:02:28 UTC
(In reply to neil from comment #0)

Could you please confirm that when you're building ejabberd, there is no previous version of ejabberd installed on the host, as that is a known issue in ejabberd[1], also mentioned in UPDATING entry, 20171230

[1] https://github.com/processone/ejabberd/issues/2194

HTH
Comment 2 neil 2018-12-18 17:26:01 UTC
Yes. That was it!

Can pkg-message mention this, at the next update, please? I'm thinking of those who install from ports manually with the following scenario:

1) They uninstall a working version
2) A new version fails to build
3) They are left without an easy reversion mechanism.

Yes, tools like portmaster can create backup packages for you but it would be better for the package to build in the presence of an existing version.
Comment 3 Ashish SHUKLA freebsd_committer freebsd_triage 2018-12-27 11:18:58 UTC
Created attachment 200556 [details]
net-im/ejabberd update to 18.12.1

(In reply to neil from comment #2)

Thanks for the suggestion, although "pkg-message" won't quite work, as it's output at the end of port build.

I am preparing an update for 18.12.1, so also took a shot at implementing this using pre-everything target. The port seems to build fine, and haven't tested running it yet.

If you have any feedback, please do share. I'm planning to commit it tomorrow if nothing breaking change shows up.

Thanks in advance
Comment 4 commit-hook freebsd_committer freebsd_triage 2018-12-28 15:46:30 UTC
A commit references this bug:

Author: ashish
Date: Fri Dec 28 15:46:16 UTC 2018
New revision: 488608
URL: https://svnweb.freebsd.org/changeset/ports/488608

Log:
  - Update to 18.12.1
  - Fix portlint warning
  - Add a message about known build problem via pre-everything target
    when ejabberd is already installed. [1]

  PR:		234123

Changes:
  head/net-im/ejabberd/Makefile
  head/net-im/ejabberd/distinfo
  head/net-im/ejabberd/files/patch-Makefile.in
  head/net-im/ejabberd/files/patch-configure.ac
  head/net-im/ejabberd/files/patch-ejabberdctl.template
  head/net-im/ejabberd/pkg-plist
Comment 5 Ashish SHUKLA freebsd_committer freebsd_triage 2018-12-28 15:47:43 UTC
Updated port, as well as added a message about the known issue.
Comment 6 neil 2018-12-31 08:05:29 UTC
Thanks Ashish. All looks good to me.