Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't build Cassandra from source code

I'm using Mac OS X, my ant, java dependency satisfied the minimum requirement. When I build the source code by

ant build

I got the error like:

 [echo] apache-cassandra: /Users/taiyuanz/git/cassandra-trunk/build.xml
[javac] Compiling 890 source files to /Users/taiyuanz/git/cassandra-trunk/build/classes/main
[javac] Note: Processing compiler hints annotations
[javac] warning: Supported source version 'RELEASE_6' from annotation processor 'org.openjdk.jmh.generators.BenchmarkProcessor' less than -source '1.8'
[javac] /Users/taiyuanz/git/cassandra-trunk/src/java/org/apache/cassandra/db/partitions/AbstractBTreePartition.java:33: error: reference to Row is ambiguous
[javac] public abstract class AbstractBTreePartition implements Partition, Iterable<Row>
[javac]                                                                             ^
[javac]   both interface org.apache.cassandra.db.rows.Row in org.apache.cassandra.db.rows and class org.apache.cassandra.db.Row in org.apache.cassandra.db match
[javac] /Users/taiyuanz/git/cassandra-trunk/src/java/org/apache/cassandra/db/partitions/PartitionUpdate.java:72: error: reference to Row is ambiguous
[javac]     private BTree.Builder<Row> rowBuilder;
[javac]                           ^
[javac]   both interface org.apache.cassandra.db.rows.Row in org.apache.cassandra.db.rows and class org.apache.cassandra.db.Row in org.apache.cassandra.db match
[javac] /Users/taiyuanz/git/cassandra-trunk/src/java/org/apache/cassandra/db/partitions/PartitionUpdate.java:164: error: reference to Row is ambiguous
[javac]     public static PartitionUpdate singleRowUpdate(CFMetaData metadata, DecoratedKey key, Row row)
.......

All because of the same problem - ambiguity due to the Row class. How can one solve this?

like image 398
firstprayer Avatar asked Mar 21 '26 05:03

firstprayer


1 Answers

It looks like you have source code from pre-3.0 and post-3.0 Cassandra in your source tree. I would run:

git clean -xfd

To see if that fixes it. Otherwise, delete the repository and start again with a clean clone.

like image 174
mikea Avatar answered Mar 23 '26 17:03

mikea



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!