Closed mingodad closed 2 years ago
@mingodad, thank you for the report. On my MacBook Pro, I get the following result. Could you give you more information about your environment?
~/culebra/build$ ./culebra ../samples/fizzbuzz.cul
1
2
'Fizz'
4
'Buzz'
'Fizz'
7
8
'Fizz'
'Buzz'
11
'Fizz'
13
14
'FizzBuzz'
16
17
'Fizz'
19
'Buzz'
'Fizz'
22
23
I'm on Ubuntu 18.04 64 bits
uname -a
Linux mingo-X550VX 5.4.0-107-generic #121~18.04.1-Ubuntu SMP Thu Mar 24 17:21:33 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
cmake ..
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: culebra/build
The repl at first work but then:
./culebra
cul> puts(12)
Unknown error -1
I'm using the latest cloned repos for cpp-peglib/peglib.h
and cpp-linenoise/linenoise.hpp
symlinked on culebra/include
.
@mingodad, I just tried it on Ubuntu 20.04 LTS, and the fizzbuzz worked with no problem.
I went through it with the debugger and found that it was failing on initialize_definition_ids
and remembering a mention about needing to link against libpthread on cpp-peglib
I added it and now it works.
Strange that it builds fine and silently fails to execute without -lpthread
.
Following the instructions on the
readme
I can build this project but then when try to execute the example from the readme (or any other sample) I'm getting this error: