Discussion:
[Jscheme-user] Build error: version.txt missing?
Frank Hu
2007-09-12 03:47:51 UTC
Permalink
Hi,

I'm trying to build version 7.2 on a Mac OS X 10.4.10 system. Got
the following error message when doing "sh bin/make"

-all
-clean
-javac
(call-with-output-file
(src '"jsint/version.txt")
(lambda (s)
(display
(let ((d (.format
(DateFormat.getDateTimeInstance
DateFormat.SHORT$
DateFormat.SHORT$)
(Date.))))
(!{} '"JScheme 7.2 ("
d
'") http://jscheme.sourceforge.net
"))
s)))


====================================
SchemeException: java.io.FileNotFoundException: path_to_jscheme-7.2/
src:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
Classes/.compatibility/src/jsint/version.txt (No such file or directory)

It seems that version.txt is missing. A quick look at the java
source code doesn't indicate that this file is generated.

Frank
Geoffrey S. Knauth
2007-09-13 08:46:58 UTC
Permalink
Just thinking out loud here... It seems to me that "src/version.txt"
is generated. It exists on my system, it is just one line, and it
looks like this:

JScheme 7.2 (4/27/05 4:57 AM) http://jscheme.sourceforge.net

What puzzles me is what's in the SchemeException output you provided,
everything from "path_to_jscheme-7.2/" to and including
"Classes/.compatibility/".

I'll try a fresh checkout and build on my Mac OS X system and see
what happens. My hunch is something's in your environment that the
build process isn't expecting.

Geoffrey
--
Geoffrey S. Knauth | http://knauth.org/gsk
Post by Frank Hu
Hi,
I'm trying to build version 7.2 on a Mac OS X 10.4.10 system. Got
the following error message when doing "sh bin/make"
-all
-clean
-javac
(call-with-output-file
(src '"jsint/version.txt")
(lambda (s)
(display
(let ((d (.format
(DateFormat.getDateTimeInstance
DateFormat.SHORT$
DateFormat.SHORT$)
(Date.))))
(!{} '"JScheme 7.2 ("
d
'") http://jscheme.sourceforge.net
"))
s)))
====================================
SchemeException: java.io.FileNotFoundException: path_to_jscheme-7.2/
src:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
Classes/.compatibility/src/jsint/version.txt (No such file or
directory)
It seems that version.txt is missing. A quick look at the java
source code doesn't indicate that this file is generated.
Frank
Geoffrey S. Knauth
2007-09-13 08:47:47 UTC
Permalink
Frank,

I tried a fresh checkout and build on my Mac OS X 10.4.10 system and
got exactly the same result as you, but there were two additional
lines of error message at the very top:

Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

That may be inconsequential. I'm going to retry compilation using
"sh -x bin/make" instead of "sh bin/make" to get more detail.

Geoffrey
Post by Frank Hu
Hi,
I'm trying to build version 7.2 on a Mac OS X 10.4.10 system. Got
the following error message when doing "sh bin/make"
-all
-clean
-javac
(call-with-output-file
(src '"jsint/version.txt")
(lambda (s)
(display
(let ((d (.format
(DateFormat.getDateTimeInstance
DateFormat.SHORT$
DateFormat.SHORT$)
(Date.))))
(!{} '"JScheme 7.2 ("
d
'") http://jscheme.sourceforge.net
"))
s)))
====================================
SchemeException: java.io.FileNotFoundException: path_to_jscheme-7.2/
src:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
Classes/.compatibility/src/jsint/version.txt (No such file or
directory)
It seems that version.txt is missing. A quick look at the java
source code doesn't indicate that this file is generated.
Frank
Geoffrey S. Knauth
2007-09-13 09:04:58 UTC
Permalink
I added the following as the first sexp in src/build/make.scm:

(display (src ""))

to see just what JScheme thought the source path was, and it displayed:

/Users/gknauth/test/jscheme/t-fresh/jscheme-7.2/src:/System/Library/
Frameworks/JavaVM.framework/Versions/1.5.0/Classes/.compatibility/src

(That was all one one line, in case mail chopped it up.)

I believe it was supposed to display just:

/Users/gknauth/test/jscheme/t-fresh/jscheme-7.2/src

In other words, the build process is trying to make the path to a
filename, but the path contains more than one path element, so the
filesystem errors back to Java, which reports back "No such file or
directory." It's the path it's complaining about, not a missing
version.txt file. version.txt is created by the (make-version)
function call.

There's a potential clue in the comment just before the definition of
appDir in make.scm:

;;; Assumes a subdirectory is the only thing on classpath.
(define appDir (.getCanonicalFile
(.getParentFile
(.getCanonicalFile
(File. ($ "java.class.path"))))))
(define srcDir (File. appDir "src"))
(define (src name) (File. srcDir name))

It seems to me appDir needs to be fixed, because it is used in 20
places in make.scm to build subdirectory paths.
Geoffrey S. Knauth
2007-09-13 10:28:53 UTC
Permalink
Post by Frank Hu
I'm trying to build version 7.2 on a Mac OS X 10.4.10 system. Got
the following error message when doing "sh bin/make"
[...]
SchemeException: java.io.FileNotFoundException: path_to_jscheme-7.2/
src:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
Classes/.compatibility/src/jsint/version.txt (No such file or
directory)
I found a way to build JScheme on Mac OS X 10.4.10.
I believe this fix should be valid for all platforms.

Geoffrey

In src/build/make.scm, I replaced:

--->8---snip--->8---
;;; Assumes a subdirectory is the only thing on classpath.
(define appDir (.getCanonicalFile
(.getParentFile
(.getCanonicalFile
(File. ($ "java.class.path"))))))
--->8---snip--->8---

with:

--->8---snip--->8---
;;; No longer assumes a subdirectory is the only thing on classpath.
;;; Now assumes first thing on classpath is what should be used.
(define appDir
(let* ((cp ($ "java.class.path"))
(i (.indexOf cp (System.getProperty "path.separator")))
(subdir (cond ((= i -1) cp)
((> i 0) (substring cp 0 i))
(else (error (string-append
"appDir: can't create File
object "
"from classpath "
"\"" cp "\"\n"))))))
(.getCanonicalFile (.getParentFile (.getCanonicalFile (File.
subdir))))))

--->8---snip--->8---
Timothy J Hickey
2007-09-13 12:15:19 UTC
Permalink
Nice work Geooffrey!!

I've committed your changes into CVS.
There was also another problem with the code base
(which has been corrected in CVS) --

You need to delete the 18th line of src/jsint/primitives.scm
(tail 1) "return U.tail((Pair)x);"
With these two changes everything is compiling nicely for me on
Mac OS X 10.4 using java 1.5.0_07-87

I haven't tried it on Windows yet. I'll have to wait until tomorrow
when I have access to a Windows machine.

Happy Rosh Hashanah,
---Tim---
Post by Geoffrey S. Knauth
Post by Frank Hu
I'm trying to build version 7.2 on a Mac OS X 10.4.10 system. Got
the following error message when doing "sh bin/make"
[...]
SchemeException: java.io.FileNotFoundException: path_to_jscheme-7.2/
src:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
Classes/.compatibility/src/jsint/version.txt (No such file or
directory)
I found a way to build JScheme on Mac OS X 10.4.10.
I believe this fix should be valid for all platforms.
Geoffrey
--->8---snip--->8---
;;; Assumes a subdirectory is the only thing on classpath.
(define appDir (.getCanonicalFile
(.getParentFile
(.getCanonicalFile
(File. ($ "java.class.path"))))))
--->8---snip--->8---
--->8---snip--->8---
;;; No longer assumes a subdirectory is the only thing on classpath.
;;; Now assumes first thing on classpath is what should be used.
(define appDir
(let* ((cp ($ "java.class.path"))
(i (.indexOf cp (System.getProperty "path.separator")))
(subdir (cond ((= i -1) cp)
((> i 0) (substring cp 0 i))
(else (error (string-append
"appDir: can't create File
object "
"from classpath "
"\"" cp "\"\n"))))))
(.getCanonicalFile (.getParentFile (.getCanonicalFile (File.
subdir))))))
--->8---snip--->8---
----------------------------------------------------------------------
---
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jscheme-user mailing list
https://lists.sourceforge.net/lists/listinfo/jscheme-user
Frank Hu
2007-09-13 21:00:42 UTC
Permalink
Checked out the source from CVS. Everything works fine.

Thanks, Geoffrey and Tim.
Frank
Post by Timothy J Hickey
Nice work Geooffrey!!
I've committed your changes into CVS.
There was also another problem with the code base
(which has been corrected in CVS) --
You need to delete the 18th line of src/jsint/primitives.scm
(tail 1) "return U.tail((Pair)x);"
With these two changes everything is compiling nicely for me on
Mac OS X 10.4 using java 1.5.0_07-87
I haven't tried it on Windows yet. I'll have to wait until tomorrow
when I have access to a Windows machine.
Happy Rosh Hashanah,
---Tim---
Post by Geoffrey S. Knauth
Post by Frank Hu
I'm trying to build version 7.2 on a Mac OS X 10.4.10 system. Got
the following error message when doing "sh bin/make"
[...]
SchemeException: java.io.FileNotFoundException: path_to_jscheme-7.2/
src:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
Classes/.compatibility/src/jsint/version.txt (No such file or directory)
I found a way to build JScheme on Mac OS X 10.4.10.
I believe this fix should be valid for all platforms.
Geoffrey
--->8---snip--->8---
;;; Assumes a subdirectory is the only thing on classpath.
(define appDir (.getCanonicalFile
(.getParentFile
(.getCanonicalFile
(File. ($ "java.class.path"))))))
--->8---snip--->8---
--->8---snip--->8---
;;; No longer assumes a subdirectory is the only thing on classpath.
;;; Now assumes first thing on classpath is what should be used.
(define appDir
(let* ((cp ($ "java.class.path"))
(i (.indexOf cp (System.getProperty "path.separator")))
(subdir (cond ((= i -1) cp)
((> i 0) (substring cp 0 i))
(else (error (string-append
"appDir: can't create File
object "
"from classpath "
"\"" cp "\"\n"))))))
(.getCanonicalFile (.getParentFile (.getCanonicalFile (File.
subdir))))))
--->8---snip--->8---
---------------------------------------------------------------------
----
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jscheme-user mailing list
https://lists.sourceforge.net/lists/listinfo/jscheme-user
Loading...