Possible gcc 4.3 error on ppc64
Jakub Jelinek
jakub at redhat.com
Mon Feb 25 16:44:25 UTC 2008
On Mon, Feb 25, 2008 at 12:02:27PM +0100, Adrian Reber wrote:
>
> During mass rebuild one of packages (gmpc) failed to rebuild:
>
> http://koji.fedoraproject.org/koji/taskinfo?taskID=436024
>
> /usr/bin/ld: misc.o(.text+0x450): unresolvable R_PPC64_REL24 relocation against symbol `mpd_data_get_next_real'
> /usr/bin/ld: misc.o(.text+0x4ac): unresolvable R_PPC64_REL24 relocation against symbol `mpd_data_get_next_real'
>
> The error happens only on ppc64. I tried to debug this but I am not sure
> why it fails. I have created a testcase http://lisas.de/~adrian/test.c
> with which I can easily reproduce this.
>
> If I compile test.c with gcc 4.3 linking fails. If I compile it with
> gcc34 linking works.
>
> The object dumps of both objects (gcc34 and gcc43) look pretty similar
> so that there was nothing obvious why linking failed.
>
> If anyone has any information if this a bug in gcc or what needs to be
> fixed to get this running again... that would be great.
No, this is just buggy libmpd-devel. The header has:
/* Internal Data struct functions */
inline MpdData * mpd_new_data_struct (void);
inline MpdData * mpd_new_data_struct_append (MpdData * data);
inline MpdData * mpd_data_concatenate (MpdData * const first, MpdData * const second);
inline MpdData * mpd_data_get_next_real (MpdData * const data, int kill_list);
/* more internal stuff*/
but the inline functions aren't defined anywhere in the current
TU, so ISO C99, 6.7.4(6) is violated:
"Any function with internal linkage can be an inline function. For a function
with external linkage, the following restrictions apply: If a function is
declared with an inline function specifier, then it shall also be defined
in the same translation unit."
So, either the inline keywords need to be dropped from the prototypes,
or the inline definition needs to be provided.
Jakub
More information about the fedora-devel-list
mailing list