Bug 191473 - [net-im/ejabberd] Crash at startup due to system libiconv not being linked
Summary: [net-im/ejabberd] Crash at startup due to system libiconv not being linked
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Some People
Assignee: Ashish SHUKLA
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-29 10:19 UTC by neil
Modified: 2014-08-03 16:09 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 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 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 2014-08-03 16:09:25 UTC
Committed changes. Thanks!