Open Darkextratoasty opened 11 months ago
Hi, I get the same issue on Windows 10.
The . comes from https://github.com/micro-ROS/micro_ros_platformio/blob/e87705fab34ff23f2d117d0185f19fc8698ff081/microros_utils/library_builder.py#L103C29-L103C31 where it appears that it's being used as a synonym for the source command: https://ss64.com/bash/source.html
I don't know why neither "source" nor "." are recognized in the environment that the commands run in.
Hopefully we can keep each other updated as we troubleshoot this and maybe we'll find a solution.
I just found another potential issue: In my .platformio folder (in my windows user folder), there's a folder named penv, but within that there is no /bin folder, only a Scripts folder, though interestingly there is a file called activate, activate.bat, and Activate.ps1 among other files. That might be relevant to this line: https://github.com/micro-ROS/micro_ros_platformio/blob/e87705fab34ff23f2d117d0185f19fc8698ff081/extra_script.py#L97
After editing the library_builder.py and extra_script.py files to use the activate file within the Scripts directory I get a new error:
cd C:\Users\Joshua\Desktop\micro_ros_platformio\examples\micro-ros_publisher\.pio\libdeps\teensy\micro_ros_platformio/build/dev && C:\Users\Joshua\.platformio/penv/Scripts/activate && colcon build --cmake-args -DBUILD_TESTING=OFF -DPython3_EXECUTABLE=`which python`
[note above that I removed the . and the path to activate is different because of my changes]
[the command above was printed by adding print(command) after this line https://github.com/micro-ROS/micro_ros_platformio/blob/e87705fab34ff23f2d117d0185f19fc8698ff081/microros_utils/library_builder.py#L103 for debugging purposes]
----------------------------------------
[I edited utils.py's run_cmd to print sys.version here]
3.11.7 (tags/v3.11.7:fa7a6f2, Dec 4 2023, 19:24:49) [MSC v.1937 64 bit (AMD64)]
Build dev micro-ROS environment failed:
--- stderr: gtest_vendor
Traceback (most recent call last):
File "C:\Users\Joshua\.platformio\penv\Lib\site-packages\colcon_core\executor\__init__.py", line 91, in __call__
rc = await self.task(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Joshua\.platformio\penv\Lib\site-packages\colcon_core\task\__init__.py", line 93, in __call__
return await task_method(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Joshua\.platformio\penv\Lib\site-packages\colcon_ros\task\cmake\build.py", line 34, in build
rc = await extension.build(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Joshua\.platformio\penv\Lib\site-packages\colcon_cmake\task\cmake\build.py", line 87, in build
rc = await self._reconfigure(args, env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Joshua\.platformio\penv\Lib\site-packages\colcon_cmake\task\cmake\build.py", line 153, in _reconfigure
raise RuntimeError(
RuntimeError: VisualStudioVersion is not set, please run within a Visual Studio Command Prompt.
---
Failed <<< gtest_vendor [3.19s, exited with code 1]
WNDPROC return value cannot be converted to LRESULT
TypeError: WPARAM is simple, so must be an int object (got NoneType)
VisualStudioVersion is not set, please run within a Visual Studio Command Prompt.
========================= [FAILED] Took 96.60 seconds =========================
If anyone is looking at this, please let me know if I can provide more information. I'm just trying to get any micro ros example to compile in PlatformIO in windows
It could be that Micro-ROS is not intended to be compiled on Windows?
For your application, is there a specific need to use VSCode on Windows or would WSL2 Ubuntu suffice?
Issue template
Hardware description: Windows 11 PC running Visual Studio Code 1.85.1 with PlatformIO 6.1.11 extension.
Installation type: Adding the lines:
to the platformio.ini file.
Version or commit hash: Unsure how to check this, I got the URL from the "https://github.com/micro-ROS/micro_ros_platformio" webpage using the Code > Clone > HTTPS button on 12/19/2027. It appears that the default is iron, but I don't know how to confirm that.
Steps to reproduce the issue
Note: this procedure works fine on Ubuntu 22.04.
Expected behavior
Project should configure properly.
Actual behavior
Get the error:
Additional information
The full output is below: