Issue 17591 - IRIX: sal/rtl/source/bootstrap.cxx contains SAL_THROW_EXTERN_C but is compiled without exceptions
Summary: IRIX: sal/rtl/source/bootstrap.cxx contains SAL_THROW_EXTERN_C but is compile...
Status: CLOSED WONT_FIX
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: OOo 1.1 RC
Hardware: SGI IRIX
: P3 Trivial (vote)
Target Milestone: AOO PleaseHelp
Assignee: sander_traveling
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks: 809
  Show dependency tree
 
Reported: 2003-07-30 01:27 UTC by nickb
Modified: 2010-03-29 20:45 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description nickb 2003-07-30 01:27:41 UTC
sal/rtl/source/bootstrap.cxx:
CC -c -I.  -I. -I../inc -I../../inc -I../../unx/inc -I../../unxirxm3.pro/inc -I.
-I/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/solver/645/unxirxm3.pro/inc/stl
-I/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/solver/645/unxirxm3.pro/inc/external
-I/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/solver/645/unxirxm3.pro/inc
-I/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/solenv/unxirxm3/inc
-I/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/solenv/inc
-I/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/res
-I/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/solver/645/unxirxm3.pro/inc/stl
-I/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/solenv/inc/Xp31
-I/usr/java2/include -I/usr/java2/include/irix
-I/usr/java2/include/native_threads/include     -I. -I../../res -I. -O2  
-LANG:ansi-for-init-scope=OFF -LANG:std=ON -LANG:libc_in_namespace_std=ON
-LANG:exceptions=OFF     -DIRIX -DUNX -DVCL -DC730 -DC730 -DMIPS -DCVER=C730
-D_USE_NAMESPACE -DSTLPORT_VERSION=0x450 -D_USE_NAMESPACE=1 -DNEW_SOLAR
-D__DMAKE -DUNIX -DCPPU_ENV=MipsPro -DSUPD=645 -DBUILD=8639 -DPRODUCT -DNDEBUG
-DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE -DEXCEPTIONS_OFF -DCUI
-DSOLAR_JAVA -DSRX645  -DMULTITHREAD  -w -o ../../unxirxm3.pro/obj/bootstrap.o
/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/sal/rtl/source/bootstrap.cxx
cc-1543 CC: ERROR File =
/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/sal/rtl/source/bootstrap.cxx,
Line = 656
  Support for exception handling is not enabled by default.

      SAL_THROW_EXTERN_C()
      ^

cc-1543 CC: ERROR File =
/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/sal/rtl/source/bootstrap.cxx,
Line = 687
  Support for exception handling is not enabled by default.

      SAL_THROW_EXTERN_C()
      ^

cc-1543 CC: ERROR File =
/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/sal/rtl/source/bootstrap.cxx,
Line = 695
  Support for exception handling is not enabled by default.

      SAL_THROW_EXTERN_C()
      ^

3 errors detected in the compilation of
"/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/sal/rtl/source/bootstrap.cxx".
dmake:  Error code 2, while making '../../unxirxm3.pro/obj/bootstrap.obj'


I'm not sure if the solution should be to add 
EXCEPTIONS_ENABLED=TRUE to the Makefile... I could be doing this a lot!
Comment 1 nickb 2003-07-30 01:28:17 UTC
Added dependency
Comment 2 nickb 2003-07-30 01:34:41 UTC
Hmmm, ok, it seems its only sal/rtl/source/makefile.mk that needs
ENABLE_EXCEPTIONS=TRUE
Comment 3 nickb 2003-07-30 01:52:06 UTC
Modifed summary to include IRIX
Comment 4 nickb 2003-07-30 02:01:36 UTC
Another one:
store/source/makefile.mk

Comment 5 nickb 2003-07-30 02:14:12 UTC
Rather than add ENABLE_EXCEPTIONS everywhere, the better fix seems to be
to change sal/inc/sal/types.h:
diff -u -r1.18 types.h
--- sal/inc/sal/types.h 26 Mar 2003 16:45:58 -0000      1.18
+++ sal/inc/sal/types.h 30 Jul 2003 01:17:26 -0000
@@ -87,7 +87,7 @@
 #   if (_MSC_VER >= 1000)
 typedef __int64             sal_Int64;
 typedef unsigned __int64    sal_uInt64;
-#   elif defined(__SUNPRO_CC) || defined(__SUNPRO_C) || defined
(__GNUC__) || defined (__MWERKS__) || defined(__hpux) || defined (sgi)
+#   elif defined(__SUNPRO_CC) || defined(__SUNPRO_C) || defined
(__GNUC__) || defined (__MWERKS__) || defined(__hpux) || defined (__sgi)
 typedef long long           sal_Int64;
 typedef unsigned long long  sal_uInt64;
 #endif
@@ -204,7 +204,13 @@
 #else /* MSVC, all other */
 #define SAL_THROW( exc ) throw exc
 #endif /* __GNUC__, __SUNPRO_CC */
+#if defined IRIX && !defined GCC && !defined EXCEPTIONS_OFF
 #define SAL_THROW_EXTERN_C() throw ()
+#elif defined IRIX && !defined GCC && defined EXCEPTIONS_OFF
+#define SAL_THROW_EXTERN_C()
+#else
+#define SAL_THROW_EXTERN_C() throw ()
+#endif
 #else /* ! __cplusplus */
 /* SAL_THROW() must not be used in C headers, only
SAL_THROW_EXTERN_C() is defined */
 #define SAL_THROW_EXTERN_C()
Comment 6 nickb 2003-08-04 03:02:34 UTC
I'm no longer sure this is correct. I am no getting a crash when
saxparser runs, and throws an exception. And saxparser links against
sal.

Here is a stack trace:
Thread 0x10000
>  0 _prctl(0x15, 0x4, 0xffff, 0x0, 0xc4, 0x0, 0xa7, 0x60)
["/xlv44/6.5.21f/work/irix/lib/libc/libc_n32_M4/proc/prctl.s":15,
0xfa57da8]
   1 pthread_kill(0x15, 0x6, 0xffff, 0x0, 0xc4, 0x0, 0xa7, 0x60)
["/xlv44/6.5.21f/work/eoe/lib/libpthread/libpthread_n32_M3/sig.c":280,
0xc00fb38]
   2 _SGIPT_libc_raise(0x15, 0x4, 0xffff, 0x0, 0xc4, 0x0, 0xa7, 0x60)
["/xlv44/6.5.21f/work/eoe/lib/libpthread/libpthread_n32_M3/sig.c":790,
0xc010b48]
   3 _raise(0x15, 0x4, 0xffff, 0x0, 0xc4, 0x0, 0xa7, 0x60)
["/xlv44/6.5.21f/work/irix/lib/libc/libc_n32_M4/signal/raise.c":26,
0xfade4ec]
   4 abort(0x15, 0x4, 0xffff, 0x0, 0xc4, 0x0, 0xa7, 0x60)
["/xlv44/6.5.21f/work/irix/lib/libc/libc_n32_M4/gen/abort.c":52,
0xfa7bf40]
   5 ::__throw(0x15, 0x4, 0xffff, 0x0, 0xc4, 0x0, 0xa7, 0x60)
["/j10/mtibuild/v741m/workarea/v7.4.1m/libC/lang_support/throw.cxx":1618,
0x41ecdac]
   6 cppu::loadSharedLibComponentFactory(const rtl::OUString&,const
rtl::OUString&,const rtl::OUString&,const
com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>&,const
com::sun::star::uno::Reference<com::sun::star::registry::XRegistryKey>&)(0x7ffb7b30,
0x4, 0xffff, 0x0, 0xc4, 0x0, 0xa7, 0x60)
["/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/cppuhelper/source/shlib.cxx":311,
0x41aca24]
   7 cppu::bootstrapInitialSF(const rtl::OUString&)(0x7ffb7b70,
0x41d2314, 0xffff, 0x0, 0xc4, 0x0, 0xa7, 0x60)
["/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/cppuhelper/source/servicefactory.cxx":354,
0x4185418]
   8 cppu::createImplServiceFactory(const rtl::OUString&,const
rtl::OUString&,unsigned char,const rtl::OUString&)(0x7ffb7c40,
0x7ffb7c64, 0x7ffb7c68, 0x0, 0xc4, 0x0, 0xa7, 0x60)
["/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/cppuhelper/source/servicefactory.cxx":553,
0x418610c]
   9 cppu::createRegistryServiceFactory(const rtl::OUString&,const
rtl::OUString&,unsigned char,const rtl::OUString&)(0x15, 0x4, 0xffff,
0x0, 0xc4, 0x0, 0xa7, 0x60)
["/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/cppuhelper/source/servicefactory.cxx":653,
0x41868a0]
   10 ::main(argc = 6, argv = 0x7ffb7d64)
["/build1/nickb/openoffice/workarea/11rc/oo_1.1rc_src/i18npool/source/localedata/saxparser.cxx":355,
0x10007944]
   11 __start()
["/xlv55/kudzu-apr12/work/irix/lib/libc/libc_n32_M4/csu/crt1text.s":177,
0x10006ef8]

Hmmm, reverting that change, and enable exceptions in the makefile
results in the same problem....
Comment 7 nickb 2003-08-04 04:40:46 UTC
Bah, was missing stoc... hehe. Perhaps the exceptions was been handled
correctly, but it certainly doesn't look like it.

Left the sal changes reverted for now.
Comment 8 nickb 2003-08-05 01:59:42 UTC
basctl/source/dlged/makefile.mk - needs exceptions enabled
Comment 9 nickb 2003-08-05 02:13:57 UTC
extensions/source/plugin/unx/makefile.mk
Comment 10 nickb 2003-08-05 05:35:51 UTC
sc/source/core/tool/makefile.mk needs it enabled too.
Comment 11 nickb 2003-08-05 05:40:50 UTC
sd/source/ui/view/makefile.mk
Comment 12 nickb 2003-08-06 01:25:04 UTC
sw/source/filter/html/makefile.mk
Comment 13 Martin Hollmichel 2003-08-07 15:56:09 UTC
set target milestone to 1.1.1
Comment 14 nickb 2003-08-11 01:43:06 UTC
sw/source/ui/dochdl/makefile.mk
Comment 15 nickb 2003-08-11 01:59:39 UTC
sw/source/ui/uno/makefile.mk
Comment 16 Martin Hollmichel 2003-10-17 08:21:07 UTC
reassigned.
Comment 17 caolanm 2010-03-29 20:44:54 UTC
per issue 106845 sb removed the partial irix port, so this doesn't make sense in
isolation anymore106845
Comment 18 caolanm 2010-03-29 20:45:21 UTC
closing