cyberpython / glossa-interpreter Goto Github PK
View Code? Open in Web Editor NEWA simple interpreter for the ‘ΓΛΩΣΣΑ’ programming language.
A simple interpreter for the ‘ΓΛΩΣΣΑ’ programming language.
When I try to rebuild the package for ubuntu 14.04 and future 14.10 I get this error:
https://launchpadlibrarian.net/181401168/buildlog_ubuntu-trusty-i386.glossa-interpreter_1.0.7%2Bgit141-1~ppa2~ubuntu14.04.1_FAILEDTOBUILD.txt.gz
pre-compile:
compile:
[javac] /build/buildd/glossa-interpreter-1.0.7+git141/build.xml:29: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 81 source files to /build/buildd/glossa-interpreter-1.0.7+git141/build
[javac] /build/buildd/glossa-interpreter-1.0.7+git141/src/glossa/Main.java:76: error: incompatible types
[javac] List remainingArgs = options.nonOptionArguments();
[javac] ^
[javac] required: List
[javac] found: List<CAP#1>
[javac] where CAP#1 is a fresh type-variable:
[javac] CAP#1 extends Object from capture of ?
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 errorBUILD FAILED
/build/buildd/glossa-interpreter-1.0.7+git141/build.xml:29: Compile failed; see the compiler error output for details.
When the interpreter is run with java -jar, it mentions an error:
$ glossa-interpreter /usr/share/doc/glossa-interpreter/samples/PrintTest.gls
Exception in thread "main" java.lang.NoClassDefFoundError: org/antlr/runtime/CharStream
at glossa.ui.cli.CLI.execute(CLI.java:174)
at glossa.ui.cli.CLI.execute(CLI.java:199)
at glossa.Main.main(Main.java:84)
Caused by: java.lang.ClassNotFoundException: org.antlr.runtime.CharStream
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 3 more
If I run it differently, it works. I use this (it was mentioned in the buildlog while I was building the package):
#!/bin/sh
java -cp "/usr/share/java/antlr3-3.2.jar:/usr/share/java/antlr3-runtime-3.2.jar:/usr/share/java/joptsimple.jar:/usr/share/java/glossa-interpreter.jar" glossa.Main "$@"
The patch I use to fix this for the ubuntu packages:
Index: glossa-interpreter-1.0.4/glossa-interpreter
===================================================================
--- glossa-interpreter-1.0.4.orig/glossa-interpreter 2013-03-12 06:59:36.000000000 +0100
+++ glossa-interpreter-1.0.4/glossa-interpreter 2013-03-12 07:05:22.000000000 +0100
@@ -1,2 +1,2 @@
#!/bin/sh
-java -jar "/usr/share/java/glossa-interpreter.jar" "$@"
+java -cp "/usr/share/java/antlr3-3.2.jar:/usr/share/java/antlr3-runtime-3.2.jar:/usr/share/java/joptsimple.jar:/usr/share/java/glossa-interpreter.jar" glossa.Main "$@"
OS: Linux, Ubuntu 12.10 (quantal)
I had some problems to build glossa-interpreter against openjdk 7 on ubuntu 12.10 (quantal). I don't have the exact failed buildlog, but I know I had to add antlr runtime in java classpath.
file.reference.antlr3-runtime.jar=/usr/share/java/antlr3-runtime-3.2.jar
and that file reference in javac classpath:
javac.classpath=\
${file.reference.antlr3.jar}:\
${file.reference.antlr3-runtime.jar}:\
${file.reference.joptsimple.jar}
The patch I use for the ubuntu packages:
Index: glossa-interpreter-1.0.4/nbproject/project.properties
===================================================================
--- glossa-interpreter-1.0.4.orig/nbproject/project.properties 2013-03-12 06:56:32.000000000 +0100
+++ glossa-interpreter-1.0.4/nbproject/project.properties 2013-03-12 07:01:42.000000000 +0100
@@ -22,16 +22,18 @@
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
-file.reference.antlr3.jar=lib/antlr-3.2.jar
+file.reference.antlr3.jar=/usr/share/java/antlr3-3.2.jar
#/usr/share/java/antlr3.jar
file.reference.Glossa-src=src
-file.reference.joptsimple.jar=lib/jopt-simple-3.2.jar
+file.reference.antlr3-runtime.jar=/usr/share/java/antlr3-runtime-3.2.jar
+file.reference.joptsimple.jar=/usr/share/java/joptsimple.jar
#/usr/share/java/joptsimple.jar
#
includes=**
jar.compress=false
javac.classpath=\
${file.reference.antlr3.jar}:\
+ ${file.reference.antlr3-runtime.jar}:\
${file.reference.joptsimple.jar}
# Space-separated list of extra javac options
javac.compilerargs=
P.S. I haven't tested the latest git commits yet. I plan to. :)
Some samples return an error and fail to execute:
ConstantsDeclaration.gls
$ glossa-interpreter /usr/share/doc/glossa-interpreter/samples/ConstantsDeclaration.gls
Σφάλμα (8,20): Ασύμβατοι τύποι δεδομένων για χρήση με τον τελεστή "+": χαρακτήρας στο (8,18) και λογικός στο (8,22).
Quadratic_Equation.gls
$ glossa-interpreter /usr/share/doc/glossa-interpreter/samples/Quadratic_Equation.gls
Σφάλμα (1,2): Άγνωστο σύμβολο: ' '
LoopTest.gls (This one's a warning, I don't know if it's important)
$ glossa-interpreter /usr/share/doc/glossa-interpreter/samples/LoopTest.gls
Προειδοποίηση (30,20): Το αναγνωριστικό "Δοκιμή" είναι διαφορετικό από το όνομα του προγράμματος.
ΌΣΟ..ΕΠΑΝΑΛΑΒΕ:
x: 10
x: 8
x: 6
x: 4
x: 2
ΤΕΛΟΣ ΌΣΟ..ΕΠΑΝΑΛΑΒΕ
ΑΡΧΗ_ΕΠΑΝΑΛΗΨΗΣ..ΜΕΧΡΙΣ_ΟΤΟΥ:
x: 11
x: 13
x: 15
x: 17
x: 19
ΤΕΛΟΣ ΑΡΧΗ_ΕΠΑΝΑΛΗΨΗΣ..ΜΕΧΡΙΣ_ΟΤΟΥ:
- Η εκτέλεση ολοκληρώθηκε. -
Χρειάστηκα 2 patches για να δημιουργηθεί το πακέτο:
Σημείωση για το δεύτερο, υπάρχουν μερικά άλλα variables στο αρχείο nbproject/private/private.properties
που _δεν_ πείραξα:
jaxbwiz.endorsed.dirs=/home/cyberpython/apps/netbeans-6.8/ide12/modules/ext/jaxb/api
user.properties.file=/home/cyberpython/.netbeans/6.8/build.properties
Αυτά υποθέτω δεν χρειάζονται για το πρόγραμμα. :)
I get the following errors in build procedure:
BUILD FAILED
/home/georgegks/glossa-interpreter-1.0.7/build.xml:29: Compile failed; see the compiler error output for details.
Total time: 6 seconds
Makefile:25: recipe for target 'all' failed
make: *** [all] Error 1
I won't post the xml
file yet cause it won't help. What should I do? It would be best if you create a ppa repository
and upload there the jar
file
Here's the buildlog (ubuntu 13.04 ppa package build): https://launchpadlibrarian.net/155713910/buildlog_ubuntu-raring-i386.glossa-interpreter_1.0.4%2Bgit136-1~ppa1~ubuntu13.04.1_FAILEDTOBUILD.txt.gz
Example error line:
[javac] Compiling 81 source files to /build/buildd/glossa-interpreter-1.0.4+git136/build
[javac] /build/buildd/glossa-interpreter-1.0.4+git136/src/com/github/rjeschke/txtmark/Block.java:2: error: unmappable character for encoding ASCII
[javac] * Copyright (C) 2011 Ren?? Jeschke <[email protected]>
[javac] ^
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.