Problem:
make -f inst_reports.mk install command completes with error..
Note: This error also reproduces on applying Ebs patch 14029977..
The error stack is long..
The important information is gathered from the stack "ld:0706-006 Cannot find or open library file -l jvm..."
Analysis:
So, error message above gives "jvm cannot be found" message... (-l jvm)
The "-l" option of the ld linker is below;
-l namespec --> in our case it s -l jvm --library=namespec Add the archive or object file specified by namespec to the list of files to link. This option may be used any number of times. "If namespec is of the form :filename, ld will search the library path for a file called filename, otherwise it will search the library path for a file called libnamespec.a." On systems which support shared libraries, ld may also search for files other than libnamespec.a. Specifically, on ELF and SunOS systems, ld will search a directory for a library called libnamespec.so before searching for one called libnamespec.a. (By convention, a ".so" extension indicates a shared library.) Note that this behavior does not apply to :filename, which always specifies a file called filename. The linker will search an archive only once, at the location where it is specified on the command line. If the archive defines a symbol which was undefined in some object which appeared before the archive on the command line, the linker will include the appropriate file(s) from the archive. However, an undefined symbol in an object appearing later on the command line will not cause the linker to search the archive again. See the -( option for a way to force the linker to search archives multiple times. You may list the same archive multiple times on the command line. This type of archive searching is standard for Unix linkers. However, if you are using ld on AIX , note that it is different from the behaviour of the AIX linker.
So from th man pages of ld , two important things can be figured out;
1) ld is searching the library path
2) ld is searching for a file called libnamespec.a (in our case libjvm.a)
Library path can be found from the relevant make files..
In this case, as wer are buildint reports on EBS R12, makefiles are in $ORACLE_HOME(10.1.2.)/reports/lib32..
the key make file is env_reports.mk This make file declares the variables and included into the ins_reports.mk
In env_reports.mk; there is a variable called JVMSO_PATH.. Which is declared like ; JVMSO_PATH=-L$(JDK_HOME)/jre/bin/classsic... and JDK_HOME=$JAVA_HOME and JAVA_HOME=$ORACLE_HOME/jdk
In this case, as wer are buildint reports on EBS R12, makefiles are in $ORACLE_HOME(10.1.2.)/reports/lib32..
the key make file is env_reports.mk This make file declares the variables and included into the ins_reports.mk
In env_reports.mk; there is a variable called JVMSO_PATH.. Which is declared like ; JVMSO_PATH=-L$(JDK_HOME)/jre/bin/classsic... and JDK_HOME=$JAVA_HOME and JAVA_HOME=$ORACLE_HOME/jdk
So according to these variable declerations; if ld cannot find libjvm.a (i there is no file called libjvm.a) in $ORACLE_HOME/jdk/jre/bin/classic, the error " ld:0706-006 Cannot find or open library file -l jvm..." will be produced..
Fix:
*Change JVMSO_PATH (for jdk 1.6 --> JVMSO_PATH= L$(JDK_HOME)/jre/lib/pcc/classsic)
or
*Copy libjvm.a to directory pointed by the JVMSO_PATH variable..
or
*Copy libjvm.a to directory pointed by the JVMSO_PATH variable..