Re: Failure to catch C++ exception in Haskell on OS X

2019-01-05 Thread Carter Schonwald
Are we talking about Haskell or linking/ calling c plus plus? If the latter, that’s more of a cabal issue I think? If you mean ghc build wise No. The unwind library only supports elf format. Which OS X does not use. Even that issue aside : ghc currently can’t build with any level of dwarf

Re: Failure to catch C++ exception in Haskell on OS X

2019-01-04 Thread Bas van Dijk
On Fri, 4 Jan 2019 at 23:46, Adam Sandberg Eriksson wrote: > A ticket which seems to cover the same problem: > https://ghc.haskell.org/trac/ghc/ticket/11829 Wonderful! I can confirm[1] that adding the following to the cabal file fixes the problem: if os(darwin) ld-options:

Re: Failure to catch C++ exception in Haskell on OS X

2019-01-04 Thread Adam Sandberg Eriksson
A ticket which seems to cover the same problem: https://ghc.haskell.org/trac/ghc/ticket/11829 —Adam > On 4 Jan 2019, at 16:50, Bas van Dijk wrote: > > On Fri, 4 Jan 2019 at 14:15, Gabor Greif wrote: >> maybe some DWARF unwind tables are not correctly installed in OS X? > > Hi Gabor,

Re: Failure to catch C++ exception in Haskell on OS X

2019-01-04 Thread Bas van Dijk
On Fri, 4 Jan 2019 at 14:15, Gabor Greif wrote: > maybe some DWARF unwind tables are not correctly installed in OS X? Hi Gabor, thanks, I will look into that. > Do intra-C++ exception catching work in your example? Yes, I have a C++ executable foo[1] that links with libfoo that correctly

Re: Failure to catch C++ exception in Haskell on OS X

2019-01-04 Thread Gabor Greif
Hi Bas, maybe some DWARF unwind tables are not correctly installed in OS X? Do intra-C++ exception catching work in your example? Cheers, Gabor On 1/4/19, Bas van Dijk wrote: > Dear GHC Devs, > > I'm debugging an issue in our haskell-opencv library where a C++ exception > that is thrown

Failure to catch C++ exception in Haskell on OS X

2019-01-03 Thread Bas van Dijk
Dear GHC Devs, I'm debugging an issue in our haskell-opencv library where a C++ exception that is thrown by the OpenCV C++ library isn't caught by the C++ try...catch block we have inlined in our Haskell code using inline-c-cpp. This results in the process terminating by SIGABRT. Note that this