panicz / grasp

The GRAphical Scheme Programming Environment
GNU General Public License v3.0
39 stars 4 forks source link

Could not build desktop client on MacOS #14

Closed crmsnbleyd closed 8 months ago

crmsnbleyd commented 8 months ago

++ java -jar ../libs/kawa.jar --no-warn-unreachable -f analdep.scm -- --list grasp-desktop.scm java.io.FileNotFoundException: /check-comments.scm (No such file or directory)

And later we get the error

Archive: kawa.jar inflating: META-INF/MANIFEST.MF Illegal option: - Usage: jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] files ...

After these errors, the jar cannot be found in the build directory

panicz commented 8 months ago

I don't quite understand what is going on in there, but you could try removing the src/check-comments.scm file (and the whole build directory, if it exists) and re-run the process.

Perhaps you could also try running

java -jar ../libs/kawa.jar -f analdep.scm -- --list grasp-desktop.scm

from the src directory and paste the output here.

Alternatively, I have a (slightly dated) pre-built .jar file over here: https://panicz.github.io/grasp/grasp-desktop.jar

Also, do the remaining scripts (grasp-desktop, build-terminal.sh and grasp-terminal) work OK?

pfusik commented 8 months ago

I reproduce this issue on my Mac, so:

I don't quite understand what is going on in there, but you could try removing the src/check-comments.scm file (and the whole build directory, if it exists) and re-run the process.

It just complains about a different file:

fox@wiesmac grasp % ./build-desktop.sh
+ mkdir -p build/desktop
+ cd src
+ KAWA_JAR=../libs/kawa.jar
+ JSVG=../libs/jsvg-1.0.0.jar
++ java -jar ../libs/kawa.jar --no-warn-unreachable -f analdep.scm -- --list grasp-desktop.scm
java.io.FileNotFoundException: /play-test.scm (No such file or directory)
        at java.base/java.io.FileInputStream.open0(Native Method)
        at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
        at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
        at gnu.kawa.io.FilePath.openInputStream(FilePath.java:254)
        at gnu.kawa.io.InPort.openFile(InPort.java:64)
        at kawa.lib.ports.withInputFromFile(ports.scm:38)
        at atInteractiveLevel$Mn20.dependencyGraph(analdep.scm:64)
        at atInteractiveLevel$Mn20.dependencyGraph$check(analdep.scm:61)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at gnu.mapping.CallContext$ReflectMethodHandle.invokeExact(CallContext.java:726)
        at gnu.mapping.CallContext.runUntilValue(CallContext.java:656)
        at gnu.mapping.Procedure.apply1(Procedure.java:154)
        at atInteractiveLevel$Mn21.run(analdep.scm:85)
        at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:290)
        at kawa.Shell.run(Shell.java:300)
        at kawa.Shell.runFile(Shell.java:562)
        at kawa.Shell.runFileOrClass(Shell.java:485)
        at kawa.repl.processArgs(repl.java:298)
        at kawa.repl.main(repl.java:830)

Perhaps you could also try running java -jar ../libs/kawa.jar -f analdep.scm -- --list grasp-desktop.scm from the src directory and paste the output here.

fox@wiesmac src % java -jar ../libs/kawa.jar -f analdep.scm -- --list grasp-desktop.scm
/Users/fox/grasp/src/utils/functions.scm:131:3: warning - unreachable code
/Users/fox/grasp/src/utils/functions.scm:154:3: warning - unreachable code
/Users/fox/grasp/src/utils/functions.scm:556:3: warning - unreachable code
/Users/fox/grasp/src/utils/functions.scm:727:7: warning - unreachable code
/Users/fox/grasp/src/utils/functions.scm:717:5: warning - unreachable code
analdep.scm:71:6: warning - unreachable code
analdep.scm:68:10: warning - unreachable code
java.io.FileNotFoundException: /check-comments.scm (No such file or directory)
        at java.base/java.io.FileInputStream.open0(Native Method)
        at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
        at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
        at gnu.kawa.io.FilePath.openInputStream(FilePath.java:254)
        at gnu.kawa.io.InPort.openFile(InPort.java:64)
        at kawa.lib.ports.withInputFromFile(ports.scm:38)
        at atInteractiveLevel$Mn20.dependencyGraph(analdep.scm:64)
        at atInteractiveLevel$Mn20.dependencyGraph$check(analdep.scm:61)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at gnu.mapping.CallContext$ReflectMethodHandle.invokeExact(CallContext.java:726)
        at gnu.mapping.CallContext.runUntilValue(CallContext.java:656)
        at gnu.mapping.Procedure.apply1(Procedure.java:154)
        at atInteractiveLevel$Mn21.run(analdep.scm:85)
        at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:290)
        at kawa.Shell.run(Shell.java:300)
        at kawa.Shell.runFile(Shell.java:562)
        at kawa.Shell.runFileOrClass(Shell.java:485)
        at kawa.repl.processArgs(repl.java:298)
        at kawa.repl.main(repl.java:830)
panicz commented 8 months ago

It looks like I need to get myself a mac.

Could you try replacing the definition of module-name in src/analdep.scm with the following one:

(define (module-name file)
  (map string->symbol
       (only (is (length _) > 0)
             (string-split (string-take file
                                        (- (length file) 4))
                           "/"))))

and let me know if that helps?

pfusik commented 8 months ago

Could you try replacing the definition of module-name in src/analdep.scm with the following one:

Doesn't help.