Coder Social home page Coder Social logo

Windows 11 VSCode "'.' is not recognized as an internal or external command" when adding library to lib_deps in platformio.ini about micro_ros_platformio HOT 3 OPEN

Darkextratoasty avatar Darkextratoasty commented on August 17, 2024
Windows 11 VSCode "'.' is not recognized as an internal or external command" when adding library to lib_deps in platformio.ini

from micro_ros_platformio.

Comments (3)

joshua-8 avatar joshua-8 commented on August 17, 2024

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.

from micro_ros_platformio.

joshua-8 avatar joshua-8 commented on August 17, 2024

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:

python_env_path = env['PROJECT_CORE_DIR'] + "/penv/bin/activate"

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

from micro_ros_platformio.

Legohead259 avatar Legohead259 commented on August 17, 2024

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?

from micro_ros_platformio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.