discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Crash occurs when catching std::exception in Objective-C++ code comp


From: David Chisnall
Subject: Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2
Date: Sat, 18 Nov 2017 10:24:24 +0000

On 17 Nov 2017, at 18:31, Lobron, David <dlobron@akamai.com> wrote:
> 
> 
>> You’ll need to also link with libstdc++.  Using g++ or clang++ instead of 
>> gcc / clang will do the right thing.
> 
> Thank you!  I added -lobjcxx -lstdc++ and -L.. to the link command.  That 
> fixed the build issues, and I was able to run the tests.  All of the tests 
> pass now, including the exception tests:
> 
> 44/46 Test #44: MethodArguments_optimised ..............   Passed    0.00 sec
>      Start 45: CXXExceptions
> 45/46 Test #45: CXXExceptions ..........................   Passed    0.00 sec
>      Start 46: CXXExceptions_optimised
> 46/46 Test #46: CXXExceptions_optimised ................   Passed    0.00 sec
> 
> 100% tests passed, 0 tests failed out of 46
> 
> Could you suggest the best way to apply this fix to the libobjc2 library as a 
> whole?  I can use patch or the like to update makefiles or cmake lists as 
> needed.  Once that is done, I will try a rebuild of my original program, and 
> see if this fixes the exception crashes.
> 
> Thank you again!

I think the best option is probably to give up trying to avoid the libstdc++ 
dependency and just build a single libobjc.so that links against libstdc++.so 
if lib{supc++,cxxrt,c++abi}.so is not available.  

David




reply via email to

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