Compilation error : An abstract (virtual) class cannot be instantiated. and Package common_ovm_pkg could not be bound

Hi All,
I have not set the OVM_HOME. i.e. echo $OVM_HOME gives OVM_HOME: Undefined variable.
When I am running a test, I am getting the below errors:

  1. An abstract (virtual) class cannot be instantiated.
    This error is coming because I am creating an object of ovm_report_object class in my coverage file.
  2. Package common_ovm_pkg could not be bound.
    Why this error is coming when i am trying to do : import common_ovm_pkg::*;

When I externally setting OVM_HOME i.e. setenv OVM_HOME=/path Then the test runs fine.
I checked inside the OVM_HOME path. There they have declared the ovm_report_object class as non-virtual.
That is the declaration of ovm_report_object class is : class ovm_report_object extends ovm_object;

May be because of this declaration the above erors are not coming when OVM_HOME is set.
But when OVM_HOME is not set then the error comes.
How can I resolve these errors when my OVM_HOME is not set.

If more clarification of the question is needed then please let me know.
Any suggestions???
Thanks,
Biren

It always helps to show us the complete error message including the filename and line number reported. Then show us the code around the line number reported by the error message with enough content to know what you are trying to do.

Most of the classes that you would use from the OVM are virtual which means you need to extend them into classes you can construct. There is ovm_reporter class you can use directly.

$OVM_HOME is something your script does, and no one can help you without seeing the script.

If you are using Questa, there is no need to compile the OVM libraries - it happens automatically as soon as you compile a statement import ovm_pkg::*; Most other tools do the same.