lindenb / jvarkit

Java utilities for Bioinformatics
https://jvarkit.readthedocs.io/
Other
482 stars 133 forks source link

compilation error since last git pull #45

Closed avilella closed 8 years ago

avilella commented 8 years ago

Verify

/media/sf_Downloads/jvarkit/src/main/java/com/github/lindenb/jvarkit/util/bio/bed/BedLine.java:41: error: cannot find symbol return String.join(delimiter, this.tokens); ^ symbol: method join(CharSequence,String[]) location: class String warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/samtools/seekablestream/SeekableStream.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/samtools/util/IterableOnceIterator.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. 1 error 17 warnings make: *\ [biostar178713] Error 1

Your environment

git pull ssh://git@github.com/lindenb/jvarkit.git master make clean make biostar178713

Expected behaviour

Successful compilation

Actual behaviour

Compilation error

lindenb commented 8 years ago

strange, the following script works for me from scratch:

git clone "http://github.com/lindenb/jvarkit.git"
cd jvarkit
make clean
make biostar178713

it looks like your default java compiler is using an old version of javac. http://stackoverflow.com/questions/24106371

avilella commented 8 years ago

Same error when doing a fresh git clone:

export JAVA_HOME=/home/avilella/java/jdk1.8.0_72
git clone "http://github.com/lindenb/jvarkit.git"
cd jvarkit
make clean
make biostar178713

make pcrclipreads compiles flawlessly.

lindenb commented 8 years ago

please, show me the log output when compiling make biostar178713. Thanks

avilella commented 8 years ago

On Mon, Feb 29, 2016 at 10:50 AM, Pierre Lindenbaum < notifications@github.com> wrote:

please, show me the log output when compiling make biostar178713. Thanks

— Reply to this email directly or view it on GitHub https://github.com/lindenb/jvarkit/issues/45#issuecomment-190152076.

warning: input type undefined javac 1.7.0_95 warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/samtools/util/CloserUtil.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/tribble/readers/LineIterator.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/tribble/Feature.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/samtools/util/Locatable.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/tribble/readers/LineIteratorImpl.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/tribble/readers/LineReader.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/tribble/readers/LineReaderUtil.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/samtools/Defaults.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/samtools/util/AbstractIterator.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/samtools/util/BlockCompressedInputStream.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/samtools/util/BlockCompressedOutputStream.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/samtools/util/IOUtil.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/tribble/AsciiFeatureCodec.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/tribble/AbstractFeatureCodec.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/tribble/FeatureCodec.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. /media/sf_Downloads/jvarkit/src/main/java/com/github/lindenb/jvarkit/util/bio/bed/BedLine.java:41: error: cannot find symbol return String.join(delimiter, this.tokens); ^ symbol: method join(CharSequence,String[]) location: class String warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/samtools/seekablestream/SeekableStream.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar(htsjdk/samtools/util/IterableOnceIterator.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. 1 error 17 warnings make: *\ [biostar178713] Error 1

echo "### COMPILING biostar178713 ######"

COMPILING biostar178713

mkdir -p /media/sf_Downloads/jvarkit/_tmp-2.0.1/META-INF /media/sf_Downloads/jvarkit/dist-2.0.1

generate java code if needed = a file with .xml exists, requires xsltproc, preprocessing file twice

if [ -e "/media/sf_Downloads/jvarkit/src/main/java/com/github/lindenb/jvarkit/tools/biostar/Biostar178713.xml" ] ; then mkdir -p /media/sf_Downloads/jvarkit/src/main/generated-sources/java/com/github/lindenb/jvarkit/tools/biostar/ && xsltproc --xinclude -o "/media/sf_Downloads/jvarkit/src/main/generated-sources/com.github.lindenb.jvarkit.tools.biostar.Biostar178713.proc.xml" /media/sf_Downloads/jvarkit/src/main/resources/xsl/commandpreproc.xsl "/media/sf_Downloads/jvarkit/src/main/java/com/github/lindenb/jvarkit/tools/biostar/Biostar178713.xml" && xsltproc --xinclude --stringparam githash cat /media/sf_Downloads/jvarkit/.git/refs/heads/master --path "/media/sf_Downloads/jvarkit/src/main/resources/xml" -o /media/sf_Downloads/jvarkit/src/main/generated-sources/java/com/github/lindenb/jvarkit/tools/biostar/AbstractBiostar178713.java /media/sf_Downloads/jvarkit/src/main/resources/xsl/command2java.xsl "/media/sf_Downloads/jvarkit/src/main/generated-sources/com.github.lindenb.jvarkit.tools.biostar.Biostar178713.proc.xml" && xsltproc -o "/media/sf_Downloads/jvarkit/src/main/generated-sources/com.github.lindenb.jvarkit.tools.biostar.Biostar178713.elixir.jsonx" /media/sf_Downloads/jvarkit/src/main/resources/xsl/jsonxelixir.xsl "/media/sf_Downloads/jvarkit/src/main/generated-sources/com.github.lindenb.jvarkit.tools.biostar.Biostar178713.proc.xml" && xsltproc -o "/media/sf_Downloads/jvarkit/src/main/generated-sources/com.github.lindenb.jvarkit.tools.biostar.Biostar178713.elixir.json" /media/sf_Downloads/jvarkit/src/main/resources/xsl/jsonx2json.xsl "/media/sf_Downloads/jvarkit/src/main/generated-sources/com.github.lindenb.jvarkit.tools.biostar.Biostar178713.elixir.jsonx" ; fi

copy resource

cp /media/sf_Downloads/jvarkit/src/main/resources/messages/messages.properties /media/sf_Downloads/jvarkit/_tmp-2.0.1 echo '### Printing javac version : it should be 1.8. if Not, check your ${PATH}.'

Printing javac version : it should be 1.8. if Not, check your ${PATH}.

javac -version

compile

javac -d /media/sf_Downloads/jvarkit/_tmp-2.0.1 -g -classpath "/media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/apache-ant-1.8.2-bzip2.jar:/media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/commons-compress-1.4.1.jar:/media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/commons-jexl-2.1.1.jar:/media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/commons-logging-1.1.1.jar:/media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/htsjdk-2.0.1.jar:/media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/ngs-java-1.2.2.jar:/media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/snappy-java-1.0.3-rc3.jar:/media/sf_Downloads/jvarkit/htsjdk-2.0.1/dist/xz-1.5.jar:lib/commons-cli/commons-cli/1.3.1/commons-cli-1.3.1.jar:lib/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13.jar:lib/org/slf4j/slf4j-simple/1.7.13/slf4j-simple-1.7.13.jar" -sourcepath /media/sf_Downloads/jvarkit/src/main/java:/media/sf_Downloads/jvarkit/src/main/generated-sources/java /media/sf_Downloads/jvarkit/src/main/generated-sources/java/com/github/lindenb/jvarkit/util/htsjdk/HtsjdkVersion.java /media/sf_Downloads/jvarkit/src/main/java/com/github/lindenb/jvarkit/tools/biostar/Biostar178713.java

lindenb commented 8 years ago

the second line shows clearly that your java compiler is 1.7 and not 1.8/8

javac 1.7.0_95
avilella commented 8 years ago

Hummm, so it's ignoring the setup of the JAVA_HOME env var? Any ideas?

On Mon, Feb 29, 2016 at 10:56 AM, Pierre Lindenbaum < notifications@github.com> wrote:

the second line shows clearly that your java compiler is 1.7 and not 1.8/8

javac 1.7.0_95

— Reply to this email directly or view it on GitHub https://github.com/lindenb/jvarkit/issues/45#issuecomment-190153315.

lindenb commented 8 years ago

which OS ?

lindenb commented 8 years ago

which JDK (oracle/SUN ?)

avilella commented 8 years ago

It worked in ubuntu by setting up the alternative like this:

export JAVA_HOME=/home/avilella/java/jdk1.8.0_72
sudo update-alternatives --install /usr/bin/java java
${JAVA_HOME%*/}/bin/java 20000
sudo update-alternatives --install /usr/bin/java java
${JAVA_HOME%*/}/bin/java 20000
git clone "http://github.com/lindenb/jvarkit.git"
cd jvarkit
make clean
make biostar178713

java -jar dist-2.0.1/biostar178713.jar -d 100000 -o out.zip
./htsjdk-2.0.1/testdata/htsjdk/tribble/test.bed
./htsjdk-2.0.1/testdata/htsjdk/tribble/test.bed

Creates 5 files, Thanks Pierre, can close ticket now.

On Mon, Feb 29, 2016 at 10:58 AM, Albert Vilella avilella@gmail.com wrote:

Hummm, so it's ignoring the setup of the JAVA_HOME env var? Any ideas?

On Mon, Feb 29, 2016 at 10:56 AM, Pierre Lindenbaum < notifications@github.com> wrote:

the second line shows clearly that your java compiler is 1.7 and not 1.8/8

javac 1.7.0_95

— Reply to this email directly or view it on GitHub https://github.com/lindenb/jvarkit/issues/45#issuecomment-190153315.