basho / yokozuna

Riak + Solr
245 stars 76 forks source link

Build problems without Java #266

Closed macintux closed 10 years ago

macintux commented 10 years ago

Unsurprisingly, YZ fails to build if Java isn't installed.

The problem is that it then fails to build even after Java is installed, because (so it appears to these untrained eyes) the first build attempt gets far enough to fool the second build attempt into thinking Solr is already there.

(All this is via make devrel on a Mac.)

Termination of first build:

Creating Solr dir ../priv/solr
Solr dir created successfully
Build the yokozuna.jar...
Explode the WAR...
~/github/Basho/2.0/riak/deps/yokozuna/build/solr-jars ~/github/Basho/2.0/riak/deps/yokozuna/tools
No Java runtime present, requesting install.
ERROR: Command [compile] failed!
make: *** [compile] Error 1

Termination of second build:

==> yokozuna (compile)
Solr already exists, exiting
Build the yokozuna.jar...
Compile...
../java_src/com/basho/yokozuna/handler/EntropyData.java:21: package org.apache.commons.codec.binary does not exist
import org.apache.commons.codec.binary.Base64;
                                      ^
../java_src/com/basho/yokozuna/handler/EntropyData.java:23: package org.apache.lucene.util does not exist
import org.apache.lucene.util.Bits;

(and more errors ad nauseum)

rzezeski commented 10 years ago

What happens if you...

make clean
make
macintux commented 10 years ago

I blew away deps/yokozuna and a new build worked. Mainly wanted to make sure the issue was noted in case there was a way to make the build system smart enough to not trip over itself.

rzezeski commented 10 years ago

It's the stuff in the build dir that probably got the script tripped up. This seems like a pretty rare situation and my guess is make clean would sort it out. Actually you are building from top-level Riak so make clean will invoke rebar clean which will ignore nested makefile, {BIG SIGH}.

I'm not inclined to go down this rabbit hole as there are much bigger fish to fry. But if you want to take shot at patch to deal specifically with this situation then I won't stop you :).

macintux commented 10 years ago

Among the many lessons I've learned from years in IT is that build systems are a maze of twisty little passages. Thanks, but I'd rather risk my sanity over something more productive. Feel free to close.