Subject: bug#50098: Configuring --with-libsigsegv results in link error

From: Evan Miller <[email-masked]>
Date: Tue, 17 Aug 2021 14:06:09 -0400

Using grep 3.7 (as well as master), I'm seeing undefined symbol errors after pointing the build to use a local installation of libsigsegv (version 2.13).

Making all in src
  CCLD     grep
Undefined symbols:
  "_stackoverflow_install_handler", referenced from:
      _c_stack_action in libgreputils.a(c-stack.o)
  "_sigsegv_install_handler", referenced from:
      _c_stack_action in libgreputils.a(c-stack.o)
ld: symbol(s) not found

Configure appears to find the library (which is provided by MacPorts) correctly. The config.log contains:

LIBSIGSEGV='-L/opt/local/lib -lsigsegv'

Compiler

powerpc-apple-darwin8-gcc-apple-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) (MacPorts apple-gcc42 5666.3_16)

System

8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc

It's an older system but seems close to building the program. Let me know what additional information would be useful for debugging.

Evan