Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different lc_messages not allowing to create and execute functions #9

Open
sqlambda opened this issue Mar 8, 2024 · 2 comments
Open
Assignees

Comments

@sqlambda
Copy link

sqlambda commented Mar 8, 2024

I stumbled into an issue because my server is configured with lc_messages pt_BR.utf8 and it raises an error when creating functions:

ERRO: /lib/x86_64-linux-gnu/libc.so: cabeçalho de ELF inválido

which might be in English something like:

ERROR: /lib/x86_64-linux-gnu/libc.so: invalid ELF header

After changing lc_messages to C, the function is created with success. If I change lc_messages back to pt_BR.utf8 the functions fails to execute with the same error:

daniel=# set lc_messages to default;
SET
daniel=# show lc_messages ;
 lc_messages 
-------------
 pt_BR.utf8
(1 linha)

daniel=# SELECT * FROM primes(100);
ERRO:  /lib/x86_64-linux-gnu/libc.so: cabeçalho de ELF inválido
daniel=# set lc_messages to 'C';
SET
daniel=# SELECT * FROM primes(10);
 n  | p  
----+----
  1 |  2
  2 |  3
  3 |  5
  4 |  7
  5 | 11
  6 | 13
  7 | 17
  8 | 19
  9 | 23
 10 | 29
(10 linhas)

It works with en_US.utf8:

daniel=# set lc_messages to 'en_US.utf8';
SET
daniel=# SELECT * FROM primes(10);
 n  | p  
----+----
  1 |  2
  2 |  3
  3 |  5
  4 |  7
  5 | 11
  6 | 13
  7 | 17
  8 | 19
  9 | 23
 10 | 29
(10 linhas)
@ed-o-saurus ed-o-saurus self-assigned this Mar 8, 2024
@ed-o-saurus
Copy link
Owner

ed-o-saurus commented Mar 22, 2024

I've done some investigating. The problem is with the Hint module that is used to interpret Haskell. I've submitted a bug report at [haskell-hint/hint/issues/172]. However, it looks like the issues is with the underlying GHC API.
I'll post when I know more.

@ed-o-saurus
Copy link
Owner

A workaround has been added to the README file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants