Monday, June 25, 2007

Recompiling executables results in "undefined reference to `__pure_virtual' "

In a recent upgrade from 11.5.9 to, on Red Hat Enterprise Linux 4, I ran into a problem where certain executables were not compiling. As it turned out, the executables (ENCACN, WICDOL, WICMEX, WICMLX) were all compiled with g++.

This was our 3rd iteration of the upgrade and this behavior had not been observed in prior upgrades. The difference between interation #2 and iteration #3 was that the operating system level had been upgraded to update 5. This resulted in me starting from a clean slate and going through all the prerequisites to make sure something was not missed.

The most obvious place to me was to look at the environment variable LD_ASSUME_KERNEL. A quick check on the command line indicated that it was already set and this was not my problem. On a side note, this variable is set by the script $AD_TOP/bin/ which is called by $APPL_TOP/$CONTEXT_NAME.env which in turn is then called by $APPL_TOP/APPS$CONTEXT_NAME.env.

oradev@app-dev01> echo $LD_ASSUME_KERNEL

Next, I checked the version of gcc and g++ to make sure those executables were pointing at the corrected versions.

Using the command gcc -v and g++ -v should yield the following results:
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-47.3)

The obvious prerequisite RPMs were there:

We also had the two following RPMs installed deliverd via Oracle patch 4198954 (COMPATIBILITY PACKAGES FOR ORACLE ON RHEL 4):

Unfortunately this particular situation was not publicly documented on MetaLink. There were other hits on __pure_virtual and ENCACN, but none of them were applicable. The solution was to uninstall patch 4198954 and then reinstall it. This is supposed to be documented in MetaLink Doc ID: 435078.1 "Relink errors with ENCACN on Red Hat 4.0", but at the time of this post was not an externally viewable document. This resulted in performing the following steps below as the user root.

Remove the following packages:
rpm -ev compat-oracle-rhel4 rpm -ev compat-libcwait

Reinstall the following packages:
rpm -ivh compat-libcwait-2.1-1.i386.rpm
rpm -ivh compat-oracle-rhel4-1.0-5.i386.rpm

Once the packages were reinstalled, we were then able to successfully compile ENCACN using the following command: force=y "eng ENCACN"

I then went into adadmin and recompiled all the executables to ensure nothing else broke as a result of this. The typical caveats apply. Do this in a test environment first and shutdown the application before recompiling the executables.

Brian Bent | Solution Architect | Solution Beacon


Unknown said...

We are on RUP7 and ORL 5.4
We also got the same issue for ENCACN and other WIP related modules.
I followed the solution in the post and it worked for us. We had SR open woth Oracle for more that 2 weeks, but Oracle was not able to figure it out.

Many thanks for the post.

neelu said...

I definitely desired to deliver a quick concept to thank you for the nice tips and hints you’re posting on this website. My time-consuming internet appear up has now been rewarded with helpful strategies to exchange with my family and friends. I ?d claim that we readers fact are truly blessed to dwell in a helpful community with incredibly some great individuals with insightful points. I really feel really grateful to get discovered the webpage and appear ahead to a lot of additional entertaining moments reading right here. Thanks a good deal again for a good deal of things.
Verona Hotels

Anonymous said...

Many thanks for developing the effort to discuss this, I feel strongly about this and like studying a great deal more on this subject. If feasible, as you gain expertise, would you mind updating your webpage having a great deal much more info? It is very beneficial for me.
Hotels in Paris

aliyaa said...

This is very motivational blog when you achieved something. The mba information technology will tell you all about market dealing.