> -----Original Message-----
> From: Rainer Orth <r...@cebitec.uni-bielefeld.de>
> Sent: Monday, May 5, 2025 16:53
> To: Robert Dubner <rdub...@symas.com>
> Cc: Iain Sandoe <idsan...@googlemail.com>; GCC Patches <gcc-
> patc...@gcc.gnu.org>; Jakub Jelinek <ja...@redhat.com>; James K. Lowden
> <jklow...@cobolworx.com>
> Subject: Re: [PATCH] cobol: Rewrite exception handling. Partially
refactor
> subscript/refmod calculations.
>
> Hi Robert,
>
> >> This causes bootstrap to fail on x86_64 darwin with:
> >>
> >> Undefined symbols for architecture x86_64:
> >> "_program_invocation_short_name", referenced from:
> >> ___gg__check_fatal_exception in libgcobol.o
> >> ld: symbol(s) not found for architecture x86_64
> >>
> >> Looking at the patch, it seems that the symbol is not, indeed,
defined
> >> anywhere.
> >
> > That symbol is very much supposed to be there. Many things won't work
> > without it.
> >
> > The function is defined in libgcobol.cc, at line 11321
> >
> > extern "C"
> > void
> > __gg__check_fatal_exception()
> > {
> >
> > There are two leading underscores, not three.
>
> you're misreading the linker error: the missing symbol is
> program_invocation_short_name, which is a GNU extension, again
> unportable to non-glibc systems. gnulib has an implementation for other
> systems.
You are absolutely correct, and thank you for pointing that out. That's
Jim's code, not mine, so I didn't recognize it; I was on a hair-trigger
for __gg__check_fatal_exception, which is part of the massive burr under
our saddle for the last month or so.
Iain, feel free to do what you need to do. And if somebody wants to let
us know what we should use instead, I am sure Jim will be all ears. That
external reference is used to pick up the name of the executable for entry
into the syslog when a COBOL error condition is set. Obviously in a Linux
system we'd like that, or the equivalent. But there must be ways of
picking up the information needed for a useful log entry.
Thank you.
>
> Rainer
>
> --
>
--------------------------------------------------------------------------
> ---
> Rainer Orth, Center for Biotechnology, Bielefeld University