Issue 30346 - astdump.cxx does not compile under Solaris/x86
Summary: astdump.cxx does not compile under Solaris/x86
Status: CLOSED FIXED
Alias: None
Product: udk
Classification: Code
Component: code (show other issues)
Version: current
Hardware: PC Solaris
: P3 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: jsc
QA Contact: issues@udk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-16 15:17 UTC by doehrm
Modified: 2005-02-15 15:27 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Replace static_casts with classic casts (3.79 KB, patch)
2004-07-14 20:37 UTC, pavel
no flags Details | Diff
VCL static casts fix (4.75 KB, patch)
2004-07-19 14:56 UTC, pavel
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description doehrm 2004-06-16 15:17:37 UTC
While trying to build ooo20040620 I'm getting the following:

Making: ../unxsoli4.pro/obj/astdump.obj
CC  -c -temp=/tmp -I.  -I. -I../inc -I../inc -I../unx/inc -I../unxsoli4.pro/inc
-I. -I/home/doehrm/oocvs/solver/680/unxsoli4.pro/inc/stl -I/
home/doehrm/oocvs/solver/680/unxsoli4.pro/inc/external
-I/home/doehrm/oocvs/solver/680/unxsoli4.pro/inc
-I/home/doehrm/oocvs/solenv/unxsoli4
/inc -I/home/doehrm/oocvs/solenv/inc -I/home/doehrm/oocvs/res
-I/home/doehrm/oocvs/solver/680/unxsoli4.pro/inc/stl/SC5  -I/include -I/home/d
oehrm/oocvs/solenv/inc/Xp31 -I/usr/java/include -I/usr/java/include/solaris
-I/usr/java/include/native_threads/include     -I. -I../res -I. 
-O   -features=no%altspell,no%localfor   -instances=static -KPIC -DSOLARIS -DUNX
-DVCL -DC52 -DC52 -DINTEL -DCVER=C52 -D_USE_NAMESPACE -D_PT
HREADS -DSYSV -DSUN -DSUN4 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
-DSTLPORT_VERSION=400 -D_PTHREADS -D__DMAKE -DUNIX -DCPPU_ENV=sunpro5 -DS
UPD=680 -DPRODUCT -DNDEBUG -DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE
-DEXCEPTIONS_ON -DCUI -DSOLAR_JAVA -DSRC680   -DMULTITHREAD   -o ..
/unxsoli4.pro/obj/astdump.o /home/doehrm/oocvs/idlc/source/astdump.cxx
"/home/doehrm/oocvs/idlc/source/astdump.cxx", line 257: Error: Cannot cast away
const or volatile.
"/home/doehrm/oocvs/idlc/source/astdump.cxx", line 304: Error: Cannot cast away
const or volatile.
"/home/doehrm/oocvs/idlc/source/astdump.cxx", line 309: Error: Cannot cast away
const or volatile.
"/home/doehrm/oocvs/idlc/source/astdump.cxx", line 315: Error: Cannot cast away
const or volatile.
"/home/doehrm/oocvs/idlc/source/astdump.cxx", line 329: Error: Cannot cast away
const or volatile.
"/home/doehrm/oocvs/idlc/source/astdump.cxx", line 342: Error: Cannot cast away
const or volatile.
"/home/doehrm/oocvs/idlc/source/astdump.cxx", line 354: Error: Cannot cast away
const or volatile.
7 Error(s) detected.
dmake:  Error code 7, while making '../unxsoli4.pro/obj/astdump.obj'

This is

> uname -a
SunOS plonk 5.9 Generic_112234-12 i86pc i386 i86pc

> CC -V
CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111686-20 2004/03/19

There was some time ago a discussion on the dev list with sander (AFAIR) that
this compiler should be supported.
Comment 1 kay.ramme 2004-06-17 08:58:34 UTC
Juergen, please take care of this.
Comment 2 jsc 2004-06-17 10:21:07 UTC
I got the info that this compiler is not supported. So if you have a patch i
will check it and will integrate it if possible. Otherwise i will take a look on
it when i have time and when i found an appropraite compler.
Comment 3 jsc 2004-06-17 10:21:40 UTC
set target
Comment 4 doehrm 2004-06-17 14:25:10 UTC
So which compiler should be used on Solaris 9/x86? Studio 8 does not work either
(other error earlier - if necessary I can find out)
Comment 5 pavel 2004-07-14 19:23:47 UTC
reopening.

I'm at this one now too. I will try to propose solution for this.
Comment 6 pavel 2004-07-14 19:24:37 UTC
BTW: I'm on Solaris/SPARC with

CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111685-10 2002/09/16
Comment 7 pavel 2004-07-14 20:36:11 UTC
The attached patch fixes the whole idlc issue for me.
Comment 8 pavel 2004-07-14 20:37:47 UTC
Created attachment 16468 [details]
Replace static_casts with classic casts
Comment 9 pavel 2004-07-14 20:40:04 UTC
jsc: back to you. See hr's comments in
http://www.openoffice.org/issues/show_bug.cgi?id=26098 about those staic_casts.
Comment 10 doehrm 2004-07-14 20:54:29 UTC
Fixes the error for me too - thanx a lot for this fix! :-)
Comment 11 pavel 2004-07-17 07:53:59 UTC
The same issue is in vcl:

diff -ur ooo_cws_src680_ooo20040704_src.orig/vcl/unx/source/app/saldisp.cxx
ooo_cws_src680_ooo20040704_src/vcl/unx/source/app/saldisp.cxx
--- ooo_cws_src680_ooo20040704_src.orig/vcl/unx/source/app/saldisp.cxx
2004-07-17 08:40:35.000000000 +0200
+++ ooo_cws_src680_ooo20040704_src/vcl/unx/source/app/saldisp.cxx	2004-07-17
08:41:16.000000000 +0200
@@ -2436,7 +2436,7 @@
         std::list< SalFrame* >::const_iterator it;
         for( it = m_aFrames.begin(); it != m_aFrames.end(); ++it )
         {
-            X11SalFrame* pFrame = static_cast< X11SalFrame* >(*it);
+            X11SalFrame* pFrame = (X11SalFrame*)(*it);
             if( pFrame->GetWindow() == aWindow || pFrame->GetShellWindow() ==
aWindow )
             {
                 aWindow = pFrame->GetWindow();
@@ -2500,7 +2500,7 @@
     std::list< SalFrame* >::const_iterator it;
     for( it = m_aFrames.begin(); it != m_aFrames.end(); ++it )
     {
-        X11SalFrame* pFrame = static_cast< X11SalFrame* >(*it);
+        X11SalFrame* pFrame = (X11SalFrame*)(*it);
 		XLIB_Window aDispatchWindow = pEvent->xany.window;
         if( pFrame->GetWindow() == aDispatchWindow
             || pFrame->GetShellWindow() == aDispatchWindow

doehrm: can you confirm this too?
Comment 12 jsc 2004-07-19 13:52:46 UTC
i will integrate this patch asap but again this is not a supported compiler and
you will probably run into problems again and again.
Comment 13 doehrm 2004-07-19 13:58:30 UTC
Again my question as already posted:

Which compiler is supported on Solaris/x86? The configure scripts checks for 
WS6U2 and the next supported Version is Studio 8 IMHO.
Comment 14 pavel 2004-07-19 14:55:23 UTC
jsc: I'd suggest consulting with C++ experts inside Sun. I do not know C++ very
well. I'll attach complete vcl patch (more places there need fixes).

My Solaris/SPARC build is currently at sd project.
Comment 15 pavel 2004-07-19 14:56:43 UTC
Created attachment 16581 [details]
VCL static casts fix
Comment 16 jsc 2004-07-19 15:30:56 UTC
please submit a seperate issue for the VCL patch. It's a different project and i
won't patch it. Thanks
Comment 17 pavel 2004-07-19 17:30:11 UTC
jsc: done - see #i31733#.
Comment 18 jsc 2004-07-20 07:45:20 UTC
The compiler which is currently used is 
CC: Sun C++ 5.5 Patch 113817-03 2003/10/14

Some older compilers are supported as well but the Workshop 6 update 2 was to
bad. The compiler has a bad quality and works only with some patches reasonable.
The compiler is accepted but not officially supported, we give no guarantee and
we recommend to use a newer one.
Comment 19 doehrm 2004-07-20 10:07:21 UTC
Yes, this is true for SPARC but this compiler is not available for Intel...
Comment 20 jsc 2004-07-20 12:12:34 UTC
The forte 7 compiler was not available for Intel  but this is Forte 8 and that
is exactly the reason why we have switched for Sparc to this compiler as well.
We want use the same compiler for both platforms.
Comment 21 jsc 2004-10-27 16:35:19 UTC
fixed -> patch integrated on cws sdksample
Comment 22 jsc 2004-12-22 16:59:32 UTC
integrate patch
Comment 23 jsc 2005-02-15 15:27:56 UTC
checked on master m78