gnustep-dev
[Top][All Lists]
Advanced

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

Re: building libobjc2 fPIC issue and ccmake . effectiveness


From: Riccardo Mottola
Subject: Re: building libobjc2 fPIC issue and ccmake . effectiveness
Date: Sat, 30 May 2020 23:51:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

Hi David,

thanks for the help. Got a little further, but not enough.

On 5/29/20 2:00 PM, David Chisnall wrote:

We shouldn't be linking libsupc++.a into libobjc.so.  It sounds as if NetBSD ships a separate C++ runtime library for static linking, but not for dynamic linking.  You can work around this by explicitly setting libstdc++ as your C++ runtime library in the libobjc2 cmake config.

The correct fix it so tweak the C++ runtime library check in CMake so that it looks only for dynamic


I have libstdc++.so and libstdc++.a available, and libsupc++.a

so I use ccmake. and set

CXX_RUNTIME_LIB to /usr/lib/libstdc++.so

then I run (c)onfigure and (g)enerate - at that point libobjc2 fully built and installed.

I was able to reconfigure make, install base with success, but gui fails.


Well, even something as easy as plparse coredumps.

crossbar$ plparse
[1]   Segmentation fault (core dumped) plparse


#0  0x00007ed0cbf45c5d in __vfprintf_unlocked_l () from /usr/lib/libc.so.12
#1  0x00007ed0cbf43c1d in vsnprintf_l () from /usr/lib/libc.so.12
#2  0x00007ed0cbf43d11 in snprintf () from /usr/lib/libc.so.12
#3  0x00007ed0cd254244 in -[NSMethodSignature _initWithObjCTypes:] (
    self=<optimized out>, _cmd=<optimized out>, t=<optimized out>)
    at NSMethodSignature.m:539
#4  0x00007ed0cd254391 in +[NSMethodSignature signatureWithObjCTypes:] (
    self=<optimized out>, _cmd=<optimized out>, t=0x7ed0cd40bc4c "%d")
    at NSMethodSignature.m:559
#5  0x00007ed0cd2ff2da in gs_objc_msg_forward2 (
    receiver=0x7ed0cd6f9430 <._OBJC_CLASS_NSString>,
    sel=0x7ed0cd73e788 <.objc_selector_stringWithFormat:arguments:_320:816[1{__va_list_tag=II^v^v}]24>) at GSFFIInvocation.m:140
#6  0x00007ed0ccc20639 in slowMsgLookup ()
   from /System/Library/Libraries/libobjc.so.4.6
#7  0x00007ed0ccc25ef0 in objc_msgSend_fpret ()
   from /System/Library/Libraries/libobjc.so.4.6
#8  0x00007ed0cd21f696 in +[NSException raise:format:arguments:] (
    self=0x7ed0cd6d1d58 <._OBJC_CLASS_NSException>, _cmd=<optimized out>,
    name=0x7ed0cd7271a8 <.objc_str_NSInvalidArgumentException>,
    format=0x7ed0cd40bc4c, argList=0x7f7fffb6aa48) at NSException.m:1463
#9  0x00007ed0cd21f660 in +[NSException raise:format:] (self=0x7f7fffb6a7b0,
    _cmd=<optimized out>, name=0x7ed0cd40bc4c, format=0x7f7fffb6aa48)
    at NSException.m:1450
#10 0x00007ed0cd262036 in -[NSObject doesNotRecognizeSelector:] (
    self=<optimized out>, _cmd=<optimized out>,
    aSelector=0x7ed0cd73e788 <.objc_selector_stringWithFormat:arguments:_320:816[1{__va_list_tag=II^v^v}]24>) at NSObject.m:1738
#11 0x00007ed0cd30020e in GSFFIInvocationCallback (cif=0x7ed0c6151820,
    retp=0x7f7fffb6b310, args=0x7f7fffb6b170, user=0x7ed0c6157f88)
    at GSFFIInvocation.m:606
#12 0x00007ed0ca20299c in ffi_closure_unix64_inner ()
   from /usr/pkg/lib/libffi.so.7
#13 0x00007ed0ca202d10 in ffi_closure_unix64 () from /usr/pkg/lib/libffi.so.7
#14 0x00007ed0cd21f696 in +[NSException raise:format:arguments:] (
    self=0x7ed0cd6d1d58 <._OBJC_CLASS_NSException>, _cmd=<optimized out>,
    name=0x7ed0cd7271a8 <.objc_str_NSInvalidArgumentException>,
    format=0x7ed0cd40bc4c, argList=0x7f7fffb6aa48) at NSException.m:1463
#15 0x00007ed0cd21f660 in +[NSException raise:format:] (self=0x7f7fffb6a7b0,
    _cmd=<optimized out>, name=0x7ed0cd40bc4c, format=0x7f7fffb6aa48)
    at NSException.m:1450
#16 0x00007ed0cd262036 in -[NSObject doesNotRecognizeSelector:] (
    self=<optimized out>, _cmd=<optimized out>,
    aSelector=0x7ed0cd73e788 <.objc_selector_stringWithFormat:arguments:_320:816[1{__va_list_tag=II^v^v}]24>) at NSObject.m:1738
#17 0x00007ed0cd30020e in GSFFIInvocationCallback (cif=0x7ed0c6151780,
    retp=0x7f7fffb6b690, args=0x7f7fffb6b4f0, user=0x7ed0c6157f48)
    at GSFFIInvocation.m:606
#18 0x00007ed0ca20299c in ffi_closure_unix64_inner ()
   from /usr/pkg/lib/libffi.so.7
#19 0x00007ed0ca202d10 in ffi_closure_unix64 () from /usr/pkg/lib/libffi.so.7
#20 0x00007ed0cd21f696 in +[NSException raise:format:arguments:] (
    self=0x7ed0cd6d1d58 <._OBJC_CLASS_NSException>, _cmd=<optimized out>,
    name=0x7ed0cd7271a8 <.objc_str_NSInvalidArgumentException>,
    format=0x7ed0cd40bc4c, argList=0x7f7fffb6aa48) at NSException.m:1463
#21 0x00007ed0cd21f660 in +[NSException raise:format:] (self=0x7f7fffb6a7b0,
    _cmd=<optimized out>, name=0x7ed0cd40bc4c, format=0x7f7fffb6aa48)
    at NSException.m:1450
#22 0x00007ed0cd262036 in -[NSObject doesNotRecognizeSelector:] (
    self=<optimized out>, _cmd=<optimized out>,
    aSelector=0x7ed0cd73e788 <.objc_selector_stringWithFormat:arguments:_320:816[1{__va_list_tag=II^v^v}]24>) at NSObject.m:1738
#23 0x00007ed0cd30020e in GSFFIInvocationCallback (cif=0x7ed0c61516e0,
    retp=0x7f7fffb6ba10, args=0x7f7fffb6b870, user=0x7ed0c6157f08)
    at GSFFIInvocation.m:606
#24 0x00007ed0ca20299c in ffi_closure_unix64_inner ()
   from /usr/pkg/lib/libffi.so.7
#25 0x00007ed0ca202d10 in ffi_closure_unix64 () from /usr/pkg/lib/libffi.so.7
#26 0x00007ed0cd21f696 in +[NSException raise:format:arguments:] (
<etc>


the stack looks corrupt. But why should it be [NSObject doesNotRecognizeSelector:]?


Then I thought... let's try "make test" in libobjc2

98% tests passed, 4 tests failed out of 186

Total Test time (real) =  68.32 sec

The following tests FAILED:
         25 - BlockImpTest (SEGFAULT)
         26 - BlockImpTest_optimised (SEGFAULT)
         27 - BlockImpTest_legacy (SEGFAULT)
         28 - BlockImpTest_legacy_optimised (SEGFAULT)

are these expected? I suppose... not, but I wonder if they can cause the issue I am seeing.


Riccardo




reply via email to

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