[Bug general/31439] error: undefined reference to '__dwarf_get_units_internal'

rudi at heitbaum dot com sourceware-bugzilla@sourceware.org
Sat Mar 2 23:04:10 GMT 2024


https://sourceware.org/bugzilla/show_bug.cgi?id=31439

--- Comment #2 from rudi at heitbaum dot com ---
(In reply to Mark Wielaard from comment #1)
> I don't fully understand how you are building, and I cannot replicate, but
> it seems something goes wrong with readelf.c using the libdwP.h "internals"
> header. Does the following patch help?
> 
> diff --git a/libdw/libdwP.h b/libdw/libdwP.h
> index 8b2f06fa5937..c1c84ed3567d 100644
> --- a/libdw/libdwP.h
> +++ b/libdw/libdwP.h
> @@ -1153,8 +1153,7 @@ str_offsets_base_off (Dwarf *dbg, Dwarf_CU *cu)
>    if (cu == NULL && dbg != NULL)
>      {
>        Dwarf_CU *first_cu;
> -      if (INTUSE(dwarf_get_units) (dbg, NULL, &first_cu,
> -				   NULL, NULL, NULL, NULL) == 0)
> +      if (dwarf_get_units (dbg, NULL, &first_cu, NULL, NULL, NULL, NULL) ==
> 0)
>  	cu = first_cu;
>      }

Hi mark, sorry for not sharing more yesterday, somehow I locked my account out
on sourceware…. But I can confirm your patch does fix the build.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Elfutils-devel mailing list