3

I have successfully built Hiphop-Php on an ubuntu server 12.04 LTS but when I run the command:

$HPHP_HOME/src/hphp/hphp test.php

This error occurs:

terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid Aborted (core dumped)

The same error occured during the make command but I used sudo make and it dealt with that, but using sudo on the above just removes the Aborted (core dumped). This is happening on a remote server, but I have done the exact same before testing on a VM. I even got root access, as I thought that could help, but it's done nothing.

Just so you know I built with USE_HHVM=0, I need the code unreadable and the bytecode format does this, but the VM I built was as well, I'm just stumped! Thanks in advance.

boundless08
  • 303
  • 4
  • 17
  • 2
    Maybe I'm missing something, but running commands through `sudo` to fix crashes seems like a really bad idea. – obmarg Nov 13 '12 at 17:00
  • I know but I thought that Hiphop needed greater privileges. It worked! name not valid, made me think of my username not being valid so I tried it since I couldn't find any fixes online for it. – boundless08 Nov 13 '12 at 17:03

1 Answers1

5

The error comes from GCC's C++ library. It means something in the program's environment has set a locale for which the locale data files are not installed on the box. e.g. LANG=foo_FOO.utf8 where the foo_FOO locale data files are not installed.

Try setting LANG=C before running it. Don't use sudo to fix crashes. That's not even wrong.

Jonathan Wakely
  • 166,810
  • 27
  • 341
  • 521