[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [porting-dev] Compiling Error in PPC with gcc-3.2



Hi Debian-GCC team and OpenOffice.org people .. 

I got this error while compiling OOo with gcc-3.2:

g++-3.2 ..[snip]..  -o ../../unxlngppc.pro/obj/memmgr.o
/home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/build-tree/oo_1.0.1_src/tools/source/memmgr/memmgr.cxx
/home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/build-tree/oo_1.0.1_src/tools/source/memmgr/memmgr.cxx: In function `void (* std::set_new_handler(void (*)()))()':
/home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/build-tree/oo_1.0.1_src/tools/source/memmgr/memmgr.cxx:126: declaration of `void (* std::set_new_handler(void (*)()))()' throws different exceptions /usr/include/c++/3.2/new:65: than previous declaration `void (* std::set_new_handler(void (*)()) throw ())()'
dmake:  Error code 1, while making '../../unxlngppc.pro/obj/memmgr.obj'

I mailed it to the dev@porting.openoffice.org people and Kevin figured
out, that this could be a gcc-3.2 issue since gcc-3.1.1 

Building OpenOffice.org with gcc-3.1.1 from debian works fine (I have
running at on my IBook .. it works) .. but with gcc-3.2 fails ... 

here is the code, which should wrong (from OpenOffice.org-1.0.1
tarball):

static std::new_handler volatile g_pfnHandler = 0;

std::new_handler
SAL_CALL std::set_new_handler (std::new_handler pfnHandler)
//      throw ()
{
        std::new_handler f = g_pfnHandler;
        g_pfnHandler = pfnHandler;
        return f;
}

So, I cannot apply the patch below .... 

My question is, is it a gcc-3.2 issue or perhaps, is it a OpenOffice.org
issue.

I looked to the link below about the gcc issue and it seems, that this
patch is allready applied and I wonder, if the debian-gcc does not
contain this patch.

Anyone a hint?

	regards
			Jan

On Tue, Aug 06, 2002 at 11:12:19AM -0400, Kevin B. Hendricks wrote:
>Hi,
>
>AFAIK this is a gcc problem with 3.1.1-pre series.  Here is the patch I 
>used (it is wrong the real fix belongs in the headers and code for gcc) to 
>work around the problem.
>
>Index: source/memmgr/memmgr.cxx
>===================================================================
>RCS file: /cvs/util/tools/source/memmgr/memmgr.cxx,v
>retrieving revision 1.5
>diff -u -r1.5 memmgr.cxx
>--- source/memmgr/memmgr.cxx    15 Oct 2001 18:40:32 -0000      1.5
>+++ source/memmgr/memmgr.cxx    11 Jul 2002 14:25:04 -0000
>@@ -121,7 +121,7 @@
> static std::new_handler volatile g_pfnHandler = 0;
> 
> std::new_handler
>-SAL_CALL std::set_new_handler (std::new_handler pfnHandler) throw ()
>+SAL_CALL std::set_new_handler (std::new_handler pfnHandler) /* was
>throw ()*/
> {
>        std::new_handler f = g_pfnHandler;
>        g_pfnHandler = pfnHandler;
>
>
>But see gcc issue:  
>
>http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00619.html
>
>For the gcc patch.
>
>Kevin
>
>
>On August 6, 2002 10:55, Jan-Hendrik Palic wrote:
>> Hi ..
>> Hi Kevin :)
>>
>> I started to build build OpenOffice.org with gcc-3.2, since the
>> gcc-maintainers of Debian announced, that they are plan to switch to
>> gcc-3.2 as default compiler ....
>>
>> I got this ...
>>
>> g++-3.2 -fsigned-char -fmessage-length=0 -c -I. -I. -I../inc -I../../inc
>> -I../../unx/inc -I../../unxlngppc.pro/inc -I.
>> -I/home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/buil
>>d-tree/oo_1.0.1_src/solver/641/unxlngppc.pro/inc/stl
>> -I/home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/buil
>>d-tree/oo_1.0.1_src/solver/641/unxlngppc.pro/inc/external
>> -I/home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/buil
>>d-tree/oo_1.0.1_src/solver/641/unxlngppc.pro/inc
>> -I/home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/buil
>>d-tree/oo_1.0.1_src/solenv/unxlngppc/inc
>> -I/home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/buil
>>d-tree/oo_1.0.1_src/solenv/inc
>> -I/home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/buil
>>d-tree/oo_1.0.1_src/res -I/usr/include
>> -I/home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/debi
>>an/local/stlport-home/stlport
>> -I/home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/debi
>>an/local/stlport-home/include/stlport
>> -I/home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/debi
>>an/local/stlport-home/include/stlport
>> -I/home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/buil
>>d-tree/oo_1.0.1_src/solenv/inc/Xp31 -I/usr/lib/j2se/1.3/include
>> -I/usr/lib/j2se/1.3/include/linux
>> -I/usr/lib/j2se/1.3/include/native_threads/include -I/usr/X11R6/include
>> -I/usr/lib/gcc-lib/powerpc-linux/3.2/include -I/usr/include     -I.
>> -I../../res -I. -O2 -fno-schedule-insns -fno-strict-aliasing
>> -fno-schedule-insns2   -fsigned-char -pipe -fno-for-scope -fpermissive
>> -fno-rtti -fexceptions -fno-enforce-eh-specs   -fPIC  -DLINUX -DUNX
>> -DVCL -DGCC -DC300 -DPOWERPC -DCVER=C300 -D_USE_NAMESPACE -DGLIBC=2
>> -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1
>> -DSTLPORT_VERSION=400 -DPOWERPC -DPPC -D__DMAKE -DUNIX -DCPPU_ENV=gcc3
>> -DSUPD=641 -DBUILD=7663 -DPRODUCT -DNDEBUG -DPRODUCT_FULL -DOPTIMIZE
>> -DEXCEPTIONS_ON -DCUI -DSOLAR_JAVA -DSRC641  -DMULTITHREAD  -w -o
>> ../../unxlngppc.pro/obj/memmgr.o
>> /home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/build-
>>tree/oo_1.0.1_src/tools/source/memmgr/memmgr.cxx
>> /home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/build-
>>tree/oo_1.0.1_src/tools/source/memmgr/memmgr.cxx: In function `void (*
>> std::set_new_handler(void (*)()))()':
>> /home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/build-
>>tree/oo_1.0.1_src/tools/source/memmgr/memmgr.cxx:126: declaration of
>> `void (* std::set_new_handler(void (*)()))()' throws different
>> exceptions /usr/include/c++/3.2/new:65: than previous declaration `void
>> (* std::set_new_handler(void (*)()) throw ())()'
>> dmake:  Error code 1, while making '../../unxlngppc.pro/obj/memmgr.obj'
>> ---* TG_SLO.MK *---
>>
>> ERROR: Error 65280 occurred while making
>> /home/palic/Files/Projekte/OpenOffice/debian/openoffice.org-1.0.1/build-
>>tree/oo_1.0.1_src/tools/source/memmgr dmake:  Error code 1, while making
>> 'build_all'
>>
>>
>> Any hints
>>
>> 	Regards
>> 		Jan
>

-- 
  .''`.    Jan-Hendrik Palic     |
 : :' : ** Debian GNU/ Linux **  |   ** OpenOffice.org **       ,.. ,..
 `. `'   http://www.debian.org   | http://www.openoffice.org  ,: ..`   `
   `-  jan.palic@linux-debian.de |                           '  `  `

Attachment: pgpwdluuK5Tcs.pgp
Description: PGP signature


Reply to: