[Techtalk] errors compiling glibc-2.3.3

Terri Oda terri at zone12.com
Thu Oct 7 18:12:43 EST 2004


On Oct 7, 2004, at 3:02 PM, Darlene Wallach wrote:
> ../sysdeps/i386/dl-machine.h:158: error: previous declaration of 
> 'fixup' was here
> dl-runtime.c:56: error: conflicting types for 'fixup'
> ../sysdeps/i386/dl-machine.h:158: error: previous declaration of 
> 'fixup' was here

Hm.  Since these are both the same file, I'd suspect that the 
dl-machine.h is missing an ifndef statement that would keep it from 
being actually included more than once.

Most header (.h) files have something like this:

#ifndef  _DL-MACHINE_H_
#define  _DL-MACHINE_H_

<The code for the file goes here>

#endif /* _DL-MACHINE_H_ */

These linees make sure that even if you include the header file 
multiple times, the function declarations won't be included over and 
over again causing conflicts like the ones you're seeing.  Each one 
will use a different define, so _DL-MACHINE_H_ would be for that one 
file and that one file only, stdio.h would probably be _STDIO_H_, etc.  
What it's saying is "if <this thing> isn't defined, then define it and 
insert all this code." (if the constant is defined, everything between 
ifndef and that endif are ignored.)

If this is your problem (you can tell by just opening the file and 
seeing if those lines appear around the beginning and end of the file), 
you can fix it by putting these lines in manually for each file that's 
giving this type of error, but unless you wrote these files, you might 
want to ask some questions about *why* they're broken and perhaps get 
better copies of them that don't have this problem.

  Terri



More information about the Techtalk mailing list