Solaris 10 x86 – Error compiling from source

When compiling from source you may see the following errors occur :

   /usr/include/sys/siginfo.h:259: error: parse error before “ctid_t”
   /usr/include/sys/siginfo.h:292: error: parse error before ‘}’ token
   /usr/include/sys/siginfo.h:294: error: parse error before ‘}’ token
   /usr/include/sys/siginfo.h:390: error: parse error before “ctid_t”
   /usr/include/sys/siginfo.h:392: error: conflicting types for `__proc’
   /usr/include/sys/siginfo.h:261: error: previous declaration of `__proc’
   /usr/include/sys/siginfo.h:398: error: conflicting types for `__fault’
   /usr/include/sys/siginfo.h:267: error: previous declaration of `__fault’

In order to resolve this you will need to update your header files. Below shows you how to rebuild your header files for your particular version of Solaris 10.

find / -name mkheaders.conf
vi /usr/local/lib/gcc-lib/i386-pc-solaris2.10/3.3.2/install-tools/mkheaders.conf
[add the following line to the beginnning of the file :- SHELL=/bin/sh ]
cd /usr/local/lib/gcc-lib/i386-pc-solaris2.10/3.3.2/install-tools/
./mkheaders

After doing this, then you should be able to rebuild your code without compiler errors.

Rick Donato

Want to become a UNIX expert?

Here is our hand-picked selection of the best courses you can find online:
UNIX Administration Fundamentals
Vim Masterclass
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial