PlatformIO Community

PlatformIO unter Alpine Linux: setup/issues with cmake?

Hi all,
I tried to compile the ESP32 example code without luck. Seems that the tools setup does not work as expected unter alpine linux. Here are the steps to reproduce the issue (with the help of a Docker container):

#start a alpine linux in a container
docker run -it --name myalpine alpine:3.14
#inside the container
apk add python3 curl
#install PIO
python3 -c “$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/master/scripts/get-platformio.py)”

PlatformIO Core has been successfully installed into an isolated environment /root/.platformio/penv!

#activate venv env
. /root/.platformio/penv/bin/activate
#get examples
wget https://github.com/platformio/platform-espressif32/archive/develop.zip
unzip develop.zip
cd platform-espressif32-develop/examples/espidf-blink/
#build the blink example
pio run

Installing collected packages: pyparsing, pycparser, kconfiglib, future, cffi, cryptography
Attempting uninstall: pyparsing
Found existing installation: pyparsing 3.0.9
Uninstalling pyparsing-3.0.9:
Successfully uninstalled pyparsing-3.0.9
Successfully installed cffi-1.15.1 cryptography-3.4.8 future-0.18.2 kconfiglib-13.7.1 pycparser-2.21 pyparsing-2.3.1
Reading CMake configuration…
FileNotFoundError: [Errno 2] No such file or directory: ‘/root/.platformio/packages/tool-cmake/bin/cmake’:
File “/root/.platformio/penv/lib/python3.9/site-packages/platformio/builder/main.py”, line 188:
env.SConscript("$BUILD_SCRIPT")
File “/root/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Script/SConscript.py”, line 597:
return _SConscript(self.fs, *files, **subst_kw)
File “/root/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Script/SConscript.py”, line 285:
exec(compile(scriptdata, scriptname, ‘exec’), call_stack[-1].globals)
File “/root/.platformio/platforms/espressif32/builder/main.py”, line 286:
target_elf = env.BuildProgram()
File “/root/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Util.py”, line 737:
return self.method(*nargs, **kwargs)
File “/root/.platformio/penv/lib/python3.9/site-packages/platformio/builder/tools/piobuild.py”, line 60:
env.ProcessProgramDeps()
File “/root/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Util.py”, line 737:
return self.method(*nargs, **kwargs)
File “/root/.platformio/penv/lib/python3.9/site-packages/platformio/builder/tools/piobuild.py”, line 120:
env.BuildFrameworks(env.get(“PIOFRAMEWORK”))
File “/root/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Util.py”, line 737:
return self.method(*nargs, **kwargs)
File “/root/.platformio/penv/lib/python3.9/site-packages/platformio/builder/tools/piobuild.py”, line 331:
SConscript(env.GetFrameworkScript(name), exports=“env”)
File “/root/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Script/SConscript.py”, line 660:
return method(*args, **kw)
File “/root/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Script/SConscript.py”, line 597:
return _SConscript(self.fs, *files, **subst_kw)
File “/root/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Script/SConscript.py”, line 285:
exec(compile(scriptdata, scriptname, ‘exec’), call_stack[-1].globals)
File “/root/.platformio/platforms/espressif32/builder/frameworks/espidf.py”, line 1180:
project_codemodel = get_cmake_code_model(
File “/root/.platformio/platforms/espressif32/builder/frameworks/espidf.py”, line 201:
run_cmake(src_dir, build_dir, extra_args)
File “/root/.platformio/platforms/espressif32/builder/frameworks/espidf.py”, line 701:
run_tool(cmd)
File “/root/.platformio/platforms/espressif32/builder/frameworks/espidf.py”, line 656:
result = exec_command(cmd, env=idf_env)
File “/root/.platformio/penv/lib/python3.9/site-packages/platformio/proc.py”, line 114:
with subprocess.Popen(*args, **kwargs) as p:
File “/usr/lib/python3.9/subprocess.py”, line 951:
self._execute_child(args, executable, preexec_fn, close_fds,
File “/usr/lib/python3.9/subprocess.py”, line 1821:
raise child_exception_type(errno_num, err_msg, err_filename)

Interesting, I’ll try to reproduce this and take a look.

1 Like