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

build task breaks if particular directory name is in path #36

Open
ziopio opened this issue Feb 24, 2025 · 2 comments
Open

build task breaks if particular directory name is in path #36

ziopio opened this issue Feb 24, 2025 · 2 comments

Comments

@ziopio
Copy link
Member

ziopio commented Feb 24, 2025

rebar3 grisp build fails during compilation.

This has been observed during build using the docker image of the toolchain.

Paths like /Users/me/Desktop/grisp/LINFO2992/2myapp-2 can crash the build with the following error

LINFO2992 is the trigger in this case

===> Compiling
* Configuring
* Compiling (this may take a while)
===> sh(docker run --rm  -e GRISP=yes -e GRISP_PLATFORM=grisp2 --volume /home/daube/Documents/LINFO2992/balancing_robot:/home/daube/Documents/LINFO2992/balancing_robot grisp/grisp2-rtems-toolchain sh -c "cd /home/daube/Documents/LINFO2992/balancing_robot/_grisp/grisp2/otp/27.2.3/build && ./otp_build boot -a")
failed with return code 1 and the following output:
 MAKE	depend
gmake[1]: Entering directory '/home/daube/Documents/LINFO2992/balancing_robot/_grisp/grisp2/otp/27.2.3/build/erts/emulator'
 MAKE	generate
gmake[2]: Entering directory '/home/daube/Documents/LINFO2992/balancing_robot/_grisp/grisp2/otp/27.2.3/build/erts/emulator'
fatal: detected dubious ownership in repository at '/home/daube/Documents/LINFO2992/balancing_robot/_grisp/grisp2/otp/27.2.3/build'
To add an exception for this directory, call:

	git config --global --add safe.directory /home/daube/Documents/LINFO2992/balancing_robot/_grisp/grisp2/otp/27.2.3/build
 GEN	x86_64-pc-linux-gnu/opt/emu/OPCODES-GENERATED
 GEN	x86_64-pc-linux-gnu/opt/emu/TABLES-GENERATED
 GEN	x86_64-pc-linux-gnu/opt/emu/erl_alloc_types.h
 GEN	x86_64-pc-linux-gnu/erl_version.h
 GEN	x86_64-pc-linux-gnu/opt/emu/driver_tab.c
gmake[3]: Entering directory '/home/daube/Documents/LINFO2992/balancing_robot/_grisp/grisp2/otp/27.2.3/build/erts/lib_src'
 MAKE	opt
gmake[4]: Entering directory '/home/daube/Documents/LINFO2992/balancing_robot/_grisp/grisp2/otp/27.2.3/build/erts/lib_src'
 CC	obj/x86_64-pc-linux-gnu/opt/r/ethr_aux.o
common/ethr_aux.c:28:10: fatal error: config.h: No such file or directory
   28 | #include "config.h"
      |          ^~~~~~~~~~
compilation terminated.
gmake[4]: *** [x86_64-pc-linux-gnu/Makefile:390: obj/x86_64-pc-linux-gnu/opt/r/ethr_aux.o] Error 1
gmake[4]: Leaving directory '/home/daube/Documents/LINFO2992/balancing_robot/_grisp/grisp2/otp/27.2.3/build/erts/lib_src'
gmake[3]: Leaving directory '/home/daube/Documents/LINFO2992/balancing_robot/_grisp/grisp2/otp/27.2.3/build/erts/lib_src'
gmake[3]: *** [/home/daube/Documents/LINFO2992/balancing_robot/_grisp/grisp2/otp/27.2.3/build/make/run_make.mk:35: opt] Error 2
gmake[2]: Leaving directory '/home/daube/Documents/LINFO2992/balancing_robot/_grisp/grisp2/otp/27.2.3/build/erts/emulator'
gmake[2]: *** [x86_64-pc-linux-gnu/Makefile:520: /home/daube/Documents/LINFO2992/balancing_robot/_grisp/grisp2/otp/27.2.3/build/erts/lib_src/obj/x86_64-pc-linux-gnu/opt/MADE] Error 2
gmake[1]: Leaving directory '/home/daube/Documents/LINFO2992/balancing_robot/_grisp/grisp2/otp/27.2.3/build/erts/emulator'
gmake[1]: *** [/home/daube/Documents/LINFO2992/balancing_robot/_grisp/grisp2/otp/27.2.3/build/make/run_make.mk:42: generate] Error 2
gmake: *** [Makefile:548: depend] Error 2
@ziopio
Copy link
Member Author

ziopio commented Feb 24, 2025

The problem disappears removing the numeric part of the Folder name and using just LINFO so numbers are the trigger.

@ziopio
Copy link
Member Author

ziopio commented Feb 24, 2025

This looks like a problem with the toolchain itself or the OTP build scripts, I got this crash using a locally installed toolchain without docker involved.

===> Compiling
* Configuring
* Compiling (this may take a while)
===> sh(./otp_build boot -a)
failed with return code 1 and the following output:
 MAKE   depend
 MAKE   generate
 GEN    aarch64-apple-darwin23.6.0/opt/emu/OPCODES-GENERATED
 GEN    aarch64-apple-darwin23.6.0/opt/emu/TABLES-GENERATED
 GEN    aarch64-apple-darwin23.6.0/opt/emu/erl_alloc_types.h
 GEN    aarch64-apple-darwin23.6.0/erl_version.h
 GEN    aarch64-apple-darwin23.6.0/opt/emu/driver_tab.c
 MAKE   opt
 CC     obj/aarch64-apple-darwin23.6.0/opt/r/ethr_aux.o
common/ethr_aux.c:28:10: fatal error: 'config.h' file not found
#include "config.h"
         ^~~~~~~~~~
1 error generated.
make[4]: *** [obj/aarch64-apple-darwin23.6.0/opt/r/ethr_aux.o] Error 1
make[3]: *** [opt] Error 2
make[2]: *** [/Users/lucasucci/Desktop/grisp/LINFO2992/myapp-2/_grisp/grisp2/otp/27.2.2/build/erts/lib_src/obj/aarch64-apple-darwin23.6.0/opt/MADE] Error 2
make[1]: *** [generate] Error 2
make: *** [depend] Error 2

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

1 participant