[Bug 50625] Unhandled exception with try/catch

WineHQ Bugzilla wine-bugs at winehq.org
Wed Dec 1 11:03:16 CST 2021


https://bugs.winehq.org/show_bug.cgi?id=50625

--- Comment #24 from David Paradis <david.paradis at us.abb.com> ---
(In reply to Martin Storsjö from comment #23)
> (In reply to Zebediah Figura from comment #22)
> > FWIW, the configure script tries first to check for unw_step(), and then
> > tries it again linking to UNWIND_LIBS (which defaults to -lunwind). You've
> > quoted the first check, but both fail in the log, and I'm guessing it's the
> > latter that's supposed to work.
> 
> Oh, indeed. For some reason, the second test doesn’t print any executed
> command in this log:
> 
> configure:16618: checking for unw_step in libunwind
> configure:16645: result: no
> 
> In my logs, I see the successful command here.
> 
> Does --with-unwind affect this somehow? (I don’t pass that explicitly, I
> just let it autodetect it.)

Thank you to everyone that has assisted with this issue.  I will try to
summarize what I have done.  BTW, with all of the suggestions and my kind of
hacking away I have been able to get my test application to successfully catch
and handle the exception.

This is a remote device that is installed at retail stores across the US and is
running a custom Debian linux distro built thru Yacto (I did not build the OS)
running on a beagle bones ARM32 architecture.

What I had to do was this:
1) Run the apt install libunwind-dev to get the libs and includes as previously
mentioned.
2) Run ./configure with the original set of arguments that I posted on previous
comment.  In looking thru the configure process, the "unwind" is enabled by
default so that it can see if it is available on the system.
3) After the configure, I edited the /include/config.h.in file to comment out
the "#undef HAVE_LIBUNWIND" and replace it with "#define HAVE_LIBUNWIND"
4) Then edit the /dlls/ntdll/Makefile.in to add to the EXTRALIBS line the path
to the unwind lib at "/usr/lib/arm-linux-gnueabihf/libunwind.so
"
5) Then run make and install from the /dlls/ntdll folder
6) Finally, in my project I switched from /MD to /MT for the CRT linking.

Now when I run my program everything works as expected.  If I do not do step 3
and 4 then I get the prior messages about libunwind not being available when
the exception is thrown in my application.

I don't know why the UNWIND_LIBS variable is not set correctly to properly
include the libunwind.so, but if the ./configure process correctly detected my
installed libunwind and set the .so path location correctly then I wouldn't
have to modify any of the wine files at all.  For now, I am ok with doing my
own internal documentation for future builds to be make sure that I have these
steps documented in the event I have to do this again in the future.

Again, thank you all for the help, it is greatly appreciated.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list