Skip to content

Compilation instructions: CBMC must be built using Java 8 #9111

Description

@mernst

The instructions in COMPILING.md say to install Debian package openjdk-8-jdk (or openjdk8 on FreeBSD), but that is not sufficient. It must also be the default Java version. If JDK 8 is installed, but the default is JDK 25, then under Ubuntu the build fails with:

[ERROR] COMPILATION ERROR : 
[ERROR] cbmc/jbmc/lib/java-models-library/src/main/java/java/lang/Object.java:[40,7] flexible constructors is not supported in -source 8
  (use -source 25 or higher to enable flexible constructors)
[ERROR] cbmc/jbmc/lib/java-models-library/src/main/java/java/lang/Class.java:[199,24] cannot find symbol
  symbol:   method checkClassLoaderPermission(java.lang.ClassLoader,<nulltype>)
  location: class java.lang.ClassLoader
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project models: Compilation failure: Compilation failure: 
[ERROR] cbmc/jbmc/lib/java-models-library/src/main/java/java/lang/Object.java:[40,7] flexible constructors is not supported in -source 8
[ERROR]   (use -source 25 or higher to enable flexible constructors)
[ERROR] cbmc/jbmc/lib/java-models-library/src/main/java/java/lang/Class.java:[199,24] cannot find symbol
[ERROR]   symbol:   method checkClassLoaderPermission(java.lang.ClassLoader,<nulltype>)
[ERROR]   location: class java.lang.ClassLoader
[ERROR] -> [Help 1]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions