"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: `got import` segfaults on macOS (got-portable 0.85, 0.86)
To:
Carlo Cabrera <carlo.antonio.cabrera@gmail.com>, gameoftrees@openbsd.org
Date:
Wed, 15 Mar 2023 14:06:17 +0100

Download raw body.

Thread
On Wed, Mar 15, 2023 at 01:47:20PM +0100, Stefan Sperling wrote:
> Is the test suite passing? ("make tests" in the -portable source tree)

Oh, sorry... following the links you sent shows that running tests is how
you found out about the problem in the first place.

There is a placeholder getopt implementation in compat/getopt.c which is
used if HAVE_LIBBSD is not defined.

I suspect that this file gets compiled on MacOS, which unlike Linux should
already have BSD APIs such as getopt natively. And at run-time there is some
confusion between getopt() from MacOS libc and getopt() from the compat/getopt.c
file? Not sure what the root cause is, but following this trail might help.