[Bug 256909] libucl upgrade in a0409676120c1e558d0ade943019934e0f15118d breaks ABI

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 30 Jun 2021 16:53:50 UTC

            Bug ID: 256909
           Summary: libucl upgrade in
                    a0409676120c1e558d0ade943019934e0f15118d breaks ABI
           Product: Base System
           Version: 12.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: michael.osipov@siemens.com

* I have installed a new FreeBSD host from 12.2-RELEASE image
* Installed gitup(1):
# fetch -o gitup.zip https://codeload.github.com/johnmehr/gitup/zip/main
# unzip gitup.zip
# cd gitup-main
# mkdir -p /usr/local/etc /usr/local/sbin /usr/local/man/man1
# make
# make MK_DEBUG_FILES=no DESTDIR=/usr/local BINDIR=/sbin MANDIR=/man/man
# cd ..
# rm -rf gitup*

gitup makes use of ucl_iterate_object().

gitup works, it is now used to fetch a shallow copy of stable/12 to update base
from release to stable. After stable has been applied and the system has been
rebooted gitup fails with undefined symbol "ucl_iterate_object". One needs to
recompile gitup to make it work again with stable/12.

The reason is commit a0409676120c1e558d0ade943019934e0f15118d (libucl: vendor
import snapshort 20210314). In this specific commit the following has been
> -UCL_EXTERN const ucl_object_t* ucl_object_iterate (const ucl_object_t *obj,
> -		ucl_object_iter_t *iter, bool expand_values);
> +UCL_EXTERN const ucl_object_t* ucl_object_iterate_with_error (const ucl_object_t *obj,
> +		ucl_object_iter_t *iter, bool expand_values, int *ep);
> +
>  #define ucl_iterate_object ucl_object_iterate
> +#define ucl_object_iterate(ob, it, ev) ucl_object_iterate_with_error((ob), (it), (ev), NULL)
> -ucl_object_iterate (const ucl_object_t *obj, ucl_object_iter_t *iter, bool expand_values)
> +ucl_object_iterate_with_error (const ucl_object_t *obj, ucl_object_iter_t *iter, bool expand_values,
> +    int *ep)

The dynamic symbol table has been modified and the symbol ucl_object_iterate is
gone after base has been updated. This is a breaking change for me which I
don't expect. While I can recompile gitup, no issue, others will have problems
with other ports which may rely on this symbol to exist. This also means that
one cannot build this port in 12.2-RELEASE jail and use it in a 12-STABLE

The vendor change must be modified that no macro is used, but the old symbol is
retained and the replaced function simply calls the new one.

You are receiving this mail because:
You are the assignee for the bug.