Bug 212328 - net-im/ejabberd fails to build with new erlang version 19.0.5,3
Summary: net-im/ejabberd fails to build with new erlang version 19.0.5,3
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: Ashish SHUKLA
Depends on:
Reported: 2016-09-02 10:18 UTC by Philip Homburg
Modified: 2016-09-07 13:05 UTC (History)
2 users (show)

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

poudriere log (32.86 KB, text/plain)
2016-09-02 10:18 UTC, Philip Homburg
no flags Details
files/patch-Makefile.in (2.95 KB, patch)
2016-09-05 00:08 UTC, dewayne
no flags Details | Diff
possible_svn-diff-net_im-ejabberd (31.41 KB, patch)
2016-09-07 01:06 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Homburg 2016-09-02 10:18:05 UTC
Created attachment 174311 [details]
poudriere log

Fails to build with new erlang version 19.0.5,3

See attached poudriere log
Comment 1 dewayne 2016-09-05 00:08:52 UTC
Created attachment 174379 [details]
Comment 2 dewayne 2016-09-05 00:16:35 UTC
For clarity, ejabberd requires an upgrade from 16.04 to 16.08, per 
"Fix compilation issues on R19"

I modified the Makefile for 16.08 and applied the patch-Makefile.in patch.  Unfortunately both the i386 (using openssl) and amd (libressl) failed at the same point as Philip (I also used the same Makefile options).  Following is a log extract:

Compiled src/fxmlrpc.erl
/var/ports/usr/ports/net-im/ejabberd/work/deps/fast_xml/src/fxml.erl:51: syntax error before: '/'
/var/ports/usr/ports/net-im/ejabberd/work/deps/fast_xml/src/fxml.erl:384: syntax error before: '/'
ERROR: compile failed while processing /var/ports/usr/ports/net-im/ejabberd/work/deps/fast_xml: rebar_abort
gmake[1]: *** [Makefile:90: deps/.built] Error 1
gmake[1]: Leaving directory '/var/ports/usr/ports/net-im/ejabberd/work/ejabberd-16.08'
*** Error code 1

Unfortunately I'm unable to proceed, hopefully its a start...
Comment 3 Walter Schwarzenfeld freebsd_triage 2016-09-06 21:55:50 UTC
The same error appears with 16.08.
This error is easy to patch, to change all -specs  like this
--spec(element_to_binary/1 ::

but it seems a deeper error, later appears another error:
src/ejabberd_config.erl:none: error in parse transform 'lager_transform': {function_clause,
ERROR: compile failed while processing /ram/usr/ports/net-im/ejabberd/work/ejabberd-16.04: rebar_abort
gmake[2]: *** [Makefile:90: deps/.built] Error 1
gmake[2]: Leaving directory '/ram/usr/ports/net-im/ejabberd/work/ejabberd-16.04'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

It is the same on both versions 16.04 and 16.08.
Comment 4 Walter Schwarzenfeld freebsd_triage 2016-09-06 21:58:36 UTC
I am rather insecure, but may it is this:
ejabberd has an rebar binary in the source-code. Maybe, it should changed ro devel/rebar.
(but I don't know too less about erlang).
Comment 5 Walter Schwarzenfeld freebsd_triage 2016-09-07 01:06:48 UTC
Created attachment 174450 [details]
Comment 6 Walter Schwarzenfeld freebsd_triage 2016-09-07 01:08:55 UTC
Only tested in the port (10.3-RELEASE) this compiles and installs without errors.
Maybe there will be a simpler way, with not so many patches.
Comment 7 dewayne 2016-09-07 01:28:03 UTC
(In reply to w.schwarzenfeld from comment #6)
That's a pretty astonishing patch set for what's supposed to be a working/tested application. Certainly something that should be fed back upstream.

Thank-you for your efforts, particularly walk_ast.
Comment 8 commit-hook freebsd_committer 2016-09-07 13:02:46 UTC
A commit references this bug:

Author: ashish
Date: Wed Sep  7 13:02:08 UTC 2016
New revision: 421499
URL: https://svnweb.freebsd.org/changeset/ports/421499

  - Update to 16.08
  - Update dependencies tarball
  - Add a diff for riakc to build it with Erlang 19.x
  - Temporarily disable LOGDB option
  - Instead of post-patch, switch to pre-configure target for in-place

  PR:		212410 212328

Comment 9 Ashish SHUKLA freebsd_committer 2016-09-07 13:05:09 UTC
Committed update.