1748275 Members
3840 Online
108761 Solutions
New Discussion юеВ

Re: gcc error?

 
Kalin Evtimov
Regular Advisor

gcc error?

Whatever I try to compile with gcc, I get:

usr/include/sys/sem.h:91: error: field `sem_perm' has incomplete type

What is meant by incomplete type?
2 REPLIES 2
Stephen Keane
Honored Contributor

Re: gcc error?

In this case it probably means your source code needs to include

#include

before it includes

#include

The type isn't fully defined by the time the compiler needs to know what it is.
Steve Ellcey
Valued Contributor

Re: gcc error?

If adding the header file didn't fix things it may be an issue with the GCC header files being out of synch with the system header files. GCC makes some private copies of header files and if the system GCC was built on is different than the system GCC is installed on you could get this type of problem. If GCC is installed in /usr/local/bin then you should also have a command called something like /usr/local/libexec/gcc/hppa1.1-hp-hpux11.00/4.1.0/install-tools/mkheaders
where the system triplet (hppa1.1...) and GCC version number may be different. Running this command will re-process the system headers and update GCC's headers and may fix the problem.