Solidity: solc crashes without 'export LC_ALL=C'

Created on 20 Jun 2016  路  3Comments  路  Source: ethereum/solidity

System information

Geth version: 1.5.0-unstable
OS & Version: Ubuntu 14.04.4

Expected behaviour

Solc must run normally.

Actual behaviour

It crashes and generates core file.

Steps to reproduce the behaviour

ubuntu@xxx:~/$ locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
C
C.UTF-8
en_US.utf8
POSIX

ubuntu@xxx:~/$ solc SomeContract.sol
terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid
Aborted (core dumped)

Then i added 'export LC_ALL=C' and everything went normally.

bug

Most helpful comment

Hey, @AnthonyAkentiev,

Thanks for the report. This seems to be a common issue across all of our C++ applications, and is the reason we have the following steps listed in the building from source:

sudo apt-get -y install language-pack-en-base
sudo dpkg-reconfigure locales

How did you install your solc? Build from source or apt-get? Perhaps those don't happen for an apt-get install? Or perhaps you followed instructions from Solidity readthedocs which were missing those steps?

The real solution here is https://github.com/ethereum/webthree-umbrella/issues/169 - to force "C" locale at runtime.

This issue popped up for me on a Jolla Sailfish phone too, and I've seen it on Raspberry Pi too. We need to address it at runtime, not rely on the environment to be "good".

All 3 comments

Hey, @AnthonyAkentiev,

Thanks for the report. This seems to be a common issue across all of our C++ applications, and is the reason we have the following steps listed in the building from source:

sudo apt-get -y install language-pack-en-base
sudo dpkg-reconfigure locales

How did you install your solc? Build from source or apt-get? Perhaps those don't happen for an apt-get install? Or perhaps you followed instructions from Solidity readthedocs which were missing those steps?

The real solution here is https://github.com/ethereum/webthree-umbrella/issues/169 - to force "C" locale at runtime.

This issue popped up for me on a Jolla Sailfish phone too, and I've seen it on Raspberry Pi too. We need to address it at runtime, not rely on the environment to be "good".

I've installed it using apt-get

Thanks, @AnthonyAkentiev.

@chriseth FYI ... Looks like the solidity build instructions are missing those locale steps, which would be needed in both "build from source" and "install from PPA", I think.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hiqua picture hiqua  路  4Comments

chriseth picture chriseth  路  3Comments

chriseth picture chriseth  路  4Comments

bshastry picture bshastry  路  3Comments

chriseth picture chriseth  路  3Comments