Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code generation fails if clang-format-6.0 is missing #188

Open
corot opened this issue Nov 21, 2021 · 1 comment
Open

Code generation fails if clang-format-6.0 is missing #188

corot opened this issue Nov 21, 2021 · 1 comment
Assignees

Comments

@corot
Copy link
Contributor

corot commented Nov 21, 2021

Describe the bug

Well, not exactly a bug, but I didn't see in the instructions that I need to install a particular clang version. Would be much better to either:

  • make clang optional and show a warning
  • request to install clang but use any version >= 6.0 available
$ ./generate.sh ../alica_ros_turtlesim/alica/
/home/jorge/rapyuta_ws/alica_tutorials/src/alica-supplementary/alica_designer_runtime
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'org.apache.logging.log4j.simplelog.StatusLogger.level' to TRACE to show Log4j2 internal initialization logging.
PluginManager: alica-plan-designer-fx-default-plugin-0.1.1-SNAPSHOT.1.jar
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by de.unikassel.vs.alica.generator.plugin.PluginManager (file:/home/jorge/rapyuta_ws/alica_tutorials/src/alica-supplementary/alica_designer_runtime/codegen/PlanDesignerFX-Codegeneration-0.1.1.1328.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of de.unikassel.vs.alica.generator.plugin.PluginManager
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
12:44:26.773 [main] ERROR de.unikassel.vs.alica.generator.cpp.CPPGeneratorImpl - An error occurred while formatting generated sources
java.io.IOException: Cannot run program "/usr/bin/clang-format-6.0": error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1128) ~[?:?]
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1071) ~[?:?]
	at java.lang.Runtime.exec(Runtime.java:592) ~[?:?]
	at java.lang.Runtime.exec(Runtime.java:416) ~[?:?]
	at java.lang.Runtime.exec(Runtime.java:313) ~[?:?]
	at de.unikassel.vs.alica.generator.cpp.CPPGeneratorImpl.formatFile(CPPGeneratorImpl.java:469) [PlanDesignerFX-Codegeneration-0.1.1.1328.jar:?]
	at de.unikassel.vs.alica.generator.cpp.CPPGeneratorImpl.createDomainBehaviour(CPPGeneratorImpl.java:382) [PlanDesignerFX-Codegeneration-0.1.1.1328.jar:?]
	at de.unikassel.vs.alica.generator.Codegenerator.generate(Codegenerator.java:98) [PlanDesignerFX-Codegeneration-0.1.1.1328.jar:?]
	at de.unikassel.vs.alica.generator.StandaloneCodegenerator.main(StandaloneCodegenerator.java:68) [PlanDesignerFX-Codegeneration-0.1.1.1328.jar:?]
Caused by: java.io.IOException: error=2, No such file or directory
	at java.lang.ProcessImpl.forkAndExec(Native Method) ~[?:?]
	at java.lang.ProcessImpl.<init>(ProcessImpl.java:340) ~[?:?]
	at java.lang.ProcessImpl.start(ProcessImpl.java:271) ~[?:?]
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1107) ~[?:?]
	... 8 more
Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Cannot run program "/usr/bin/clang-format-6.0": error=2, No such file or directory
	at de.unikassel.vs.alica.generator.cpp.CPPGeneratorImpl.formatFile(CPPGeneratorImpl.java:472)
	at de.unikassel.vs.alica.generator.cpp.CPPGeneratorImpl.createDomainBehaviour(CPPGeneratorImpl.java:382)
	at de.unikassel.vs.alica.generator.Codegenerator.generate(Codegenerator.java:98)
	at de.unikassel.vs.alica.generator.StandaloneCodegenerator.main(StandaloneCodegenerator.java:68)
Caused by: java.io.IOException: Cannot run program "/usr/bin/clang-format-6.0": error=2, No such file or directory
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
	at java.base/java.lang.Runtime.exec(Runtime.java:592)
	at java.base/java.lang.Runtime.exec(Runtime.java:416)
	at java.base/java.lang.Runtime.exec(Runtime.java:313)
	at de.unikassel.vs.alica.generator.cpp.CPPGeneratorImpl.formatFile(CPPGeneratorImpl.java:469)
	... 3 more
Caused by: java.io.IOException: error=2, No such file or directory
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:340)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
	... 8 more

To Reproduce
Just follow turtlesim tutorial

Expected behaviour
Code generation works with any clang version

@Dale-Koenig
Copy link
Contributor

Switched alica to use clang-format-10, just need to up code generation repo default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants