Problem with Compiler patch 111715-18

Hi,

I am working on Solaris 5.8 with Forte Developer 7 C++ compiler 5.4. I am using RWDate, RWTime in my application code. This meant that I had to apply the new compiler patch 111715-18 for DST.

The moment I apply the patch, it starts giving me compilation error in Corba code.

To confirm this, I built a small program and its is also resulting in error. Also its not any code which is being writtern by me or any other developer. Its a boiler plate code which corba's idl/idlgen automatically generates.

Following is what I did:

1) Created an idl file. interface Hello { string getGreeting; }

2) generated C++ code for this interface.

idl -base:-cC.C -poa:-sS.C hello.idl

3) This generates following files.

hello.hh

helloS.hh

helloC.C

helloS.C

4)Compile both .C files :

CC -c -I/opt/app/iona/asp6/asp/6.0/include -g +p -mt -D_REENTRANT helloC.C

CC -c -I/opt/app/iona/asp6/asp/6.0/include -g +p -mt -D_REENTRANT helloS.C

5) Build the static library

CC -xar -o libHello.a helloC.o helloS.o

This builds perfectly well without the patch.

The moment patch is applied I get following error:

CC -c -I/opt/app/iona/asp6/asp/6.0/include -g +p -mt -D_REENTRANT helloC.C

"helloC.C", line 166: Error: Cannot cast from IT_Cxx_ObjRef_var<CORBA::Object*, CORBA::Object, IT_Cxx_IntfAlloc><CORBA::Object*, CORBA::Object>> to CORBA::Object*.

1 Error(s) detected.

CC -c -I/opt/app/iona/asp6/asp/6.0/include -g +p -mt -D_REENTRANT helloS.C

"helloS.C", line 19: Error: Could not find a match for IT_Gen_DynamicProxy_Hello::IT_Gen_DynamicProxy_Hello().

1 Error(s) detected.

Following is the code snippet of helloC.C which results in error:

CORBA::Object_var obj = orb->it_demarshal_object(is);

CORBA::release(*m_ptr);

*m_ptr = Hello::_unchecked_narrow(obj); //This line results in error

Following is the code snippet of hellS.C :

CORBA::Object_var proxy = _this_impl(_tc_Hello->id());

return new IT_Gen_DynamicProxy_Hello(proxy); //This line results in error.

It seems like a problem with patch. Or do I need to do something else to build it properly with the new patch.

Thanks

Anshuman

[2306 byte] By [uchouaxa] at [2007-11-26 18:59:49]
# 1

Two possibilities:

1. The compiler patch introduced a compiler bug.

2. The code was always invalid, but earlier versions of the compiler did not detect the error.

If you can post a self-contained test case that shows the error message using the patched compiler but not with the unpatched compiler, I can tell you more.

Also, what was the patch level of the compiler before you applied patch -18? That is, what was the output of the command

CC -V

C++ 5.4 is End Of Life, and little support is available for it. I recommend that you update to Sun Studio 11 (C++ 5.8), and install all the current patches. Studio 11 is free, and you can get it here:

http://developers.sun.com/sunstudio/

clamage45a at 2007-7-9 20:41:24 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

Hi,

I really appreciate the quick response.

The smallest interface in Corba generates four files and then there are multiple include files from orbix.

Do you want me to ship all of them?

Since I cant attach anything here, I will have to copy-paste it.

Let me know.

Thanks

Anshuman

uchouaxa at 2007-7-9 20:41:24 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
Please post a bug report at bugs.sun.com. Say that you will send the files on request. I will then have you send me the files.
clamage45a at 2007-7-9 20:41:24 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4
I have posted the bug as suggested.Thanks a lot.
uchouaxa at 2007-7-9 20:41:24 > top of Java-index,Development Tools,Solaris and Linux Development Tools...