How to use 'make menuconfig' in Docker container?

swelch
Posts: 2
Joined: Mon Sep 11, 2023 7:44 pm

How to use 'make menuconfig' in Docker container?

Postby swelch » Mon Sep 11, 2023 8:26 pm

I'm working with an older project that uses the GNU Make build system. The IDF Docker Image seems to use the CMake system instead. Is there a way to use commands like 'make menuconfig' within the Docker container?

When I try 'make menuconfig' using the 'hello_world' project as an example from v3.3 I get the following output:

Code: Select all

/project$ make menuconfig
make[1]: Entering directory '/opt/esp/idf/tools/kconfig'
cc -c  -DCURSES_LOC="<ncurses.h>" -DLOCALE -MMD -MP  /opt/esp/idf/tools/kconfig/mconf.c -o mconf.o
/opt/esp/idf/tools/kconfig/mconf.c:1053:1: fatal error: opening dependency file mconf.d: Permission denied
 }
 ^
compilation terminated.
Makefile:171: recipe for target 'mconf.o' failed
make[1]: *** [mconf.o] Error 1
make[1]: Leaving directory '/opt/esp/idf/tools/kconfig'
make: *** No rule to make target '/opt/esp/idf/tools/kconfig/conf-idf', needed by '/opt/esp/idf/tools/kconfig/mconf-idf'.  Stop.
To reproduce:
1. Clone the esp-idf
2. Checkout release/v3.3
3. CD to /esp-idf/examples/get-started/hello_world
3. Run this command:

Code: Select all

docker run --rm -v $PWD:/project -w /project -u $UID -e HOME=/tmp -it espressif/idf:release-v3.3

swelch
Posts: 2
Joined: Mon Sep 11, 2023 7:44 pm

Re: How to use 'make menuconfig' in Docker container?

Postby swelch » Thu Sep 14, 2023 3:58 pm

UPDATE: I discovered if I run the docker container as root user this works:

Code: Select all

docker run --rm -v $PWD:/project -w /project -u root -e HOME=/tmp -it espressif/idf:release-v3.3
Is there a way to get this to work without needing root permissions?

Who is online

Users browsing this forum: No registered users and 117 guests