some systems (read, FreeBSD based and related systems) use an iconv library that takes const char as a parameter, whereas pretty much everywhere else uses char.
CEGUI uses a const buffer, and needs a const_cast to get around the const difference issue on the "everywhere else" systems, this however causes the build to fail on systems where the parameter expected is const.
Reproducibility: have not tried
Additional information: The easy fix is to #ifdef FAILING_SYSTEM_IDENTIFIER, however this leaves us wide open for issues to appear on systems not caught by the chosen idenitifier(s). So I propose instead to do a test compile in cmake to determine which API is available and set a define based off of that, which can then be used reliably to catch all the systems that use each API variant.