Bug 191473

Summary: [net-im/ejabberd] Crash at startup due to system libiconv not being linked
Product: Ports & Packages Reporter: neil
Component: Individual Port(s)Assignee: Ashish SHUKLA <ashish>
Status: Closed FIXED    
Severity: Affects Some People    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description neil 2014-06-29 10:19:50 UTC
When ICONV option is selected (default), and FreeBSD version provides libiconv, this library is not linked
correctly and ejabberd crashes at startup.

How-To-Repeat:
Build net-im/ejabberd from ports with ICONV enabled.
Start ejabberd and notice creation of crash dump file and crash log in /var/log/ejabberd.

Fix:
I have the libiconv port installed (required by other ports) and was able to force use of the libiconv port
by modifing Makefile like so:

-USES= gmake pkgconfig
+USES= gmake pkgconfig iconv:wchar_t

The addition of iconv:wchar_t causes /usr/ports/Mk/Uses/iconv.mk to create a LIB_DEPENDS on the
libiconv port.

ejabberd links libiconv from ports correctly and starts without crashing.
Comment 1 neil 2014-08-01 10:43:33 UTC
This is still a problem for ejabberd-14.07.

I have revised the earlier fix to modify ICONV_USES as follows:

ICONV_USES= iconv:wchar_t
Comment 2 Ashish SHUKLA freebsd_committer freebsd_triage 2014-08-02 15:41:57 UTC
(In reply to neil from comment #1)
> This is still a problem for ejabberd-14.07.
> 
> I have revised the earlier fix to modify ICONV_USES as follows:
> 
> ICONV_USES= iconv:wchar_t

Hi,

Thanks for the fix. I'll commit after making sure it builds fine on all platforms.
Comment 3 commit-hook freebsd_committer freebsd_triage 2014-08-03 16:07:16 UTC
A commit references this bug:

Author: ashish
Date: Sun Aug  3 16:06:23 UTC 2014
New revision: 363919
URL: http://svnweb.freebsd.org/changeset/ports/363919

Log:
  - Fix crashing on 10.x and later, when ICONV option is enabled

  PR:		191473
  Submitted by:	neil at darlow.co.uk

Changes:
  head/net-im/ejabberd/Makefile
Comment 4 Ashish SHUKLA freebsd_committer freebsd_triage 2014-08-03 16:09:25 UTC
Committed changes. Thanks!