How to compile

May 4th, 2012

Home Forums Issues How to compile

This topic contains 6 replies, has 3 voices, and was last updated by  Baz 3 years, 11 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #194

    nimnio
    Member

    When I try to build Cognitive Foundry Version 3.3.2 using mvn package, I get an exception message. I have no experience using maven, so I guess I am doing it wrong, but without a README file or quick-start guide, I don’t know what to do next, short of reading about maven until my eyes bleed. 🙂

    Here is the exception message in its entirety:

    nimnio@ss-ws-m200:~/Downloads/CognitiveFoundry-3.3.2-source$ mvn package
    [INFO] Scanning for projects…
    [INFO] ————————————————————————
    [ERROR] FATAL ERROR
    [INFO] ————————————————————————
    [INFO] Error building POM (may not be this project’s POM).

    Project ID: unknown

    Reason: Could not find the model file ‘/home/nimnio/Downloads/CognitiveFoundry-3.3.2-source/Tools/PackageAll’. for project unknown

    [INFO] ————————————————————————
    [INFO] Trace
    org.apache.maven.reactor.MavenExecutionException: Could not find the model file ‘/home/nimnio/Downloads/CognitiveFoundry-3.3.2-source/Tools/PackageAll’. for project unknown
    at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
    Caused by: org.apache.maven.project.ProjectBuildingException: Could not find the model file ‘/home/nimnio/Downloads/CognitiveFoundry-3.3.2-source/Tools/PackageAll’. for project unknown
    at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1575)
    at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506)
    at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
    at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604)
    at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487)
    at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:560)
    at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391)
    … 12 more
    Caused by: java.io.FileNotFoundException: /home/nimnio/Downloads/CognitiveFoundry-3.3.2-source/Tools/PackageAll (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.(FileInputStream.java:120)
    at hidden.org.codehaus.plexus.util.xml.XmlReader.(XmlReader.java:124)
    at hidden.org.codehaus.plexus.util.xml.XmlStreamReader.(XmlStreamReader.java:67)
    at hidden.org.codehaus.plexus.util.ReaderFactory.newXmlReader(ReaderFactory.java:118)
    at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1570)
    … 18 more

    #195

    Baz
    Member

    Hmm… it looks like that directory is missing from the source release, we will need to fix this in the next release. If you want to use maven to build, you should be able to comment out the line in the pom.xml file that is “Tools/PackageAll” that is just used to package together all the individual jar files at the end for the option of having a single jar.

    Our main build system is actually Ant, alternatively you can do “ant build” in the main directory to build all of the components.

    Let me know if you have any other questions.
    .

    #196

    nimnio
    Member

    Thanks for your help, Baz. Commenting out “Tools/PackageAll” in “pom.xml” mostly worked. It seems compilation was successful, but there were some test failures:

    Failed tests:
    testScale(gov.sandia.cognition.math.LogNumberTest)
    testZero(gov.sandia.cognition.math.MutableDoubleTest)
    testScale(gov.sandia.cognition.math.MutableIntegerTest)

    Tests in error:
    testEquals(gov.sandia.cognition.math.matrix.mtj.SparseMatrixTest)
    testEquals(gov.sandia.cognition.math.matrix.mtj.DenseMatrixTest)

    Tests run: 1598, Failures: 3, Errors: 2, Skipped: 0

    [INFO] ————————————————————————
    [ERROR] BUILD FAILURE
    [INFO] ————————————————————————
    [INFO] There are test failures.

    I only wanted to compile, so I’m not really concerned about this failures, but I thought you would want to know.

    Thanks again.

    #197

    Baz
    Member

    Thanks for the heads-up. It is strange that those failed for you though; when we did the maven release it ran all the tests passed fine. Can you give me any info on the OS, CPU, and Java version you are running?

    #198

    nimnio
    Member

    OS: Ubuntu 11.10, 64-bit
    CPU: 64-bit, Intel Core i5-2310 CPU @ 2.90GHz × 4
    Java: 1.6.0_30 (Sun)

    To ensure that I did not unknowingly alter the release, I started fresh. I unzipped “CognitiveFoundry-3.3.2-source.zip”, commented-out “Tools/PackageAll”, and ran “mvn package”. I saw the same test failures.

    #229

    gvramanarao
    Member

    Compile fails with Java 1.7. I get the following errors when I try to build.
    OS – Ubuntu 12.04.
    Java version – 1.7.0_07

    Buildfile: /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/build.xml

    -pre-init:

    -init-private:

    -pre-init-libraries:

    -init-private-libraries:

    -init-libraries:

    -init-user:

    -init-project:

    -init-macrodef-property:

    -do-init:

    -post-init:

    -init-check:

    -init-ap-cmdline-properties:

    -init-macrodef-javac-with-processors:

    -init-macrodef-javac-without-processors:

    -init-macrodef-javac:

    -init-macrodef-junit:

    -init-debug-args:

    -init-macrodef-nbjpda:

    -init-macrodef-debug:

    -init-macrodef-java:

    -init-presetdef-jar:

    -init-ap-cmdline-supported:

    -init-ap-cmdline:

    init:

    -deps-jar-init:
    [delete] Deleting: /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Build/built-jar.properties

    deps-jar:

    -warn-already-built-jar:
    [propertyfile] Updating property file: /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Build/built-jar.properties

    -check-call-dep:

    -maybe-call-dep:

    -pre-init:

    -init-private:

    -pre-init-libraries:

    -init-private-libraries:

    -init-libraries:

    -init-user:

    -init-project:

    -init-macrodef-property:

    -do-init:

    -post-init:

    -init-check:

    -init-ap-cmdline-properties:

    -init-macrodef-javac-with-processors:
    Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:javac

    -init-macrodef-javac-without-processors:

    -init-macrodef-javac:
    Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:depend

    -init-macrodef-junit:
    Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:junit

    -init-debug-args:

    -init-macrodef-nbjpda:
    Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/1:nbjpdastart

    -init-macrodef-debug:
    Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:debug

    -init-macrodef-java:
    Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/1:java

    -init-presetdef-jar:

    -init-ap-cmdline-supported:

    -init-ap-cmdline:

    init:

    -deps-jar-init:

    deps-jar:

    -warn-already-built-jar:
    [propertyfile] Updating property file: /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Build/built-jar.properties

    -check-automatic-build:

    -clean-after-automatic-build:

    -verify-automatic-build:

    -pre-pre-compile:

    -pre-compile:

    -copy-persistence-xml:

    -compile-depend:

    -do-compile:
    [javac] Compiling 196 source files to /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Build/classes
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/algorithm/AnytimeAlgorithmWrapper.java:28: warning: [rawtypes] found raw type: AnytimeAlgorithm
    [javac] public abstract class AnytimeAlgorithmWrapper<ResultType, InternalAlgorithm extends AnytimeAlgorithm>
    [javac] ^
    [javac] missing type arguments for generic class AnytimeAlgorithm<ResultType>
    [javac] where ResultType is a type-variable:
    [javac] ResultType extends Object declared in interface AnytimeAlgorithm
    [javac] error: warnings found and -Werror specified
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/collection/DynamicArrayMap.java:634: warning: [rawtypes] found raw type: Collection
    [javac] final Collection other)
    [javac] ^
    [javac] missing type arguments for generic class Collection<E>
    [javac] where E is a type-variable:
    [javac] E extends Object declared in interface Collection
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/collection/DynamicArrayMap.java:650: warning: [rawtypes] found raw type: Iterator
    [javac] final Iterator otherIt = other.iterator();
    [javac] ^
    [javac] missing type arguments for generic class Iterator<E>
    [javac] where E is a type-variable:
    [javac] E extends Object declared in interface Iterator
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/collection/DynamicArrayMap.java:849: warning: [rawtypes] found raw type: DynamicArrayMap.Entry
    [javac] final DynamicArrayMap.Entry other)
    [javac] ^
    [javac] missing type arguments for generic class DynamicArrayMap<ValueType>.Entry
    [javac] where ValueType is a type-variable:
    [javac] ValueType extends Object declared in class DynamicArrayMap
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/evaluator/CompositeEvaluatorList.java:44: warning: [rawtypes] found raw type: Evaluator
    [javac] private ArrayList<Evaluator> evaluators;
    [javac] ^
    [javac] missing type arguments for generic class Evaluator<InputType,OutputType>
    [javac] where InputType,OutputType are type-variables:
    [javac] InputType extends Object declared in interface Evaluator
    [javac] OutputType extends Object declared in interface Evaluator
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/evaluator/CompositeEvaluatorList.java:52: warning: [rawtypes] found raw type: Evaluator
    [javac] this(new ArrayList<Evaluator>());
    [javac] ^
    [javac] missing type arguments for generic class Evaluator<InputType,OutputType>
    [javac] where InputType,OutputType are type-variables:
    [javac] InputType extends Object declared in interface Evaluator
    [javac] OutputType extends Object declared in interface Evaluator
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/evaluator/CompositeEvaluatorList.java:76: warning: [rawtypes] found raw type: Evaluator
    [javac] final Collection<? extends Evaluator> evaluators)
    [javac] ^
    [javac] missing type arguments for generic class Evaluator<InputType,OutputType>
    [javac] where InputType,OutputType are type-variables:
    [javac] InputType extends Object declared in interface Evaluator
    [javac] OutputType extends Object declared in interface Evaluator
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/evaluator/CompositeEvaluatorList.java:102: warning: [rawtypes] found raw type: Evaluator
    [javac] for (Evaluator evaluator : this.evaluators)
    [javac] ^
    [javac] missing type arguments for generic class Evaluator<InputType,OutputType>
    [javac] where InputType,OutputType are type-variables:
    [javac] InputType extends Object declared in interface Evaluator
    [javac] OutputType extends Object declared in interface Evaluator
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/evaluator/CompositeEvaluatorList.java:115: warning: [rawtypes] found raw type: Evaluator
    [javac] public ArrayList<Evaluator> getEvaluators()
    [javac] ^
    [javac] missing type arguments for generic class Evaluator<InputType,OutputType>
    [javac] where InputType,OutputType are type-variables:
    [javac] InputType extends Object declared in interface Evaluator
    [javac] OutputType extends Object declared in interface Evaluator
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/evaluator/CompositeEvaluatorList.java:128: warning: [rawtypes] found raw type: Evaluator
    [javac] final Collection<? extends Evaluator> evaluators)
    [javac] ^
    [javac] missing type arguments for generic class Evaluator<InputType,OutputType>
    [javac] where InputType,OutputType are type-variables:
    [javac] InputType extends Object declared in interface Evaluator
    [javac] OutputType extends Object declared in interface Evaluator
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/evaluator/CompositeEvaluatorList.java:130: warning: [rawtypes] found raw type: Evaluator
    [javac] this.evaluators = new ArrayList<Evaluator>(evaluators);
    [javac] ^
    [javac] missing type arguments for generic class Evaluator<InputType,OutputType>
    [javac] where InputType,OutputType are type-variables:
    [javac] InputType extends Object declared in interface Evaluator
    [javac] OutputType extends Object declared in interface Evaluator
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/math/geometry/KDTree.java:825: warning: [rawtypes] found raw type: Neighborhood.Neighbor
    [javac] implements Comparable<Neighbor>
    [javac] ^
    [javac] missing type arguments for generic class Neighborhood<VectorType#2,DataType#2,PairType#2>.Neighbor<VectorType#1,DataType#1,PairType#1>
    [javac] where VectorType#1,DataType#1,PairType#1,VectorType#2,DataType#2,PairType#2 are type-variables:
    [javac] VectorType#1 extends Vectorizable declared in class Neighborhood.Neighbor
    [javac] DataType#1 extends Object declared in class Neighborhood.Neighbor
    [javac] PairType#1 extends Pair<? extends VectorType#1,DataType#1> declared in class Neighborhood.Neighbor
    [javac] VectorType#2 extends Vectorizable declared in class Neighborhood
    [javac] DataType#2 extends Object declared in class Neighborhood
    [javac] PairType#2 extends Pair<? extends VectorType#2,DataType#2> declared in class Neighborhood
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/math/geometry/KDTree.java:859: warning: [rawtypes] found raw type: Neighborhood.Neighbor
    [javac] final Neighbor other)
    [javac] ^
    [javac] missing type arguments for generic class Neighborhood<VectorType#2,DataType#2,PairType#2>.Neighbor<VectorType#1,DataType#1,PairType#1>
    [javac] where VectorType#1,DataType#1,PairType#1,VectorType#2,DataType#2,PairType#2 are type-variables:
    [javac] VectorType#1 extends Vectorizable declared in class Neighborhood.Neighbor
    [javac] DataType#1 extends Object declared in class Neighborhood.Neighbor
    [javac] PairType#1 extends Pair<? extends VectorType#1,DataType#1> declared in class Neighborhood.Neighbor
    [javac] VectorType#2 extends Vectorizable declared in class Neighborhood
    [javac] DataType#2 extends Object declared in class Neighborhood
    [javac] PairType#2 extends Pair<? extends VectorType#2,DataType#2> declared in class Neighborhood
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/util/ObjectUtil.java:322: warning: [rawtypes] found raw type: Class
    [javac] Class c = null;
    [javac] ^
    [javac] missing type arguments for generic class Class<T>
    [javac] where T is a type-variable:
    [javac] T extends Object declared in class Class
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/util/ObjectUtil.java:350: warning: [rawtypes] found raw type: Class
    [javac] for( Class i : c.getInterfaces() )
    [javac] ^
    [javac] missing type arguments for generic class Class<T>
    [javac] where T is a type-variable:
    [javac] T extends Object declared in class Class
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/util/ObjectUtil.java:386: warning: [rawtypes] found raw type: Class
    [javac] final Class c )
    [javac] ^
    [javac] missing type arguments for generic class Class<T>
    [javac] where T is a type-variable:
    [javac] T extends Object declared in class Class
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/util/ObjectUtil.java:395: warning: [rawtypes] found raw type: Constructor
    [javac] for( Constructor m : constructors )
    [javac] ^
    [javac] missing type arguments for generic class Constructor<T>
    [javac] where T is a type-variable:
    [javac] T extends Object declared in class Constructor
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/util/ObjectUtil.java:454: warning: [rawtypes] found raw type: Class
    [javac] final Class c)
    [javac] ^
    [javac] missing type arguments for generic class Class<T>
    [javac] where T is a type-variable:
    [javac] T extends Object declared in class Class
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/util/ObjectUtil.java:509: warning: [rawtypes] found raw type: Iterable
    [javac] Iterable iterable = (Iterable) o;
    [javac] ^
    [javac] missing type arguments for generic class Iterable<T>
    [javac] where T is a type-variable:
    [javac] T extends Object declared in interface Iterable
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/util/ObjectUtil.java:584: warning: [rawtypes] found raw type: Class
    [javac] final Class c )
    [javac] ^
    [javac] missing type arguments for generic class Class<T>
    [javac] where T is a type-variable:
    [javac] T extends Object declared in class Class
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/util/ObjectUtil.java:609: warning: [rawtypes] found raw type: Class
    [javac] final Class c)
    [javac] ^
    [javac] missing type arguments for generic class Class<T>
    [javac] where T is a type-variable:
    [javac] T extends Object declared in class Class
    [javac] /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/Source/gov/sandia/cognition/util/ObjectUtil.java:706: warning: [rawtypes] found raw type: Class
    [javac] final Class c )
    [javac] ^
    [javac] missing type arguments for generic class Class<T>
    [javac] where T is a type-variable:
    [javac] T extends Object declared in class Class
    [javac] 1 error
    [javac] 22 warnings

    BUILD FAILED
    /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/nbproject/build-impl.xml:522: The following error occurred while executing this line:
    /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/nbproject/build-impl.xml:1030: The following error occurred while executing this line:
    /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/nbproject/build-impl.xml:556: The following error occurred while executing this line:
    /home/ramana/Software/third-party/CognitiveFoundry-3.3.2-source/Components/CommonCore/nbproject/build-impl.xml:247: Compile failed; see the compiler error output for details.

    Total time: 2 seconds

    #231

    Baz
    Member

    The 3.3.2 release doesn’t compile directly in Java 1.7 due to changes in the compiler (though you can try removing the -Werror option which will make the number of failures smaller).

    If you get the latest from the development mercurial repository, it should work for you. If not, please let us know.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Comments are closed.