Q: When I compile an application on IRIX, why do I get an error about socklen_t?
I have downloaded a binary version of VR Juggler for IRIX, and when I try to compile an application, I get the following error:
cc-1084 CC: ERROR File = /usr/include/sys/socket.h, Line = 65 The indicated declaration has an invalid combination of type specifiers. typedef u_int32_t socklen_t;
How can I fix this?
A: You need to remove the definition of socklen_t from $VJ_BASE_DIR/include/vjDefines.h.
IRIX 6.5.17 added the type socklen_t to the header /usr/include/sys/socket.h. VR Juggler 1.0.6 was compiled on an older version of IRIX that did not define socklen_t, so it is configured to define that type itself. The compile error can be fixed by commenting out line 141 of $VJ_BASE_DIR/include/vjDefines.h as follows:
/* Define to `int' if the socklen_t type is not available. */ /* #define socklen_t int */
This can be done for versions of VR Juggler older than 1.0.6, though the line number in $VJ_BASE_DIR/include/vjDefines.h may vary. VR Juggler itself does not have to be recompiled to deal with this change.
Back to: LiveFaq
