gnustep-dev
[Top][All Lists]
Advanced

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

Re: Crash with new-style exceptions on FreeBSD amd64


From: Michael Gardner
Subject: Re: Crash with new-style exceptions on FreeBSD amd64
Date: Wed, 14 Mar 2007 21:51:05 -0500

Thanks for the hint. I played around with my manual compile command,
and found that I can duplicate the crashing behavior of the gmake
build if I do *either* of the following two things:

1) Omit "-fobjc-exceptions" from the command I gave above:

g++41 -I$GNUSTEP_SYSTEM_ROOT/Library/Headers
-L$GNUSTEP_SYSTEM_ROOT/Library/Libraries -lobjc -lgnustep-base -o main
main.m

(same result if I use gcc instead of g++).

2) Split the linking into a separate step, *and* use gcc instead of g++:

gcc41 -c -fobjc-exceptions -I$GNUSTEP_SYSTEM_ROOT/Library/Headers -o
main.o main.m
gcc41 -L$GNUSTEP_SYSTEM_ROOT/Library/Libraries -lobjc -lgnustep-base
-o main main.o

(it doesn't crash if I use g++ instead of gcc, though). In both cases
(1) and (2), I get "Abort trap: 6 (core dumped)" when I run the
program, as with the gmake build. For reference, I've attached the
output of "gmake messages=yes", which does basically the same as (2)
above.

The fact that g++ works while gcc doesn't makes me think there's some
library that's not getting linked somewhere, but wouldn't the linker
yell at me in that case?

-Michael

On 3/14/07, Nicola Pero <address@hidden> wrote:
make messages=yes

will display exactly the command-line commands used to compile and link; you
may
want to try it out and compare those with the ones you use yourself ... that
might
provide some light on what the problem could be. :-)

Thanks



-----Original Message-----
From: Michael Gardner <address@hidden>
Sent: Wed, March 14, 2007 9:46 pm
To: address@hidden
Subject: Crash with new-style exceptions on FreeBSD amd64

I'm having problems using "new-style" exceptions with GNUstep on
FreeBSD 6.2 (amd64). I have the following program (main.m):

#include <Foundation/Foundation.h>
int main(int argc, char ** argv) {
        @try {
                @throw nil;
        } @catch (id thing) {
                printf("caught!\n");
        }
}

which runs file when I compile it with:

g++41 -fobjc-exceptions -I$GNUSTEP_SYSTEM_ROOT/Library/Headers
-L$GNUSTEP_SYSTEM_ROOT/Library/Libraries -lobjc -lgnustep-base -o main
main.m

but crashes with an "Abort trap: 6 (core dumped)" when I compile it
using gmake. I tried to run it under GDB, but all I get is this:

warning: Unable to get location for thread creation breakpoint: generic
error
[New LWP 100171]
Program terminated with signal SIGABRT, Aborted.
The program no longer exists.

I'm running the following versions of the GNUstep libraries (compiled
from ports):

gnustep-back-0.11.0
gnustep-base-1.13.1
gnustep-gui-0.11.0
gnustep-make-1.13.0_4

Any ideas or suggestions?

-Michael


_______________________________________________
Gnustep-dev mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/gnustep-dev


Attachment: gmake.out
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]