Life on the bleeding edge

31 views
Skip to first unread message

Mark Engelberg

unread,
Jun 27, 2010, 7:53:02 PM6/27/10
to clojure
I spent some time today trying unsuccessfully to get the equiv branch
up and running on Windows. I'd appreciate some guidance.

I downloaded git, installed git.
Used git to "clone" the github repository.
Used git to "checkout origin/equiv".
Downloaded ant.
Installed ant.
Ran ant.
Seemed to work.
Used git to "clone" the clojure-contrib github repository.
Ran ant. Didn't work (no ant build file. Why does clojure-contrib
have a different build process than clojure?).
Installed maven.
Ran "maven package" in the clojure-contrib directory.
It churned for a while, and the reported a java exception:
"Unable to resolve symbol: flatten in this context (literals.clj:
169)" and an enormous stacktrace.

I thought maybe the contrib branch is incompatible with this new
branch of clojure. So I tried:
"git checkout origin/new"
but got an error that I can't switch branches due to a local change in
test_math.clj (which makes no sense to me because I didn't make any
changes to any file after the initial clone).

It took me a long time to get this far, but now I feel stuck. Any ideas?

Michał Marczyk

unread,
Jun 27, 2010, 8:33:01 PM6/27/10
to clo...@googlegroups.com
On 28 June 2010 01:53, Mark Engelberg <mark.en...@gmail.com> wrote:
> Ran ant.  Didn't work (no ant build file.  Why does clojure-contrib
> have a different build process than clojure?).

Good question.

> Ran "maven package" in the clojure-contrib directory.

You need to tell it where to look for clojure.jar. On Linux, this is
accomplished as follows:

mvn package -Dclojure.jar=/absolute/path/to/clojure.jar

Hopefully the Windows command accepts the same option format.

Sincerely,
Michał

Mark Engelberg

unread,
Jun 27, 2010, 9:23:22 PM6/27/10
to clo...@googlegroups.com
On Sun, Jun 27, 2010 at 5:33 PM, Michał Marczyk
<michal....@gmail.com> wrote:
> mvn package -Dclojure.jar=/absolute/path/to/clojure.jar

Thanks. I had tried that, but I got further as soon as I tried:
mvn package -Dclojure.jar=c:/absolute/path/to/clojure.jar

I'm now getting 3 failures in clojure.contrib.test_io and 1 in test_profile.

Is this normal, or is something else going on here, perhaps some
incompatibility between the equiv branch of clojure and the master
branch of clojure-contrib? If it is an incompatibility, what branch
of contrib should I change to, and how do I do it (as I mentioned, I
got an error when I tried "git checkout origin/new")?

Michał Marczyk

unread,
Jun 27, 2010, 10:51:09 PM6/27/10
to clo...@googlegroups.com
On 28 June 2010 03:23, Mark Engelberg <mark.en...@gmail.com> wrote:
> Thanks.  I had tried that, but I got further as soon as I tried:
>  mvn package -Dclojure.jar=c:/absolute/path/to/clojure.jar
>
> I'm now getting 3 failures in clojure.contrib.test_io and 1 in test_profile.
>
> Is this normal, or is something else going on here, perhaps some
> incompatibility between the equiv branch of clojure and the master
> branch of clojure-contrib?  If it is an incompatibility, what branch
> of contrib should I change to, and how do I do it (as I mentioned, I
> got an error when I tried "git checkout origin/new")?

Everything works fine for me in an Ubuntu environment.

Maybe you could try building contrib against a clojure.jar locally
built from master, just to check if it's an existing problem with
contrib builds on Windows?

Also, if you just want to play around with the equiv branch, here are
my locally compiled jars:

http://drop.io/cljequivjars

(Set to expire in a week from now.)

Sincerely,
Michał

Garth Sheldon-Coulson

unread,
Jun 27, 2010, 11:11:22 PM6/27/10
to clo...@googlegroups.com
When I try to compile clojure-contrib with the equiv branch on archlinux, maven 2.2.1, jre 1.6.0_20, I get:

Compiling clojure.contrib.condition.Condition to /mnt/hgfs/sirfoobar/Documents/Eclipse/clojure-contrib/target/classes
Exception in thread "main" java.lang.NoClassDefFoundError: clojure/lang/ILookupHost

Everything works fine with master.

Not that I expect contrib to work with equiv, but it's curious that it works for Michal and not for me.

Garth

Michał Marczyk

unread,
Jun 27, 2010, 11:31:39 PM6/27/10
to clo...@googlegroups.com
On 28 June 2010 05:11, Garth Sheldon-Coulson <ga...@mit.edu> wrote:
> When I try to compile clojure-contrib with the equiv branch on archlinux,
> maven 2.2.1, jre 1.6.0_20, I get:

Be sure to run mvn clean first.

Sincerely,
Michał

Michał Marczyk

unread,
Jun 27, 2010, 11:45:37 PM6/27/10
to clo...@googlegroups.com
On 28 June 2010 05:11, Garth Sheldon-Coulson <ga...@mit.edu> wrote:
> Compiling clojure.contrib.condition.Condition to
> /mnt/hgfs/sirfoobar/Documents/Eclipse/clojure-contrib/target/classes
> Exception in thread "main" java.lang.NoClassDefFoundError:
> clojure/lang/ILookupHost

Ah, sorry, it just occurred to me that I might not be checking all the
relevant places. After mvn clean, I can build clojure-contrib.jar
against equiv clojure.jar, but (require 'clojure.contrib.condition)
later throws the above mentioned exception for me at the REPL.

Also, I wasn't entirely sure if I'd uploaded the correct jars to the
drop the first time round, so I went ahead and uploaded them again.

Sincerely,
Michał

Garth Sheldon-Coulson

unread,
Jun 28, 2010, 12:11:47 AM6/28/10
to clo...@googlegroups.com
Ah, thanks. I also see no test failures (archlinux).


Sincerely,
Michał

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Michał Marczyk

unread,
Jun 28, 2010, 12:18:30 AM6/28/10
to clo...@googlegroups.com
On 28 June 2010 06:11, Garth Sheldon-Coulson <ga...@mit.edu> wrote:
> Ah, thanks. I also see no test failures (archlinux).

After realising that the not-AOT-compiled namespaces might still break
when require'd, I went ahead and tested a couple of them. There was
about a 50/50 split between the working namespaces and the broken
namespaces in my (very) small sample. Unfortunately c.c.macro-utils
and c.c.pprint are both on the "broken" side, which I guess means no
out-of-the-box swanking. :-/

Sincerely,
Michał

Mark Engelberg

unread,
Jun 28, 2010, 12:21:16 AM6/28/10
to clo...@googlegroups.com
OK, I just tried building clojure-contrib pointing at a clojure.jar
built from the current master branch. I get the same errors (on
Windows). Here are more details:

Testing clojure.contrib.test-io

FAIL in (test-as-url) (run-test9074812622524104689.clj:45)
expected: (= (URL. "file:/foo") (as-url (File. "/foo")))
actual: (not (= #<URL file:/foo> #<URL file:/C:/foo>))

FAIL in (test-relative-path-string) (run-test9074812622524104689.clj:45)
absolute path strings are forbidden
expected: (thrown? IllegalArgumentException (relative-path-string (str File/sepa
rator "baz")))
actual: nil

FAIL in (test-relative-path-string) (run-test9074812622524104689.clj:45)
absolute File paths are forbidden
expected: (thrown? IllegalArgumentException (relative-path-string (File. (str Fi
le/separator "quux"))))
actual: nil

Testing clojure.contrib.test-profile

FAIL in (test-print-summary) (run-test9074812622524104689.clj:45)
doesn't blow up with no data (assembla #31)
expected: (= "Name mean min max count sum\n" (with-ou
t-str (print-summary {})))
actual: (not (= "Name mean min max count sum\n" "Na
me mean min max count sum\r\n"))

Mark Engelberg

unread,
Jun 28, 2010, 12:22:57 AM6/28/10
to clo...@googlegroups.com
I ran mvn clean first.

Chris Perkins

unread,
Jun 28, 2010, 8:40:58 AM6/28/10
to Clojure
Clojure-contrib tests have not passed out-of-the-box on Windows for
many, many months. I run maven with -Dmaven.test.skip=true as a
matter of course (and every time I do, I feel a little guilty for not
stepping up to contribute fixes for the tests instead - some day...).

- Chris

Mark Engelberg

unread,
Jun 29, 2010, 1:47:59 AM6/29/10
to clo...@googlegroups.com
Yes, that is disconcerting that clojure-contrib produces errors on
Windows (sigh, it often feels like Windows is a second-class citizen
when it comes to clojure), but that did the trick and allowed the
build to complete. Thanks for the tip.

So now, finally, I've had the chance to run my regular code under the
equiv branch of clojure.jar. Across the board, I'm finding that my
code runs 10-20% *slower* under the equiv branch of Clojure 1.2 than
Clojure 1.1.

Paul Moore

unread,
Jun 29, 2010, 3:30:48 AM6/29/10
to clo...@googlegroups.com
On 29 June 2010 06:47, Mark Engelberg <mark.en...@gmail.com> wrote:
> Yes, that is disconcerting that clojure-contrib produces errors on
> Windows (sigh, it often feels like Windows is a second-class citizen
> when it comes to clojure), but that did the trick and allowed the
> build to complete.  Thanks for the tip.

Is there anything a clojure newbie with little JVM development
experience (but a willingness to learn) can do to help with the
Windows situation? From what I understand, Java itself is fine on
Windows, so I assume this is a clojure-specific issue?

Paul.

Rich Hickey

unread,
Jun 29, 2010, 7:59:18 AM6/29/10
to clo...@googlegroups.com

The thing to compare equiv to is 1.2 master. You've said you are a
heavy user of range, which may at the moment be slower in 1.2 than 1.1.

Rich

Mark Engelberg

unread,
Jun 29, 2010, 1:36:49 PM6/29/10
to clo...@googlegroups.com
On Tue, Jun 29, 2010 at 12:30 AM, Paul Moore <p.f....@gmail.com> wrote:
> Is there anything a clojure newbie with little JVM development
> experience (but a willingness to learn) can do to help with the
> Windows situation? From what I understand, Java itself is fine on
> Windows, so I assume this is a clojure-specific issue?
>
> Paul.

Tom mentioned to me a few weeks ago that he'd love to have some help
getting autodoc to work on Windows, and that he'd be willing to
supervise someone who had the time to make the changes. That might be
a great way to dive in!

Paul Moore

unread,
Jun 29, 2010, 2:21:01 PM6/29/10
to clo...@googlegroups.com

OK, I'll take a look.

Thanks.
Paul

Reply all
Reply to author
Forward
0 new messages