bugGNUstep - Bugs: bug #25033, compilation of gnustep-gui-0.14.0...

Group
 
 

bug #25033: compilation of gnustep-gui-0.14.0 fails on openbsd 4.4 sparc

Submitter:  Sebastian Reitenbach <buzzdee>
Submitted:  Sun 07 Dec 2008 05:29:15 PM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 16 Jun 2010 08:09:57 AM UTC, comment #20: 

I'm closing this since it's years old, refers to an old version of gnustep, and appears to be due to a old compiler failing to set up the constant string class anyway.
However, I have changed the configure script in svn trunk to abort if the compiler is unable to set the constant string class ... which should get people to use a more modern compiler.

Richard Frith-Macdonald <CaS>
Group Member
Sat 19 Sep 2009 11:55:59 AM UTC, comment #19: 

I think I'll only have time to try again in November, then on OpenBSD 4.6, but I guess its still the same.

Sebastian Reitenbach <buzzdee>
Group Member
Fri 18 Sep 2009 08:43:48 PM UTC, comment #18: 

in the old days this appears to have been dependent on the link order of the libobjc and gnustep-base which differs between shared libraries and static libraries, seems it was discussed here

http://gcc.gnu.org/ml/gcc/2000-05/msg00373.html

matt rice <ratmice>
Group Member
Fri 18 Sep 2009 08:10:26 PM UTC, comment #17: 

How is this today?
I can compile on OpenBSD/sparc32 4.1 although afterwards running any base program will fail.

Riccardo Mottola <rmottola>
Group Member
Wed 25 Feb 2009 06:24:47 AM UTC, comment #16: 

Actually my suggestion is not so great after all.  Merely haven NXConstantString categories would still break the class hierarchy.

I'm not sure how gnustep's constant strings worked with compilers prior to -fconstant-string-class.  I.e. how we can unsure the runtime will always use our:
NXConstantString : NSString : NSObject

instead of libobjc's
NXConstantString : Object

Maybe we should try to "adjust" the runtime structures during +load of our NXConstantString class.  I'm not sure exactly how to do that (especially efficiently [i.e. without iterating of all known classes to find both versions of NXConstantString for every GNUstep process]).

Maybe someone else has a better suggestion, or know more about how/whether this worked with compilers prior to -fconstant-string-class.

David Ayers <ayers>
Group Member
Sun 22 Feb 2009 01:36:15 PM UTC, comment #15: 

Indeed... it seems for such old compilers/runtimes we have our own implementation of NXConstantString in -base Source/GSString.m.  Now what's unclear is since libobjc also implements an NXConstantString class, which one will be used be the runtime.  And I suppose your initial error was due to this confusion.

I would suggest that we extract most of our NXConstantString implementations into categories which we always compile, where as we only compile an NXConstantString class which merely implements cString and length, if libobjc does not provide one.

David Ayers <ayers>
Group Member
Sun 22 Feb 2009 12:29:06 PM UTC, comment #14: 

Indeed, this parameter: -fconstant-string-class=NSConstantString is not used, but I guess intentional. when I add it, I get this error:

gmake messages=yes
This is gnustep-make 2.0.8. Type 'make print-gnustep-make-help' for help.
Making all in Source...
gmake[1]: Entering directory `/usr/local/src/gnustep-base/Source'
Making all in subprojects of library libgnustep-base...
gmake[2]: Entering directory `/usr/local/src/gnustep-base/Source/Additions'
Making all for subproject Additions...
cd .; \
        /usr/GNUstep/System/Library/Makefiles/mkinstalldirs ./obj
gcc GSCategories.m -c \
              -Wall -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -D_REENTRANT -fPIC -g -Wall -DDEBUG -fno-omit-frame-pointer -DGSWARN -DGSDIAGNOSE -Wno-import -g -fno-strict-aliasing -fgnu-runtime -fconstant-string-class=NSConstantString -I../../Headers/Additions -I../. -I../ -I../../Headers -I. -I/usr/local/include -I/usr/GNUstep/System/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/root/GNUstep/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers \
               -o obj/GSCategories.m.o
cc1obj: Invalid option `-fconstant-string-class=NSConstantString'
gmake[3]: * [obj/GSCategories.m.o] Error 1
gmake[2]: * [Additions.all.subproject.variables] Error 2
gmake[2]: Leaving directory `/usr/local/src/gnustep-base/Source/Additions'
gmake[1]: * [libgnustep-base.all.library.variables] Error 2
gmake[1]: Leaving directory `/usr/local/src/gnustep-base/Source'
gmake: * [internal-all] Error 2

I'm on openbsd 4.4, sparc
gcc -v
Reading specs from /usr/lib/gcc-lib/sparc-unknown-openbsd4.4/2.95.3/specs
gcc version 2.95.3 20010125 (prerelease, propolice)

Sebastian Reitenbach <buzzdee>
Group Member
Sat 21 Feb 2009 05:18:11 PM UTC, comment #13: 


> Starting program: /usr/GNUstep/Local/Tools/defaults
> error: NXConstantString (instance)
> NXConstantString does not recognize copyWithZone:


NXConstantString is a class from libobj which inherits from Object and merely implements cString and length.  copyWithZone: is a method from OpenStep/GNUstep/Cocoa.

Generally -make should supply
-fconstant-string-class=NSConstantString
which should replace the references in the isa/class_pointers to NXConstantString with NSConstantString for the strings embedded in the source code.

Could you check if -make is passing that flag with:
make messages=yes

You should see something like:
 gcc EODisplayGroup.m -c \
      -MMD -MP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_RUNTIME=1 -g -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -D_REENTRANT -fPIC -g -Wall -DDEBUG -fno-omit-frame-pointer -DGSWARN -DGSDIAGNOSE -Wno-import -g -fno-strict-aliasing -fgnu-runtime

-fconstant-string-class=NSConstantString

 -I../EOControl/. -I.. -I. -I/home/ayers/GNUstep/Library/Headers -I/usr/GNUstep/Local/Library/Headers -I/usr/GNUstep/System/Library/Headers \
       -o obj/EODisplayGroup.o

David Ayers <ayers>
Group Member
Sat 21 Feb 2009 04:57:35 PM UTC, comment #12: 

I rm -rf /usr/GNUstep, then checked out -make and -base from trunk,
and reinstalled.
It still segfaults here, no matter I link against libffi or ffcall.
The backtrace now is different, below, linked against ffcall.

I installed this way:
cd gnustep-make
./configure --disable-libffi --enable-ffcall
gmake install
cd ../gnustep-base
gmake && gmake install


gdb defaults
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-unknown-openbsd4.4"...
(gdb) r
Starting program: /usr/GNUstep/Local/Tools/defaults
error: NXConstantString (instance)
NXConstantString does not recognize copyWithZone:

Program received signal SIGABRT, Aborted.
abort () at /usr/src/lib/libc/stdlib/abort.c:74
74      /usr/src/lib/libc/stdlib/abort.c: No such file or directory.
        in /usr/src/lib/libc/stdlib/abort.c
(gdb) bt
#0  abort () at /usr/src/lib/libc/stdlib/abort.c:74
#1  0x0d7989c4 in objc_verror (object=0x1204d1a4, code=-134350360,
    fmt=0xf7fdfa98 "\r\211 \220\v\205zÀ", ap=0xf7fdfa98 "\r\211 \220\v\205zÀ")
    at /usr/src/gnu/lib/libobjc/libobjc/misc.c:68
#2  0x0d78dc2c in -[Object error:] (self=0x1204d1a4, _cmd=0xd99a7b8,
    aString=0xd898d10 "%s does not recognize %s") at /usr/src/gnu/lib/libobjc/libobjc/Object.m:335
#3  0x0d78dae0 in -[Object doesNotRecognize:] (self=0x1204d1a4, _cmd=0xd99a790, aSel=0x120264d8)
    at /usr/src/gnu/lib/libobjc/libobjc/Object.m:321
#4  0x0d78d824 in -[Object forward::] (self=0x1204d1a4, _cmd=0x87f95f0, aSel=0x120264d8,
    argFrame=0xf7fdfbf8) at /usr/src/gnu/lib/libobjc/libobjc/Object.m:275
#5  0x0d792fd8 in __objc_forward (object=0x1204d1a4, sel=0x120264d8, args=0xf7fdfbf8)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:588
#6  0x0d792ce0 in __objc_word_forward (rcv=0x1204d1a4, op=0x120264d8)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:528
#7  0x11b27788 in -[NSNotificationCenter addObserver:selector:name:object:] (self=0xc104128,
    _cmd=0x12053150, observer=0xf1293e8, selector=0x12053148, name=0x1204d1a4, object=0x0)
    at NSNotificationCenter.m:780
#8  0x11c86464 in -[GSLazyRecursiveLock init] (self=0xf1293e8, _cmd=0x12029bfc) at GSLock.m:252
#9  0x11b401d8 in +[NSObject new] (self=0x12052ef0, _cmd=0x120514fc) at NSObject.m:1301
#10 0x11c7645c in +[_GSLockInitializer initialize] (self=0x12050dec, _cmd=0x1204cb58)
    at GSCategories.m:1463
#11 0x0d792958 in __objc_send_initialize (class=0x12050dec)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:324
#12 0x0d7927b4 in __objc_init_install_dtable (receiver=0x12050dec, op=0x1205150c)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:266
#13 0x0d7935d8 in objc_msg_lookup (receiver=0x12050dec, op=0x1205150c)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:184
#14 0x11c76d98 in newLockAt (self=0x12052fd8, _cmd=0x120659b8, location=0x120655f4)
    at GSCategories.m:1483
#15 0x11c7648c in +[NSLock(GSCategories) newLockAt:] (self=0x12052fd8, _cmd=0x120659b8,
    location=0x120655f4) at GSCategories.m:1503
#16 0x11cc8160 in GSSetupEncodingTable () at Unicode.m:280
#17 0x11ccdd00 in GSPrivateDefaultCStringEncoding () at Unicode.m:2079
#18 0x11bcd340 in +[NSString initialize] (self=0x1203b804, _cmd=0x1204cb58) at NSString.m:582
#19 0x0d792958 in __objc_send_initialize (class=0x1203b804)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:324
#20 0x0d7927b4 in __objc_init_install_dtable (receiver=0x1203b804, op=0x12029bcc)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:266
#21 0x0d7935d8 in objc_msg_lookup (receiver=0x1203b804, op=0x12029bcc)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:184
#22 0x11b3ff60 in +[NSObject initialize] (self=0x12029ae8, _cmd=0x1204cb58) at NSObject.m:1166
#23 0x0d792958 in __objc_send_initialize (class=0x12029ae8)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:324
#24 0x0d7928a4 in __objc_send_initialize (class=0x1201c68c)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:297
#25 0x0d7927b4 in __objc_init_install_dtable (receiver=0x1201c68c, op=0x12050960)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:266
#26 0x0d7935d8 in objc_msg_lookup (receiver=0x1201c68c, op=0x12050960)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:184
#27 0x11c6fe4c in GSIMapSetup () at ../Headers/Additions/GNUstepBase/GSIMap.h:956
#28 0x11c6f62c in GSIMapInitWithZoneAndCapacity (map=0x12471ac4, zone=0x1204c61c, capacity=9)
    at ../Headers/Additions/GNUstepBase/GSIMap.h:964
#29 0x11c6ae70 in +[GSFFCallInvocation load] (self=0x12050928, _cmd=0x87f8e00)
---Type <return> to continue, or q <return> to quit---
    at GSFFCallInvocation.m:522
#30 0x0d794428 in __objc_send_message_in_list (method_list=0x120508a4, class=0x12050928, op=0xb856e30)
    at /usr/src/gnu/lib/libobjc/libobjc/init.c:335
#31 0x0d794490 in __objc_send_load (tree=0x12050928, level=2)
    at /usr/src/gnu/lib/libobjc/libobjc/init.c:353
#32 0x0d7942fc in objc_preorder_traverse (tree=0x9567da0, level=2,
    function=0xd794448 <__objc_send_load>) at /usr/src/gnu/lib/libobjc/libobjc/init.c:271
#33 0x0d794310 in objc_preorder_traverse (tree=0x9567ee0, level=1,
    function=0xd794448 <__objc_send_load>) at /usr/src/gnu/lib/libobjc/libobjc/init.c:273
#34 0x0d794310 in objc_preorder_traverse (tree=0x9567d30, level=0,
    function=0xd794448 <__objc_send_load>) at /usr/src/gnu/lib/libobjc/libobjc/init.c:273
#35 0x0d794bcc in objc_send_load () at /usr/src/gnu/lib/libobjc/libobjc/init.c:712
#36 0x0d794a80 in __objc_exec_class (module=0x12066d54) at /usr/src/gnu/lib/libobjc/libobjc/init.c:658
#37 0x11cd5b2c in GLOBAL.I.NSStream.mZRdYAb () at NSStream.m:614
#38 0x1199fcf0 in ?? () from /usr/GNUstep/Local/Library/Libraries/libgnustep-base.so.1.19
#39 0x1199fcf0 in ?? () from /usr/GNUstep/Local/Library/Libraries/libgnustep-base.so.1.19
Previous frame identical to this frame (corrupt stack?)
(gdb)

/usr/GNUstep/Local/Tools/defaults:
        Start    End      Type Open Ref GrpRef Name
        00010000 00619000 exe  1    0   0      /usr/GNUstep/Local/Tools/defaults
        0ba98000 0c68a000 rlib 0    1   0      /usr/GNUstep/Local/Library/Libraries/libgnustep-base.so.1.19
        102c4000 108e0000 rlib 0    2   0      /usr/lib/libpthread.so.11.0
        128e4000 12ef9000 rlib 0    2   0      /usr/lib/libobjc.so.4.0
        0cf0c000 0d547000 rlib 0    2   0      /usr/local/lib/libgmp.so.7.1
        0eab8000 0f164000 rlib 0    2   0      /usr/local/lib/libgnutls.so.14.0
        0c7fc000 0ce0c000 rlib 0    3   0      /usr/local/lib/libtasn1.so.1.0
        09180000 097d2000 rlib 0    3   0      /usr/local/lib/libgcrypt.so.13.0
        0df34000 0e537000 rlib 0    4   0      /usr/local/lib/libgpg-error.so.2.0
        0d928000 0df32000 rlib 0    5   0      /usr/local/lib/libintl.so.4.0
        108e0000 10fdc000 rlib 0    7   0      /usr/local/lib/libiconv.so.5.0
        0fc84000 102bf000 rlib 0    2   0      /usr/local/lib/libxslt.so.3.7
        0ae30000 0b57b000 rlib 0    3   0      /usr/local/lib/libxml2.so.10.0
        0f670000 0fc82000 rlib 0    5   0      /usr/lib/libz.so.4.1
        10fdc000 11614000 rlib 0    4   0      /usr/lib/libm.so.3.0
        11614000 11c16000 rlib 0    2   0      /usr/local/lib/libcallback.so.1.0
        11c18000 12219000 rlib 0    2   0      /usr/local/lib/libavcall.so.1.0
        097d4000 09df8000 rlib 0    2   0      /usr/lib/libiberty.so.9.0
        1221c000 128e2000 rlib 0    1   0      /usr/lib/libc.so.48.0
        0a820000 0a820000 rtld 0    1   0      /usr/libexec/ld.so


however, when linking any part of base, regardless of whether linked against libffi or ffcall, I noticed the following linker warnings:

 Compiling file SourceEntry.m ...
 Compiling file StringsEntry.m ...
 Compiling file StringsFile.m ...
 Linking tool make_strings ...
/usr/local/lib/libgmp.so.7.1: warning: vsprintf() is often misused, please use vsnprintf()
../../Source/./obj/libgnustep-base.so.1.19: warning: strcpy() is almost always misused, please use strlcpy()
../../Source/./obj/libgnustep-base.so.1.19: warning: sprintf() is often misused, please use snprintf()
../../Source/./obj/libgnustep-base.so.1.19: warning: strcat() is almost always misused, please use strlcat()
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NSDate' are not defined
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NSMutableString' are not defined
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NSString' are not defined
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NSFileManager' are not defined
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NSMutableArray' are not defined
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NSObject' are not defined
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NSMutableDictionary' are not defined
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NXConstantString' are not defined
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NSAutoreleasePool' are not defined
Making all in NSTimeZones...
gmake[1]: Nothing to be done for `all'.
Making all in Resources...
gmake[1]: Nothing to be done for `all'.

Sebastian Reitenbach <buzzdee>
Group Member
Fri 20 Feb 2009 10:23:33 PM UTC, comment #11: 

current SVN trunk compiles fine on OpenBSD/sparc with gcc 2.95 and runs fine... could you try with a clean setup and svn trunk?

Riccardo Mottola <rmottola>
Group Member
Mon 16 Feb 2009 11:10:03 PM UTC, comment #10: 

I do use gcc 2.95 since "ever" on OpenBSD and it works. I am recompiling right now.

Riccardo Mottola <rmottola>
Group Member
Thu 11 Dec 2008 06:32:44 AM UTC, comment #9: 

I also ran the libffi testsuite, and posted the output to libffi-discuss. Nearly all tests were failing, because the testsuite was unable to create working binaries, because of the very old compiler.
As it doesn't seem that they care about to fix it, make it gcc-2.95.3 compatible, I'll try to install gcc-4.3, and recompile everything with that one.

Sebastian Reitenbach <buzzdee>
Group Member
Wed 10 Dec 2008 07:23:53 PM UTC, comment #8: 

I ran the base tests from the testsuite, logfile attached.

(file #17021)

Sebastian Reitenbach <buzzdee>
Group Member
Wed 10 Dec 2008 08:03:45 AM UTC, comment #7: 

I would guess that:
[format getCharacters: fmt range: ((NSRange){0, len})]
may not be that portable.  I think using NSMakeRange(0,len) would be the cleaner approach.  Yet that might not yet solve the issue. 

Just to verify, could you attach the results from running:
http://svn.gna.org/viewcvs/gnustep/tests/testsuite/trunk/
in particular
http://svn.gna.org/viewcvs/gnustep/tests/testsuite/trunk/base/NSProxy/test01.m?rev=27274&view=auto

The important result is the "Proxy NSRange" test.

David Ayers <ayers>
Group Member
Tue 09 Dec 2008 11:40:08 AM UTC, comment #6: 

I compiled -base 1.16.5 linked against ffcall on the sparc, now the defaults tool crashes this way:

# gdb /usr/local/bin/defaults
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-unknown-openbsd4.4"...
(gdb) r
Starting program: /usr/local/bin/defaults

Program received signal SIGSEGV, Segmentation fault.
0x0a587dd4 in -[NSString initWithFormat:locale:arguments:] (self=0xf77ff9e8, _cmd=0xf77ff9e8, format=0xf77ff9e8, locale=0xf77ff9e8,
    argList=0xf77ff9e8 <Address 0xf77ff9e8 out of bounds>) at NSString.m:1100
1100      [format getCharacters: fmt range: ((NSRange){0, len})];
Current language:  auto; currently objective-c
(gdb) bt
#0  0x0a587dd4 in -[NSString initWithFormat:locale:arguments:] (self=0xf77ff9e8, _cmd=0xf77ff9e8, format=0xf77ff9e8, locale=0xf77ff9e8,
    argList=0xf77ff9e8 <Address 0xf77ff9e8 out of bounds>) at NSString.m:1100
#1  0xc8d412d5 in ?? ()
#2  0xc8d412d5 in ?? ()
Previous frame identical to this frame (corrupt stack?)

I took a look into the netbsd patches, and added the two patches regarding sparc 32 systems to the list of patches to be used for openbsd sparc when creating the port, ffcall-1.10.

Sebastian Reitenbach <buzzdee>
Group Member
Mon 08 Dec 2008 01:47:10 PM UTC, comment #5: 

Changed into a base issue.

Fred Kiefer <FredKiefer>
Group Member
Mon 08 Dec 2008 10:05:01 AM UTC, comment #4: 

The -base and -gui sources installed are from -stable, and in frame #8, the following is there:

(gdb) list NSNotificationCenter.m:714
709               m = mapNew(TABLE);
710               /*
711                * As this is the first observation for the given name, we take a
712                * copy of the name so it cannot be mutated while in the map.
713                */
714               name = [name copyWithZone: NSDefaultMallocZone()];
715               GSIMapAddPair(NAMED, (GSIMapKey)(id)name, (GSIMapVal)(void*)m);
716             }
717           else
718             {
(gdb) print name
$1 = (class NSString *) 0xb0967ec
(gdb) po name

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on"
Evaluation of the expression containing the function (_NSPrintForDebugger) will be abandoned.


I'll step through the method, when I'm back from work later today.

Sebastian Reitenbach <buzzdee>
Group Member
Mon 08 Dec 2008 08:03:08 AM UTC, comment #3: 

Well it looks like something is seriously messed up in [NSNotificationCenter addObserver:selector:name:object:] as (assuming the line number reports in the traceback match current svn) things are going wrong when it tries to copy the name, which should be a constant string.

Try running under gdb, setting a breakpoint in  -[GSLazyRecursiveLock init], and examining the notification name as you step into the addObserver... method and step through it.  I guess at some point it gets corrupted somehow, since I can't see why the runtime should be calling the forwarding methods when trying to copy a constant string.

Richard Frith-Macdonald <CaS>
Group Member
Sun 07 Dec 2008 10:22:47 PM UTC, comment #2: 

It seems to be there is a more general problem in -base, as the defaults program also fails in a similar way:

# gdb /usr/local/bin/defaults
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-unknown-openbsd4.4"...
(gdb) r read
Starting program: /usr/local/bin/defaults read

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x0b65b4f4 in +[NSAutoreleasePool new] (self=0xbb1c940, _cmd=0xbb1c9e8) at NSAutoreleasePool.m:144
#2  0x0b65b7ac in +[NSAutoreleasePool addObject:] (self=0xbb1c978, _cmd=0xbb3db14, anObj=0xae74da8)
    at NSAutoreleasePool.m:248
#3  0x0b70b1c8 in -[NSObject autorelease] (self=0xae74da8, _cmd=0xbb39af8) at NSObject.m:1823
#4  0x0b6f8548 in +[NSMethodSignature signatureWithObjCTypes:] (self=0x0, _cmd=0xbb6200c,
    t=0xb9d5810 "@0@+8:+12^{?=^?^?^?^?^?^?^?I@^{?}}+16") at NSMethodSignature.m:49
#5  0x0b7b32bc in gs_objc_msg_forward2 (receiver=0x0, sel=0xbb3a448) at GSFFIInvocation.m:165
#6  0x0b7b35fc in gs_objc_msg_forward (sel=0xbb3a448) at GSFFIInvocation.m:209
#7  0x0e6c3690 in objc_msg_lookup (receiver=0xe8caa3c, op=0xbb3a448)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:91
#8  0x0b6faf78 in -[NSNotificationCenter addObserver:selector:name:object:] (self=0x93bd888, _cmd=0xbb64664,
    observer=0xae74808, selector=0xbb6465c, name=0xbb5e7ec, object=0x0) at NSNotificationCenter.m:714
#9  0x0b7c1990 in -[GSLazyRecursiveLock init] (self=0xae74808, _cmd=0xbb3db54) at GSLock.m:252
#10 0x0b70a1e0 in +[NSObject new] (self=0xbb64404, _cmd=0xbb62ab0) at NSObject.m:1301
#11 0x0b7b836c in +[_GSLockInitializer initialize] (self=0xbb623a0, _cmd=0xbb5e1a0) at GSCategories.m:1463
#12 0x0e6c2958 in __objc_send_initialize (class=0xbb623a0) at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:324
#13 0x0e6c27b4 in __objc_init_install_dtable (receiver=0xbb623a0, op=0xbb62ac0)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:266
#14 0x0e6c35d8 in objc_msg_lookup (receiver=0xbb623a0, op=0xbb62ac0)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:184
#15 0x0b7b8444 in +[NSLock(GSCategories) newLockAt:] (self=0xbb644ec, _cmd=0xbb7622c, location=0xbb75e68)
    at GSCategories.m:1483
#16 0x0b7e6720 in GSSetupEncodingTable () at Unicode.m:280
#17 0x0b7e959c in GSPrivateDefaultCStringEncoding () at Unicode.m:2079
#18 0x0b75fdcc in +[NSString initialize] (self=0xbb4e774, _cmd=0xbb5e1a0) at NSString.m:577
#19 0x0e6c2958 in __objc_send_initialize (class=0xbb4e774) at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:324
#20 0x0e6c27b4 in __objc_init_install_dtable (receiver=0xbb4e774, op=0xbb3db24)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:266
#21 0x0e6c35d8 in objc_msg_lookup (receiver=0xbb4e774, op=0xbb3db24)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:184
#22 0x0b709f08 in +[NSObject initialize] (self=0xbb3da40, _cmd=0xbb5e1a0) at NSObject.m:1166
#23 0x0e6c2958 in __objc_send_initialize (class=0xbb3da40) at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:324
#24 0x0e6c28a4 in __objc_send_initialize (class=0xbb1c940) at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:297
#25 0x0e6c27b4 in __objc_init_install_dtable (receiver=0xbb1c940, op=0xbb45228)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:266
#26 0x0e6c35d8 in objc_msg_lookup (receiver=0xbb1c940, op=0xbb45228)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:184
#27 0x0b7327c0 in _gnu_process_args (argc=2, argv=0xf7ff05dc, env=0xf7ff05e8) at NSProcessInfo.m:231
#28 0x0b732e78 in main (argc=2, argv=0xf7ff05dc, env=0xf7ff05e8) at NSProcessInfo.m:910
#29 0x00010cc0 in ___start ()
#30 0x00010bec in _start ()
#31 0x00010bec in _start ()
Previous frame identical to this frame (corrupt stack?)
(gdb)                                                                   

however, it works well on openbsd 4.3, sparc64 and openbsd 4.4, i386.

Sebastian Reitenbach <buzzdee>
Group Member
Sun 07 Dec 2008 05:39:14 PM UTC, comment #1: 

gnustep-base-1.16.5
gcc-2.95.3

Sebastian Reitenbach <buzzdee>
Group Member
Sun 07 Dec 2008 05:29:15 PM UTC, original submission:  

trying to compile gnustep-gui on openbsd 4.4 sparc, fails when making services for GSspell:

Making all for service GSspell...
/usr/local/share/GNUstep/Makefiles/mkinstalldirs ./GSspell.service/.
cc GSspell.m -c \
              -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRAR
Y=1 -D_REENTRANT -fPIC -g -Wall -DDEBUG -fno-omit-frame-pointer -DGSWARN -DGSDIAGNOSE -Wno-import -O2 -pip
e -fno-strict-aliasing -fgnu-runtime -I/usr/local/include/libpng -I../Headers/Additions -I../Headers -I../
Source/. -I. -I/usr/local/include -I/gnustep-gui-0.14.0_writes_to_HOME/GNUstep/Library/Headers -I/usr/loca
l/include \
               -o obj/GSspell.o
GSspell.m: In function `-[GNUSpellChecker spellServer:findMisspelledWordInString:language:wordCount:countO
nly:]':
GSspell.m:83: warning: value computed is not used
cc  -Wl,-E       -fgnu-runtime -o GSspell.service/./GSspell \
        ./obj/GSspell.o   -L/usr/local/lib -lstdc++ -lm    -L../Source/./obj -L../Model/./obj    -L/gnuste
p-gui-0.14.0_writes_to_HOME/GNUstep/Library/Libraries -L/usr/local/lib  -L/usr/local/lib   -lgnustep-gui -
laudiofile -laspell -lungif -lpng -ltiff -lz -ljpeg -lm   -lgnustep-base   -pthread -lobjc   -lm
/usr/local/lib/libungif.so.5.4: warning: vsprintf() is often misused, please use vsnprintf()
/usr/local/lib/libaudiofile.so.0.2: warning: strcpy() is almost always misused, please use strlcpy()
/usr/local/lib/libaudiofile.so.0.2: warning: sprintf() is often misused, please use snprintf()
/usr/local/lib/libaspell.so.16.0: warning: strcat() is almost always misused, please use strlcat()
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NSString' are not defined
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NSSpellServer' are not defined
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NSCharacterSet' are not defined
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NSScanner' are not defined
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NSMutableArray' are not defined
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NSObject' are not defined
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NXConstantString' are not defined
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NSAutoreleasePool' are not define
d
/usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_NSData' are not defined
/usr/local/share/GNUstep/Makefiles/mkinstalldirs GSspell.service/Resources
(echo "{"; echo '  NOTE = "Automatically generated, do not edit!";'; \
          echo "  NSExecutable = \"GSspell\";"; \
          if [ -r "GSspellInfo.plist" ]; then \
            cat GSspellInfo.plist; \
          fi; \
          echo "}") >GSspell.service/Resources/Info-gnustep.plist ;\
        if ././obj/make_services --test GSspell.service/Resources/Info-gnustep.plist; then : ; else rm -f
GSspell.service/Resources/Info-gnustep.plist; false; \
        fi
Segmentation fault (core dumped)
gmake[2]: * [GSspell.service/Resources/Info-gnustep.plist] Error 1
gmake[1]: * [GSspell.all.service.variables] Error 2
gmake[1]: Leaving directory `/usr/ports/x11/gnustep/gui/w-gnustep-gui-0.14.0/gnustep-gui-0.14.0/Tools'
gmake: * [internal-all] Error 2
* Error code 2


running make_services in gdb, produces the following backtrace:
# gdb ./w-gnustep-gui-0.14.0/gnustep-gui-0.14.0/Tools/obj/make_services
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-unknown-openbsd4.4"...
(gdb) r
Starting program: /usr/ports/x11/gnustep/gui/w-gnustep-gui-0.14.0/gnustep-gui-0.14.0/Tools/obj/make_servic
es

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x0ae934f4 in +[NSAutoreleasePool new] (self=0xb354940, _cmd=0xb3549e8) at NSAutoreleasePool.m:144
#2  0x0ae937ac in +[NSAutoreleasePool addObject:] (self=0xb354978, _cmd=0xb375b14, anObj=0xab58d28)
    at NSAutoreleasePool.m:248
#3  0x0af431c8 in -[NSObject autorelease] (self=0xab58d28, _cmd=0xb371af8) at NSObject.m:1823
#4  0x0af30548 in +[NSMethodSignature signatureWithObjCTypes:] (self=0x0, _cmd=0xb39a00c,
    t=0xb20d810 "@0@+8:+12^{?=^?^?^?^?^?^?^?I@^{?}}+16") at NSMethodSignature.m:49
#5  0x0afeb2bc in gs_objc_msg_forward2 (receiver=0x0, sel=0xb372448) at GSFFIInvocation.m:165
#6  0x0afeb5fc in gs_objc_msg_forward (sel=0xb372448) at GSFFIInvocation.m:209
#7  0x10407690 in objc_msg_lookup (receiver=0x1060ea3c, op=0xb372448)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:91
#8  0x0af32f78 in -[NSNotificationCenter addObserver:selector:name:object:] (self=0x8fe01f8,
    _cmd=0xb39c664, observer=0xab58c08, selector=0xb39c65c, name=0xb3967ec, object=0x0)
    at NSNotificationCenter.m:714
#9  0x0aff9990 in -[GSLazyRecursiveLock init] (self=0xab58c08, _cmd=0xb375b54) at GSLock.m:252
#10 0x0af421e0 in +[NSObject new] (self=0xb39c404, _cmd=0xb39aab0) at NSObject.m:1301
#11 0x0aff036c in +[_GSLockInitializer initialize] (self=0xb39a3a0, _cmd=0xb3961a0)
    at GSCategories.m:1463
#12 0x10406958 in __objc_send_initialize (class=0xb39a3a0)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:324
#13 0x104067b4 in __objc_init_install_dtable (receiver=0xb39a3a0, op=0xb39aac0)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:266
#14 0x104075d8 in objc_msg_lookup (receiver=0xb39a3a0, op=0xb39aac0)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:184
#15 0x0aff0444 in +[NSLock(GSCategories) newLockAt:] (self=0xb39c4ec, _cmd=0xb3ae22c, location=0xb3ade68)
    at GSCategories.m:1483
#16 0x0b01e720 in GSSetupEncodingTable () at Unicode.m:280
#17 0x0b02159c in GSPrivateDefaultCStringEncoding () at Unicode.m:2079
#18 0x0af97dcc in +[NSString initialize] (self=0xb386774, _cmd=0xb3961a0) at NSString.m:577
#19 0x10406958 in __objc_send_initialize (class=0xb386774)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:324
#20 0x104067b4 in __objc_init_install_dtable (receiver=0xb386774, op=0xb375b24)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:266
#21 0x104075d8 in objc_msg_lookup (receiver=0xb386774, op=0xb375b24)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:184
#22 0x0af41f08 in +[NSObject initialize] (self=0xb375a40, _cmd=0xb3961a0) at NSObject.m:1166
#23 0x10406958 in __objc_send_initialize (class=0xb375a40)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:324
#24 0x104068a4 in __objc_send_initialize (class=0xb354940)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:297
#25 0x104067b4 in __objc_init_install_dtable (receiver=0xb354940, op=0xb37d228)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:266
#26 0x104075d8 in objc_msg_lookup (receiver=0xb354940, op=0xb37d228)
    at /usr/src/gnu/lib/libobjc/libobjc/sendmsg.c:184
#27 0x0af6a7c0 in _gnu_process_args (argc=1, argv=0xf7fcf8ec, env=0xf7fcf8f4) at NSProcessInfo.m:231
#28 0x0af6ae78 in main (argc=1, argv=0xf7fcf8ec, env=0xf7fcf8f4) at NSProcessInfo.m:910
#29 0x00010bbc in ___start ()
#30 0x00010ae8 in _start ()
---Type <return> to continue, or q <return> to quit---
#31 0x00010ae8 in _start ()
Previous frame identical to this frame (corrupt stack?)
(gdb) The program is running.  Exit anyway? (y or n) y

gnustep-base linked against libffi-3.0.7,

Sebastian Reitenbach <buzzdee>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #17021:  tests.log added by buzzdee (59KiB - text/x-log)

 

Carbon-Copy List
  • -email is unavailable- added by ratmice (Posted a comment)
  • -email is unavailable- added by rmottola (Posted a comment)
  • -email is unavailable- added by ayers (Posted a comment)
  • -email is unavailable- added by FredKiefer (Posted a comment)
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by buzzdee (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-06-16 CaS Open/ClosedOpen Closed
    2008-12-15 FredKiefer Dependencies- bugs #25040 is dependent
    2008-12-13 FredKiefer Dependencies- bugs #25037 is dependent
    2008-12-10 buzzdee Attached File- Added tests.log, #17021
    2008-12-08 FredKiefer CategoryGui/AppKit Base/Foundation

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code