Everything on the system is USE=-nls, and ejabberd seems to require dev-erlang/iconv even with -nls: 2016-12-26 21:15:33.022 [critical] <0.401.0>@ejabberd:exit_or_halt:133 failed to start application 'iconv': {error, {"no such file or directory", "iconv.app"}} When I added +nls for only net-im/ejabberd, it started fine.
Do you enable mod_irc? It looks that it's imported by mod_irc.
Please try disabling mod_irc in your configuration. It should not need iconv. Possibly mod_irc should be completely disabled if it's built without iconv.
I have tried to reproduce it, but ejabberd 17.04 starts for me with -nls. Maybe it has been fixed recently? Please reopen if you still find it an issue.
Ah, sorry. I could actually reproduce it, but having mod_irc disables fixes the problem indeed. I will delete mod_irc from configuration on -nls.
commit 0912204c84b553560a7a48ad1393b7906cccf351 Author: Amadeusz Żołnowski <aidecoe@gentoo.org> Date: Sun May 28 19:06:04 2017 +0100 net-im/ejabberd: Disable mod_irc if nls USE flag is disbled mod_irc is only required for mod_irc. If nls support is disabled, disable mod_irc in example configuration file and warn user if he/she has mod_irc enabled in configuration. Otherwise ejabberd will fail to start. Gentoo-Bug: 603822 Package-Manager: Portage-2.3.5, Repoman-2.3.2
Of course I made a mistake in commit message: "mod_irc is only required for mod_irc.". It should be "nls is only required for mod_irc." instead.
It is fixed in all versions without bumping revision because it's just a change in example configuration file and ewarning.