Got an exception during rebar3 compile
- Dominant language
- Erlang
- Stars
- 166
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
I am not an expert in Erlang (do know nothing). Have been trying to assemble it it it failed.
What might be wrong??
Erlang v28, rebar 3.27.0 on Erlang/OTP 28 Erts 16.3
rebar config content:
```
{deps, [
{hornbeam, {git, "https://github.com/benoitc/hornbeam.git", {branch, "main"}}}
]}.
```
```
(test-try) hardcase@hardcase-home:~/PycharmProjects/test_try$ rebar3 compile
===> Verifying dependencies...
===> Fetching hornbeam (from {git,"https://github.com/benoitc/hornbeam.git",
{ref,"cb4928ef6c6b82b3a70b2248187f02215537e43b"}})
===> Fetching cowboy v2.12.0
===> Fetching erlang_python v2.3.0
===> Fetching cowlib v2.13.0
===> Fetching ranch v1.8.0
+ mkdir -p _build/cmake
+ cd _build/cmake
+ type cmake3
+ CMAKE=cmake
+ cmake ../../c_src
-- The C compiler identification is GNU 13.3.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
-- Using OTP lib: /usr/local/lib/erlang/lib
-- Using erl_interface version: erl_interface-5.6.4
-- Using erts version: erts-16.3
-- Found Python3: /home/hardcase/PycharmProjects/test_try/.venv/bin/python3 (found version "3.14.2") found components: Interpreter Development Development.Module Development.Embed
-- Python3 executable: /home/hardcase/PycharmProjects/test_try/.venv/bin/python3
-- Python3 version: 3.14.2
-- Python3 include dirs: /home/hardcase/.local/share/uv/python/cpython-3.14.2-linux-x86_64-gnu/include/python3.14
-- Python3 libraries: /home/hardcase/.local/share/uv/python/cpython-3.14.2-linux-x86_64-gnu/lib/libpython3.14.so
-- Python3 library:
-- Python 3.14.2 >= 3.12, checking subinterpreter API...
-- Performing Test HAVE_SUBINTERPRETERS
-- Performing Test HAVE_SUBINTERPRETERS - Success
-- Subinterpreter API detected (PyInterpreterConfig_OWN_GIL available)
-- Python 3.14.2 >= 3.14, OWN_GIL mode enabled
-- Using Python library path for dlopen: /home/hardcase/.local/share/uv/python/cpython-3.14.2-linux-x86_64-gnu/lib/libpython3.14.so
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Build type: Release
-- Output directory: /home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/../priv
-- Configuring done (0.8s)
-- Generating done (0.0s)
-- Build files have been written to: /home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/_build/cmake
+ echo done.
done.
===> Analyzing applications...
===> Compiling ranch
===> Compiling cowlib
===> Compiling erlang_python
===> Compiling cowboy
===> Compiling hornbeam
┌─ _build/default/lib/hornbeam/src/hornbeam_handler.erl:
│
29 │ -behaviour(cowboy_loop).
│ ╰── Warning: conflicting behaviours -- callback init/2 required by both 'cowboy_loop' and 'cowboy_websocket' (line 28, column 2)
┌─ _build/default/lib/hornbeam/src/hornbeam_handler.erl:
│
29 │ -behaviour(cowboy_loop).
│ ╰── Warning: conflicting behaviours -- callback terminate/3 required by both 'cowboy_loop' and 'cowboy_websocket' (line 28, column 2)
+ cd _build/cmake
+ type cmake3
+ CMAKE=cmake
+ getconf _NPROCESSORS_ONLN
+ CORES=12
+ [ x12 = x ]
+ PAR=-- -j 12
+ cmake --build . -- -j 12
[ 50%] Building C object CMakeFiles/py_nif.dir/py_nif.c.o
In file included from /home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_nif.c:300:
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_subinterp_thread.c: In function ‘subinterp_thread_pool_init’:
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_subinterp_thread.c:158:13: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
158 | write(w->cmd_pipe[1], &shutdown, sizeof(shutdown));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_subinterp_thread.c:190:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
190 | write(w->cmd_pipe[1], &shutdown, sizeof(shutdown));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_nif.c: In function ‘nif_owngil_apply_paths’:
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_nif.c:6845:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6845 | write(w->cmd_pipe[1], payload_bin.data, payload_bin.size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_nif.c:6848:9: warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6848 | read(w->result_pipe[0], &resp, sizeof(resp));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_nif.c: In function ‘nif_owngil_apply_imports’:
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_nif.c:6782:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6782 | write(w->cmd_pipe[1], payload_bin.data, payload_bin.size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_nif.c:6785:9: warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6785 | read(w->result_pipe[0], &resp, sizeof(resp));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_nif.c: In function ‘nif_owngil_destroy_session’:
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_nif.c:6723:9: warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6723 | read(w->result_pipe[0], &resp, sizeof(resp));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_nif.c:301:
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_reactor_buffer.c: At top level:
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_reactor_buffer.c:271:26: warning: ‘ReactorBuffer_as_sequence’ defined but not used [-Wunused-variable]
271 | static PySequenceMethods ReactorBuffer_as_sequence = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_nif.c:296:
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_event_loop.c:98:20: warning: ‘EVENT_LOOP_ATTR_NAME’ defined but not used [-Wunused-variable]
98 | static const char *EVENT_LOOP_ATTR_NAME = "_loop";
| ^~~~~~~~~~~~~~~~~~~~
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_event_loop.c:95:20: warning: ‘EVENT_LOOP_CAPSULE_NAME’ defined but not used [-Wunused-variable]
95 | static const char *EVENT_LOOP_CAPSULE_NAME = "erlang_python.event_loop";
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_nif.c:293:
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_shared_dict.c:39:13: warning: ‘shared_dict_down’ defined but not used [-Wunused-function]
39 | static void shared_dict_down(ErlNifEnv *env, void *obj,
| ^~~~~~~~~~~~~~~~
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_event_loop.c: In function ‘nif_process_ready_tasks’:
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_event_loop.c:2417:13: warning: ‘__builtin_strncpy’ output may be truncated copying 127 bytes from a string of length 127 [-Wstringop-truncation]
2417 | strncpy(entry->module_name, module, CALLABLE_NAME_MAX - 1);
| ^
/home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/c_src/py_event_loop.c:2419:13: warning: ‘__builtin_strncpy’ output may be truncated copying 127 bytes from a string of length 127 [-Wstringop-truncation]
2419 | strncpy(entry->func_name, func, CALLABLE_NAME_MAX - 1);
| ^
[100%] Linking C shared module /home/hardcase/PycharmProjects/test_try/_build/default/lib/erlang_python/priv/py_nif.so
[100%] Built target py_nif
+ echo done.
done.
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the rebar.config dependency declaration and reproduce `rebar3 compile` using Erlang/OTP 28, rebar3 3.27.0, and Python 3.14.2. Inspect the complete command output, including `erlang_python/c_src` and `hornbeam_handler.erl`; the build shown reaches 100%, so done should identify a reproducible failure or confirm that only warnings remain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, erlang, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100