implicit declaration of function ‘mrb_load_fail’
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 42
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
using standard build_config.rb of master head (commit c3188cac431225fda48718f309ad3d9318a6e44f) I add conf.gem :github => 'mattn/mruby-require' and get the following error:
make
```
...
CC build/host/mrbgems/gem_init.c -> build/host/mrbgems/gem_init.o
CC build/mrbgems/mruby-require/src/mrb_require.c -> build/host/mrbgems/mruby-require/src/mrb_require.o
/opt/mruby/build/mrbgems/mruby-require/src/mrb_require.c: In function ‘find_file’:
/opt/mruby/build/mrbgems/mruby-require/src/mrb_require.c:234:3: error: implicit declaration of function ‘mrb_load_fail’; did you mean ‘mrb_load_file’? [-Werror=implicit-function-declaration]
mrb_load_fail(mrb, filename, "cannot load such file");
^~~~~~~~~~~~~
mrb_load_file
/opt/mruby/build/mrbgems/mruby-require/src/mrb_require.c: In function ‘mrb_load_irep_data’:
/opt/mruby/build/mrbgems/mruby-require/src/mrb_require.c:318:5: error: implicit declaration of function ‘replace_stop_with_return’ [-Werror=implicit-function-declaration]
replace_stop_with_return(mrb, irep);
^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
/opt/mruby/build/mrbgems/mruby-require/src/mrb_require.c: In function ‘find_file’:
/opt/mruby/build/mrbgems/mruby-require/src/mrb_require.c:234:3: error: implicit declaration of function ‘mrb_load_fail’; did you mean ‘mrb_load_file’? [-Werror=implicit-function-declaration]
mrb_load_fail(mrb, filename, "cannot load such file");
^~~~~~~~~~~~~
mrb_load_file
/opt/mruby/build/mrbgems/mruby-require/src/mrb_require.c: In function ‘mrb_load_irep_data’:
/opt/mruby/build/mrbgems/mruby-require/src/mrb_require.c:318:5: error: implicit declaration of function ‘replace_stop_with_return’ [-Werror=implicit-function-declaration]
replace_stop_with_return(mrb, irep);
^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
rake aborted!
Command Failed: [gcc -g -std=gnu99 -O3 -Wall -Werror-implicit-function-declaration -Wdeclaration-after-statement -Wwrite-strings -DMRBGEMS_ROOT=\"/opt/mruby/build/test/lib\" -DMRBGEM_MRUBY_REQUIRE_VERSION=0.0.0 -I"/opt/mruby/include" -I"/opt/mruby/src" -MMD -o "/opt/mruby/build/host/mrbgems/mruby-require/src/mrb_require.o" -c "/opt/mruby/build/mrbgems/mruby-require/src/mrb_require.c"]
Makefile:8: recipe for target 'all' failed
make: *** [all] Error 1
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in build/mrbgems/mruby-require/src/mrb_require.c, focusing on find_file and mrb_load_irep_data where mrb_load_fail and replace_stop_with_return are called. Reproduce the reported build with the standard build_config.rb, then inspect the corresponding headers or APIs. Done means the mruby-require gem builds without implicit-declaration errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100