Bug 192393

Summary: net-im/ejabberd fail to build: invalid_unicode
Product: Ports & Packages Reporter: Matthieu Volat <mazhe>
Component: Individual Port(s)Assignee: Ashish SHUKLA <ashish>
Status: Closed FIXED    
Severity: Affects Only Me CC: olgeni
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Build log
none
proposed fix none

Description Matthieu Volat 2014-08-05 06:43:10 UTC
After the last update, I cannot build ejabberd anymore, there is quickly an error after the configure step that seems to be related to unicode (iconv?) :

gmake[2]: Entering directory `/usr/ports/net-im/ejabberd/work/ejabberd-14.07'
rm -rf deps/.got
rm -rf deps/.built
/usr/local/lib/erlang/bin/escript rebar get-deps && :> deps/.got
ERROR: Failed to extract name from /usr/ports/net-im/ejabberd/work/ejabberd-14.07/deps/lhttpc/src/lhttpc.app.src: {27,

                                   file_io_server,

                                   invalid_unicode}
gmake[2]: *** [deps/.got] Error 1
gmake[2]: Leaving directory `/usr/ports/net-im/ejabberd/work/ejabberd-14.07'
===> Compilation failed unexpectedly.

(the full build log is attached)

I have few ideas to fix the problem, I tried to add similar iconv options to lang/erlang Makefile and rebuild it, with no avail.
Comment 1 Matthieu Volat 2014-08-05 06:43:54 UTC
Created attachment 145379 [details]
Build log
Comment 2 John Marino freebsd_committer freebsd_triage 2014-08-05 07:01:45 UTC
over to maintainer
Comment 3 Ashish SHUKLA freebsd_committer freebsd_triage 2014-08-06 01:51:39 UTC
(In reply to Matthieu Volat from comment #0)
> After the last update, I cannot build ejabberd anymore, there is quickly an
> error after the configure step that seems to be related to unicode (iconv?) :
> 
> gmake[2]: Entering directory `/usr/ports/net-im/ejabberd/work/ejabberd-14.07'
> rm -rf deps/.got
> rm -rf deps/.built
> /usr/local/lib/erlang/bin/escript rebar get-deps && :> deps/.got
> ERROR: Failed to extract name from
> /usr/ports/net-im/ejabberd/work/ejabberd-14.07/deps/lhttpc/src/lhttpc.app.
> src: {27,
> 
>                                    file_io_server,
> 
>                                    invalid_unicode}
> gmake[2]: *** [deps/.got] Error 1
> gmake[2]: Leaving directory `/usr/ports/net-im/ejabberd/work/ejabberd-14.07'
> ===> Compilation failed unexpectedly.
> 
> (the full build log is attached)
> 
> I have few ideas to fix the problem, I tried to add similar iconv options to
> lang/erlang Makefile and rebuild it, with no avail.

Hi Matthieu,

Could you provide output of following command-lines:

1. uname -a

2. echo $LC_ALL

3. echo $LANG

4. pkg info

Thanks,
Ashish
Comment 4 Matthieu Volat 2014-08-06 07:17:38 UTC
Sorry, the new bug report interfaces makes me forget the basics :

1. uname -a
FreeBSD yggdrasil.alkumuna.eu 10.0-RELEASE-p7 FreeBSD 10.0-RELEASE-p7 #6: Wed Jul  9 07:55:30 CEST 2014     root@yggdrasil.alkumuna.eu:/usr/obj/usr/src/sys/YGGDRASIL  amd64

2. echo $LC_ALL
empty

3. echo $LANG
en_US.UTF-8

3b. locale is set via the default section in /etc/login.conf accordingly with the freebsd manual:
    :charset=UTF-8:\
    :lang=en_US.UTF-8:

4. pkg info
apr-1.5.1.1.5.3_3              Apache Portability Library
bash-4.3.22                    The GNU Project's Bourne Again SHell
ca_root_nss-3.16.1             The root certificate bundle from the Mozilla Project
cmake-2.8.12.1_4               Cross-platform Makefile generator
cmake-modules-2.8.12.1_1       Modules and Templates for CMake
curl-7.37.1_2                  Non-interactive tool to get files from FTP, GOPHER, HTTP(S) servers
cyrus-sasl-2.1.26_8            RFC 2222 SASL (Simple Authentication and Security Layer)
cyrus-sasl-saslauthd-2.1.26_1  SASL authentication server for cyrus-sasl2
dialog4ports-0.1.5_2           Console Interface to configure ports
dovecot-pigeonhole-0.4.3_1     Sieve plugin for the Dovecot 'deliver' LDA and LMTP
dovecot2-2.2.13_3              Secure, fast and powerful IMAP and POP3 server
ejabberd-14.05                 Free and Open Source distributed fault-tolerant Jabber server
erlang-17.1,3                  Functional programming language from Ericsson
expat-2.1.0_1                  XML 1.0 parser written in C
freeradius3-3.0.3_3            Free RADIUS server implementation
freetype2-2.5.3_2              Free and portable TrueType font rendering engine
gdbm-1.11_2                    GNU database manager
gettext-0.18.3.1_1             GNU gettext package
git-2.0.2                      Distributed source code management tool
gmake-3.82_1                   GNU version of 'make' utility
gmp-5.1.3_2                    Free library for arbitrary precision arithmetic
gnupg-2.0.25_1                 The GNU Privacy Guard
gpgme-1.5.1                    Library to make access to GnuPG easier
help2man-1.43.3_1              Automatically generating simple manual pages from program output
hwloc-1.9_1                    Portable Hardware Locality software package
indexinfo-0.2                  Utility to regenerate the GNU info page index
ipsec-tools-0.8.1_7            KAME racoon IKE daemon, ipsec-tools version
isc-dhcp42-server-4.2.6_2      The ISC Dynamic Host Configuration Protocol server
jpeg-8_5                       IJG's jpeg compression utilities
lcms-1.19_5,1                  Light Color Management System -- a color management library
ldns-1.6.17_1                  Library for programs conforming to DNS RFCs and drafts
libassuan-2.1.1_1              IPC library used by GnuPG and gpgme
libevent2-2.0.21_2             API for executing callback functions on events or timeouts
libgcrypt-1.6.1_1              General purpose crypto library based on code used in GnuPG
libgpg-error-1.13_1            Common error values for all GnuPG components
libiconv-1.14_3                Character set conversion library
libksba-1.3.0_1                KSBA is an X.509 Library
libltdl-2.4.2_3                System independent dlopen wrapper
libpciaccess-0.13.2_2          Generic PCI access library
libtool-2.4.2_3                Generic shared library support script
libxml2-2.9.1_1                XML parser library for GNOME
libyaml-0.1.6                  A YAML 1.1 parser and emitter written in C
lighttpd-1.4.35_5              Secure, fast, compliant, and flexible Web Server
links-2.8,1                    Lynx-like text WWW browser
lsof-4.88.g,8                  Lists information about open files (similar to fstat(1))
lynx-2.8.8.2,1                 Non-graphical, text-based World-Wide Web client
mDNSResponder-544_1            Bonjour (zero-configuration networking) by Apple
mDNSResponder_nss-544          Apple mDNS responder - FreeBSD nsswitch module
mime-support-3.56              MIME Media Types list
moinmoin-1.9.7                 A Python clone of WikiWiki
mutt-1.5.23_3                  The Mongrel of Mail User Agents (development version)
neon29-0.29.6_6                An HTTP and WebDAV client library for Unix systems
nsd-4.0.3_1                    Authoritative only non-recursive name server
nut-2.7.2_6                    Network UPS Tools
p5-Authen-SASL-2.16            Perl5 module for SASL authentication
p5-Digest-HMAC-1.03            Perl5 interface to HMAC Message-Digest Algorithms
p5-Error-0.17022               Error/exception handling in object-oriented programming style
p5-GSSAPI-0.28                 Perl extension providing access to the GSSAPIv2 library
p5-IO-Socket-IP-0.31           Drop-in replacement for IO::Socket::INET supporting IPv4 and IPv6
p5-IO-Socket-SSL-1.997_2       Perl5 interface to SSL sockets
p5-Locale-gettext-1.05_3       Message handling functions
p5-MIME-Base64-3.14            Perl5 module for Base64 and Quoted-Printable encodings
p5-Mozilla-CA-20130114         Perl extension for Mozilla CA cert bundle in PEM format
p5-Net-SMTP-SSL-1.01_2         SMTP client supporting SSL
p5-Net-SSLeay-1.65             Perl5 interface to SSL
p5-Socket-2.014                Networking constants and support functions
pciids-20140718                Database of all known IDs used in PCI devices
pcre-8.34_2                    Perl Compatible Regular Expressions library
pdksh-5.2.14p2_6               The Public Domain Korn Shell
perl5-5.16.3_11                Practical Extraction and Report Language
pkg-1.3.4                      Package manager
pkgconf-0.9.6                  Utility to help to configure compiler and linker flags
portmaster-3.17.6              Manage your ports without external databases or languages
pth-2.0.7                      GNU Portable Threads
py27-flup-1.0.2_2              Random assortment of WSGI servers, middleware
py27-pillow-2.5.1              Fork of the Python Imaging Library (PIL)
py27-radicale-0.8_1            Python based CalDAV/CardDAV server
py27-setuptools27-5.4.1        Python packages installer
python-2.7_1,2                 The "meta-port" for the default version of Python interpreter
python2-2_2                    The "meta-port" for version 2 of the Python interpreter
python27-2.7.8_1               Interpreted object-oriented programming language
python3-3_1                    The "meta-port" for version 3 of the Python interpreter
python33-3.3.5_2               Interpreted object-oriented programming language
rsync-3.1.1_2                  Network file distribution/synchronization utility
smartmontools-6.3              S.M.A.R.T. disk monitoring tools
spawn-fcgi-1.6.4               Spawns fastcgi applications
sqlite3-3.8.5_1                SQL database engine in a C library
subversion17-1.7.17_2          Version control system
talloc-2.1.0                   Hierarchical pool based memory allocator
tmux-1.9.a_2                   Terminal Multiplexer
unbound-1.4.22_3               A validating, recursive, and caching DNS resolver
vim-7.4.389                    Improved version of the vi editor
zsh-5.0.5_1                    The Z shell
Comment 5 Ashish SHUKLA freebsd_committer freebsd_triage 2014-08-07 07:59:43 UTC
Created attachment 145440 [details]
proposed fix

Hi,

Erlang 17 now treats files as Unicode by default, but the files in question have ISO-8859-1 characters in them. This patch marks them with their proper encoding and thus fixing the issue.

Sorry I overlooked this.

Could you please try it and see if it fixes it for you ?

Thanks
Ashish SHUKLA

----

Hi Jimmy (olgeni@),

I've cc'ed you, in case he's some suggestion for the fix.

Thanks in advance,
Ashish SHUKLA
Comment 6 Matthieu Volat 2014-08-07 09:56:32 UTC
Hmm, the build finished, and there were no encoding errors, but I have a strange mention of an ignored error right at the end of the build:

gmake[2]: Leaving directory `/usr/ports/net-im/ejabberd/work/ejabberd-14.07'
install -m 444 /usr/ports/net-im/ejabberd/files/pam_ejabberd /usr/ports/net-im/ejabberd/work/stage/usr/local/etc/pam.d/ejabberd
*** Error code 1 (ignored)
====> Compressing man pages (compress-man)
===> Staging rc.d startup script(s)

Not sure about this one, but everything seems in order (I tried to reinstall and restart the service and I don't see anything missing... for now)
Comment 7 Ashish SHUKLA freebsd_committer freebsd_triage 2014-08-07 17:38:05 UTC
(In reply to Matthieu Volat from comment #6)
> Hmm, the build finished, and there were no encoding errors, but I have a
> strange mention of an ignored error right at the end of the build:
> 
> gmake[2]: Leaving directory `/usr/ports/net-im/ejabberd/work/ejabberd-14.07'
> install -m 444 /usr/ports/net-im/ejabberd/files/pam_ejabberd
> /usr/ports/net-im/ejabberd/work/stage/usr/local/etc/pam.d/ejabberd
> *** Error code 1 (ignored)
> ====> Compressing man pages (compress-man)
> ===> Staging rc.d startup script(s)

I'm unable to reproduce this one, neither with this version of port, or with previous.

Was this error present before this build ? Is it reproducible ?

> 
> Not sure about this one, but everything seems in order (I tried to reinstall
> and restart the service and I don't see anything missing... for now)

Thanks!
Ashish
Comment 8 Matthieu Volat 2014-08-09 08:17:23 UTC
Here is a bit more information:

root@yggdrasil:/usr/ports/net-im/ejabberd # make -de post-install
install -m 444 /usr/ports/net-im/ejabberd/files/pam_ejabberd /usr/ports/net-im/ejabberd/work/stage/usr/local/etc/pam.d/ejabberd

*** Failed target:  post-install
*** Failed command: [ -f /usr/ports/net-im/ejabberd/work/stage/usr/local/lib/erlang/lib/ejabberd-14.07/priv/lib/jiffy.so ] && /usr/bin/strip /usr/ports/net-im/ejabberd/work/stage/usr/local/lib/erlang/lib/ejabberd-14.07/priv/lib/jiffy.so
*** Error code 1 (ignored)

It is reproducible on my machine.

About my build options:
# This file is auto-generated by 'make config'.
# Options for ejabberd-14.07_1
_OPTIONS_READ=ejabberd-14.07_1
_FILE_COMPLETE_OPTIONS_LIST=DOCS HTTP ICONV JSON LAGER MYSQL ODBC PAM PGSQL
OPTIONS_FILE_SET+=DOCS
OPTIONS_FILE_SET+=HTTP
OPTIONS_FILE_SET+=ICONV
OPTIONS_FILE_UNSET+=JSON
OPTIONS_FILE_SET+=LAGER
OPTIONS_FILE_UNSET+=MYSQL
OPTIONS_FILE_UNSET+=ODBC
OPTIONS_FILE_SET+=PAM
OPTIONS_FILE_UNSET+=PGSQL
Comment 9 Ashish SHUKLA freebsd_committer freebsd_triage 2014-08-09 19:45:42 UTC
(In reply to Matthieu Volat from comment #8)
> Here is a bit more information:
> 
> root@yggdrasil:/usr/ports/net-im/ejabberd # make -de post-install
> install -m 444 /usr/ports/net-im/ejabberd/files/pam_ejabberd
> /usr/ports/net-im/ejabberd/work/stage/usr/local/etc/pam.d/ejabberd
> 
> *** Failed target:  post-install
> *** Failed command: [ -f
> /usr/ports/net-im/ejabberd/work/stage/usr/local/lib/erlang/lib/ejabberd-14.
> 07/priv/lib/jiffy.so ] && /usr/bin/strip
> /usr/ports/net-im/ejabberd/work/stage/usr/local/lib/erlang/lib/ejabberd-14.
> 07/priv/lib/jiffy.so
> *** Error code 1 (ignored)

Oh! right. That's expected. Sorry, I got confused.

I'll commit the update now.

Thanks
Ashish
Comment 10 Ashish SHUKLA freebsd_committer freebsd_triage 2014-08-09 19:55:40 UTC
Committed. Thanks!