Building plugin fails in rev 4

Report crashes, strange behaviour, or apparent bugs
Post Reply
napoleon
Posts: 19
Joined: 12 Dec 2019, 11:03

Building plugin fails in rev 4

Post by napoleon »

Hi!

I just updated to revision 4 of CoppeliaSim and now when I try to compile a plugin I get the following

Code: Select all

>------ Build All started: Project: <projectname>, Configuration: x64-Release ------
  [1/8] cmd.exe /C "cd /D C:\<projectdir>\out\build\x64-Release && python "C:/Program Files/CoppeliaRobotics/CoppeliaSimEdu/programming/libPlugin/simStubsGen/generate.py" --xml-file C:/<projectdir>/callbacks.xml --lua-file C:/<projectdir>/<projectname>.lua --gen-all C:/<projectdir>/out/build/x64-Release/generated"
  FAILED: generated/stubs.cpp generated/stubs.h generated/lua_calltips.cpp 
  cmd.exe /C "cd /D C:\<projectdir>\out\build\x64-Release && python "C:/Program Files/CoppeliaRobotics/CoppeliaSimEdu/programming/libPlugin/simStubsGen/generate.py" --xml-file C:/<projectdir>/callbacks.xml --lua-file C:/<projectdir>/<projectname>.lua --gen-all C:/<projectdir>/out/build/x64-Release/generated"
    File "C:/Program Files/CoppeliaRobotics/CoppeliaSimEdu/programming/libPlugin/simStubsGen/generate.py", line 50
      print('error: program "{0}" is missing (hint: try "sudo apt install {0}")'.format(what), file=sys.stderr)
                                                                                                   ^
  SyntaxError: invalid syntax
  ninja: build stopped: subcommand failed.

Build All failed.
where I've replaced the project dir with <projectdir> and the project name with <projectname>.

It seems to me like the error is in generate.py but I don't know python well. Commenting that row my plugin compiles fine.

I am on windows 10 using VS community 2019.

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Building plugin fails in rev 4

Post by coppelia »

Hello,

did you try to pull also libplugin? What plugin are you trying to compile?

Cheers

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Building plugin fails in rev 4

Post by fferri »

This error is caused by using an obsolete version of Python.

A fix for Python 2 has been pushed recently to libPlugin, however since Python 2.x has already reached end of life as beginning of year 2020, other packages will also stop supporting this obsolete version of Python, and you are likely to see more failures not directly related to the package.

Upgrading to Python 3 will be your best bet.

Cheers

napoleon
Posts: 19
Joined: 12 Dec 2019, 11:03

Re: Building plugin fails in rev 4

Post by napoleon »

Thanks for your quick responses! I'll upgrade to Python 3 then :)

Post Reply