gavanderhoorn / ktransw_py

A wrapper around Fanuc Robotics' ktrans that makes it work a little more like a modern compiler
Apache License 2.0
18 stars 8 forks source link

error compiling fanuc_driver_exp from source #15

Closed ReedAJacobsen closed 5 years ago

ReedAJacobsen commented 5 years ago

I have attempted to compile the driver fanuc_driver_exp from source (following the instructions in the readme), however the ninja build fails (All other commands before this appear to work correctly). Zipped version of Rossum work-space after all commands run is also attached. Any hints?

C:\Users\Controls\Rossum_ws\build>ninja -v
[1/22] ktransw.cmd -q -MM -MP -MT C:\Users\Controls\Rossum_ws\build\ros_state.pc -MF C:\Users\Controls\Rossum_ws\build\ros_state.pc.d --ktrans="C:\Program Files (x86)\Fanuc\WinOLPC\bin\ktrans.exe" /I"C:\Users\Controls\Rossum_ws\fanuc_driver_exp\include" /I"C:\Users\Controls\Rossum_ws\libindlog\include" /I"C:\Users\Controls\Rossum_ws\libsimplemsg\include" /I"C:\Users\Controls\Rossum_ws\KUnit\include" /I"C:\Users\Controls\Rossum_ws\libmathex\include" /I"C:\Users\Controls\Rossum_ws\libstdex\include" /I"C:\Program Files (x86)\Fanuc\WinOLPC\Versions\V830-1\support" C:\Users\Controls\Rossum_ws\fanuc_driver_exp\src\ros_state.kl /ver V8.30-1 /config "C:\Users\Controls\Rossum_ws\fanuc_driver_exp"
FAILED: C:/Users/Controls/Rossum_ws/build/ros_state.pc
ktransw.cmd -q -MM -MP -MT C:\Users\Controls\Rossum_ws\build\ros_state.pc -MF C:\Users\Controls\Rossum_ws\build\ros_state.pc.d --ktrans="C:\Program Files (x86)\Fanuc\WinOLPC\bin\ktrans.exe" /I"C:\Users\Controls\Rossum_ws\fanuc_driver_exp\include" /I"C:\Users\Controls\Rossum_ws\libindlog\include" /I"C:\Users\Controls\Rossum_ws\libsimplemsg\include" /I"C:\Users\Controls\Rossum_ws\KUnit\include" /I"C:\Users\Controls\Rossum_ws\libmathex\include" /I"C:\Users\Controls\Rossum_ws\libstdex\include" /I"C:\Program Files (x86)\Fanuc\WinOLPC\Versions\V830-1\support" C:\Users\Controls\Rossum_ws\fanuc_driver_exp\src\ros_state.kl /ver V8.30-1 /config "C:\Users\Controls\Rossum_ws\fanuc_driver_exp"
  File "C:\ktransw_py-0.2.2\\ktransw.py", line 246
    except ValueError, e:
                     ^
SyntaxError: invalid syntax
[2/22] ktransw.cmd -q -MM -MP -MT C:\Users\Controls\Rossum_ws\build\libssock.pc -MF C:\Users\Controls\Rossum_ws\build\libssock.pc.d --ktrans="C:\Program Files (x86)\Fanuc\WinOLPC\bin\ktrans.exe" /I"C:\Users\Controls\Rossum_ws\fanuc_driver_exp\include" /I"C:\Users\Controls\Rossum_ws\libindlog\include" /I"C:\Users\Controls\Rossum_ws\libsimplemsg\include" /I"C:\Users\Controls\Rossum_ws\KUnit\include" /I"C:\Users\Controls\Rossum_ws\libmathex\include" /I"C:\Users\Controls\Rossum_ws\libstdex\include" /I"C:\Program Files (x86)\Fanuc\WinOLPC\Versions\V830-1\support" C:\Users\Controls\Rossum_ws\fanuc_driver_exp\src\libssock.kl /ver V8.30-1 /config "C:\Users\Controls\Rossum_ws\fanuc_driver_exp"
FAILED: C:/Users/Controls/Rossum_ws/build/libssock.pc
ktransw.cmd -q -MM -MP -MT C:\Users\Controls\Rossum_ws\build\libssock.pc -MF C:\Users\Controls\Rossum_ws\build\libssock.pc.d --ktrans="C:\Program Files (x86)\Fanuc\WinOLPC\bin\ktrans.exe" /I"C:\Users\Controls\Rossum_ws\fanuc_driver_exp\include" /I"C:\Users\Controls\Rossum_ws\libindlog\include" /I"C:\Users\Controls\Rossum_ws\libsimplemsg\include" /I"C:\Users\Controls\Rossum_ws\KUnit\include" /I"C:\Users\Controls\Rossum_ws\libmathex\include" /I"C:\Users\Controls\Rossum_ws\libstdex\include" /I"C:\Program Files (x86)\Fanuc\WinOLPC\Versions\V830-1\support" C:\Users\Controls\Rossum_ws\fanuc_driver_exp\src\libssock.kl /ver V8.30-1 /config "C:\Users\Controls\Rossum_ws\fanuc_driver_exp"
  File "C:\ktransw_py-0.2.2\\ktransw.py", line 246
    except ValueError, e:
                     ^
SyntaxError: invalid syntax
ninja: build stopped: subcommand failed.

Rossum_ws.zip

gavanderhoorn commented 5 years ago

Not sure what happened, but this would seem to be an issue with ktransw_py. I've just pushed gavanderhoorn/ktransw_py@5b7761c7 which should fix this.

Note: I haven't yet bumped the version nr, nor made a new release. Just downloading ktransw.py and replacing the file in C:\ktransw_py-0.2.2 should however work for you.

Let me know if that fixes it.

gavanderhoorn commented 5 years ago

Btw: did you not use the 0.1.4 convenience release of rossum to set things up (seeing as you have a separate C:\ktransw_py-0.2.2)?

gavanderhoorn commented 5 years ago

@ReedAJacobsen: I've transferred your issue to ktransw_py as it's an issue here, not with fanuc_driver_exp.

gavanderhoorn commented 5 years ago

@ReedAJacobsen: I'm slightly puzzled by this part of the error message:

/config "C:\Users\Controls\Rossum_ws\fanuc_driver_exp"

the /config argument expects a path to a robot.ini, not a directory. Could you re-run rossum with the -v switch and post the output here?

ReedAJacobsen commented 5 years ago

That was my bad, before contacting you i was playing around with different arguments to rossum incase this was the issue. I have now run it with the rossum command from the readme (with -w to overwrite the build file), with similar results.

C:\Users\Controls\Rossum_ws\build>ninja
[1/22] fanuc_driver_exp :: src\rstate_cfg.kl
FAILED: C:/Users/Controls/Rossum_ws/build/rstate_cfg.pc
ktransw.cmd -q -MM -MP -MT C:\Users\Controls\Rossum_ws\build\rstate_cfg.pc -MF C:\Users\Controls\Rossum_ws\build\rstate_cfg.pc.d --ktrans="C:\Program Files (x86)\Fanuc\WinOLPC\bin\ktrans.exe" /I"C:\Users\Controls\Rossum_ws\fanuc_driver_exp\include" /I"C:\Users\Controls\Rossum_ws\libindlog\include" /I"C:\Users\Controls\Rossum_ws\libsimplemsg\include" /I"C:\Users\Controls\Rossum_ws\KUnit\include" /I"C:\Users\Controls\Rossum_ws\libmathex\include" /I"C:\Users\Controls\Rossum_ws\libstdex\include" /I"C:\Program Files (x86)\Fanuc\WinOLPC\Versions\V770-1\support" C:\Users\Controls\Rossum_ws\fanuc_driver_exp\src\rstate_cfg.kl /ver V7.70-1 /config "C:\Users\Controls\Rossum_ws\fanuc_driver_exp\robot.ini"
Traceback (most recent call last):
  File "C:\ktransw_py-0.2.2\\ktransw.py", line 505, in <module>
    main()
  File "C:\ktransw_py-0.2.2\\ktransw.py", line 129, in main
    for key, val in vars(args).iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
[2/22] fanuc_driver_exp :: src\librosfanuc.kl
FAILED: C:/Users/Controls/Rossum_ws/build/librosfanuc.pc
ktransw.cmd -q -MM -MP -MT C:\Users\Controls\Rossum_ws\build\librosfanuc.pc -MF C:\Users\Controls\Rossum_ws\build\librosfanuc.pc.d --ktrans="C:\Program Files (x86)\Fanuc\WinOLPC\bin\ktrans.exe" /I"C:\Users\Controls\Rossum_ws\fanuc_driver_exp\include" /I"C:\Users\Controls\Rossum_ws\libindlog\include" /I"C:\Users\Controls\Rossum_ws\libsimplemsg\include" /I"C:\Users\Controls\Rossum_ws\KUnit\include" /I"C:\Users\Controls\Rossum_ws\libmathex\include" /I"C:\Users\Controls\Rossum_ws\libstdex\include" /I"C:\Program Files (x86)\Fanuc\WinOLPC\Versions\V770-1\support" C:\Users\Controls\Rossum_ws\fanuc_driver_exp\src\librosfanuc.kl /ver V7.70-1 /config "C:\Users\Controls\Rossum_ws\fanuc_driver_exp\robot.ini"
Traceback (most recent call last):
  File "C:\ktransw_py-0.2.2\\ktransw.py", line 505, in <module>
    main()
  File "C:\ktransw_py-0.2.2\\ktransw.py", line 129, in main
    for key, val in vars(args).iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
ninja: build stopped: subcommand failed.
gavanderhoorn commented 5 years ago

What is the output of python --version on your machine?

As noted in the readme, ktransw was written for and tested with Python 2.

This:

AttributeError: 'dict' object has no attribute 'iteritems'

seems to suggest you are trying to run it with Python 3.

If you need Python 3 to be the default on your machine, but do have a Python 2 install available, then you could update this line with the absolute path to python.exe in your Python 2 installation (don't forget to use " around the path if necessary (ie: if it contains spaces)).

ReedAJacobsen commented 5 years ago

Nailed it, thanks for the help.

gavanderhoorn commented 5 years ago

Np. Glad we solved this.

I've logged #16 to migrate ktransw (and rossum) to Python 3 at some point in the future (seeing as Python 2 is almost EOL).