Page 1 of 1

Building plugin fails in rev 4

Posted: 11 Feb 2020, 14:28
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.

Re: Building plugin fails in rev 4

Posted: 11 Feb 2020, 15:04
by coppelia
Hello,

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

Cheers

Re: Building plugin fails in rev 4

Posted: 11 Feb 2020, 18:28
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

Re: Building plugin fails in rev 4

Posted: 12 Feb 2020, 07:58
by napoleon
Thanks for your quick responses! I'll upgrade to Python 3 then :)