Files
RedBear-OS/recipes/tools
vasilito e3aa90b0f5 gettext: use relibc's error() instead of gnulib's replacement
gettext failed to link against the GCC 16 toolchain with

  ld: libc.a(...rcgu.o):(.bss.error_message_count+0x0): multiple
      definition of `error_message_count'; libgrt.a(libgrt_a-error.o):
      first defined here

Root cause is a cross-compile artefact, not a compiler change. gnulib's
check for a working error() is a RUN test, so cross-compiling reports
'checking for working error function... guessing no' and turns on
GNULIB_REPLACE_ERROR. Two things then go wrong at once: consumers are
redirected to rpl_error, and gnulib's own error.c -- listed in
am__objects_5 with no GL_COND_OBJ_ERROR guard -- still defines the
unrenamed error_* globals, which collide with relibc's.

relibc genuinely implements error(), error_at_line() and all three
globals (verified with nm). Two coordinated fixes:

- gl_cv_func_working_error=yes in the recipe. Stating the answer a run
  test cannot reach while cross-compiling is the standard autoconf
  mechanism, and is exactly what the neighbouring ac_cv_/gt_cv_ entries
  already do for the same reason. Consumers now call relibc's error()
  and no rpl_error reference remains.

- Guard gnulib's error.c on HAVE_ERROR, which configure already defines
  as 1 -- upstream gnulib later made this module conditional on the
  system lacking error(); this snapshot computes the right answer and
  does not act on it. Without this the definitions still collide, since
  relibc is Rust and one codegen unit carries several symbols, so
  referencing any of them drags the whole object in. glibc escapes this
  only by giving each its own object file.

gettext cooks clean. Patch generated by diff, applies at --fuzz=0.
2026-08-03 15:02:36 +03:00
..