Having problems with make/build on SunOS 5.9

magitek used Ask the Experts™
I can't seem to make or build anything successfully since I took over administration of this SunSO 5.9 machine.  I'm hoping for some input.  I've had failed attempts at OpenSSL, Pine, and also joe.  I'm including the response from attempting to build pine, for starters.  I'd appreciate any input into this.  Thanks in advance!

The Pine version is 4.5.8.  I'm running sendmail and qpopper for mail daemons.

bash-2.05# ./build gs5 SSLTYPE=none
make args are CC=gcc  gs5

Including LDAP functionality
ln: cannot create c-client: File exists
ln: cannot create mtest: File exists
ln: cannot create mailutil: File exists
ln: cannot create imapd: File exists
ln: cannot create ipopd: File exists
Making c-client library, imapd, and ipopd
eval make CC=gcc SSLTYPE=none SPECIALS= gso
make sslnone
make[1]: Entering directory `/downloads/pine/pine4.58/imap'
make[1]: `sslnone' is up to date.
make[1]: Leaving directory `/downloads/pine/pine4.58/imap'
Applying an process to sources...
tools/an "ln -s" src/c-client c-client
tools/an "ln -s" src/ansilib c-client
tools/an "ln -s" src/charset c-client
tools/an "ln -s" src/osdep/unix c-client
tools/an "ln -s" src/mtest mtest
tools/an "ln -s" src/ipopd ipopd
tools/an "ln -s" src/imapd imapd
tools/an "ln -s" src/mailutil mailutil
tools/an "ln -s" src/mlock mlock
tools/an "ln -s" src/dmail dmail
tools/an "ln -s" src/tmail tmail
ln -s tools/an .
make[1]: Entering directory `/downloads/pine/pine4.58/imap'
Building c-client for gso...
echo `cat SPECIALS`  > c-client/SPECIALS
cd c-client;make gso EXTRACFLAGS=''\

make[2]: Entering directory `/downloads/pine/pine4.58/imap/c-client'
 SPOOLDIR=/var/spool MAILSPOOL=/var/mail \
 ACTIVEFILE=/usr/share/news/active \
 RSHPATH=/usr/bin/rsh \
 BASECFLAGS="-g -O2" \
 BASELDFLAGS="-lsocket -lnsl -lgen" \
 RANLIB=true CC=gcc
make[3]: Entering directory `/downloads/pine/pine4.58/imap/c-client'
sh -c 'rm -rf auths.c crexcl.c nfstest.c linkage.[ch] siglocal.c osdep*.[ch] *.o ARCHIVE *FLAGS *TYPE c-client.a || true'
Once-only environment setup...
echo gcc > CCTYPE
echo -g -O2 '' > CFLAGS
echo -DCREATEPROTO=unixproto -DEMPTYPROTO=unixproto \
 -DMAILSPOOL=\"/var/mail\" \
 -DANONYMOUSHOME=\"/var/mail/anonymous\" \
 -DACTIVEFILE=\"/usr/share/news/active\" -DNEWSSPOOL=\"/var/spool/news\" \
 -DRSHPATH=\"/usr/bin/rsh\" -DLOCKPGM=\"/etc/mlock\" > OSCFLAGS
echo -lsocket -lnsl -lgen  > LDFLAGS
echo "ar rc c-client.a osdep.o mail.o misc.o newsrc.o smanager.o utf8.o siglocal.o dummy.o pseudo.o netmsg.o flstring.o fdstring.o rfc822.o nntp.o smtp.o imap4r1.o pop3.o unix.o mbox.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o;true c-client.a" > ARCHIVE
echo sol > OSTYPE
./drivers mbox imap nntp pop3 mh mx mbx tenex mtx mmdf unix news phile dummy
./mkauths  md5 pla log
make[4]: Entering directory `/downloads/pine/pine4.58/imap/c-client'
echo -DMD5ENABLE=\"/etc/cram-md5.pwd\" >> OSCFLAGS
make[4]: Leaving directory `/downloads/pine/pine4.58/imap/c-client'
ln -s os_sol.h osdep.h
ln -s os_sol.c osdepbas.c
ln -s log_std.c osdeplog.c
ln -s sig_psx.c siglocal.c
ln -s crx_nfs.c crexcl.c
sh -c '(test -f /usr/include/sys/statvfs.h -a sol != sc5 -a sol != sco) && ln -s nfstnew.c nfstest.c || ln -s nfstold.c nfstest.c'
Standard password authentication
ln -s ckp_psx.c osdepckp.c
Building without SSL support
ln -s ssl_none.c osdepssl.c
cat osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c
Building OS-dependent module
If you get No such file error messages for files x509.h, ssl.h,
pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL
is not installed on your system. Either install OpenSSL first
or build with command: make sol SSLTYPE=none
`cat CCTYPE` -c `cat CFLAGS` `cat OSCFLAGS` -c osdep.c
`cat CCTYPE` -c `cat CFLAGS` mail.c
`cat CCTYPE` -c `cat CFLAGS` misc.c
`cat CCTYPE` -c `cat CFLAGS` newsrc.c
`cat CCTYPE` -c `cat CFLAGS` smanager.c
`cat CCTYPE` -c `cat CFLAGS` utf8.c
`cat CCTYPE` -c `cat CFLAGS` siglocal.c
`cat CCTYPE` -c `cat CFLAGS` dummy.c
`cat CCTYPE` -c `cat CFLAGS` pseudo.c
`cat CCTYPE` -c `cat CFLAGS` netmsg.c
`cat CCTYPE` -c `cat CFLAGS` flstring.c
`cat CCTYPE` -c `cat CFLAGS` fdstring.c
`cat CCTYPE` -c `cat CFLAGS` rfc822.c
`cat CCTYPE` -c `cat CFLAGS` nntp.c
`cat CCTYPE` -c `cat CFLAGS` smtp.c
`cat CCTYPE` -c `cat CFLAGS` imap4r1.c
`cat CCTYPE` -c `cat CFLAGS` pop3.c
`cat CCTYPE` -c `cat CFLAGS` unix.c
`cat CCTYPE` -c `cat CFLAGS` mbox.c
`cat CCTYPE` -c `cat CFLAGS` mbx.c
`cat CCTYPE` -c `cat CFLAGS` mmdf.c
`cat CCTYPE` -c `cat CFLAGS` tenex.c
`cat CCTYPE` -c `cat CFLAGS` mtx.c
`cat CCTYPE` -c `cat CFLAGS` news.c
`cat CCTYPE` -c `cat CFLAGS` phile.c
`cat CCTYPE` -c `cat CFLAGS` mh.c
`cat CCTYPE` -c `cat CFLAGS` mx.c
sh -c 'rm -rf c-client.a || true'
ar rc c-client.a osdep.o mail.o misc.o newsrc.o smanager.o utf8.o siglocal.o dummy.o pseudo.o netmsg.o flstring.o fdstring.o rfc822.o nntp.o smtp.o imap4r1.o pop3.o unix.o mbox.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o;true c-client.a
make[3]: Leaving directory `/downloads/pine/pine4.58/imap/c-client'
make[2]: Leaving directory `/downloads/pine/pine4.58/imap/c-client'
echo gso > OSTYPE
touch rebuild
sh -c 'rm -rf rebuild || true'
Building bundled tools...
cd mtest;make
make[2]: Entering directory `/downloads/pine/pine4.58/imap/mtest'
gcc -I../c-client `cat ../c-client/CFLAGS`   -c -o mtest.o mtest.c
gcc -I../c-client `cat ../c-client/CFLAGS` -o mtest mtest.o ../c-client/c-client.a `cat ../c-client/LDFLAGS`
Undefined                       first referenced
 symbol                             in file
main                                /usr/local/lib/gcc-lib/i386-pc-solaris2.9/3.2.2/crt1.o
ld: fatal: Symbol referencing errors. No output written to mtest
collect2: ld returned 1 exit status
make[2]: *** [mtest] Error 1
make[2]: Leaving directory `/downloads/pine/pine4.58/imap/mtest'
make[1]: *** [bundled] Error 2
make[1]: Leaving directory `/downloads/pine/pine4.58/imap'
make: *** [gso] Error 2
| Problems building c-client                  |
|                                             |
| Please check the output above for a         |
| possible explanation for this failure       |
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I've found that the built-in make in SunOS does not always get along with open software packages. Often, those packages prefer (or are even specifically written for) GNU Make.

Have you tried replacing the make on your system with GNU make? If you haven't, it might be worth your time.


Tried replacing make - no difference
There were problems with gcc 3.2.2, could u try installing latest one(3.2.2a).
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.


I tried to upgrade gcc, and it also failed during the make process with errors.

could u post those error which u encounter during gcc upgrading. that may lead us to bottom.


Here's the tail end of the error:

/bin/sh ./mkconfig.sh tconfig.h
sed -e '/^!/d' <./config/i386/sol2-c1.asm >crt1.s
/downloads/gcc-3.3.2/gcc/xgcc -B/downloads/gcc-3.3.2/gcc/ -B/usr/local/i386-pc-solaris2.9/bin/ -B/usr/local/i386-pc-solaris2.9/lib/ -isystem /usr/local/i386-pc-solaris2.9/include -c -o crt1.o crt1.s
sed -e '/^!/d' <./config/i386/sol2-ci.asm >crti.s
/downloads/gcc-3.3.2/gcc/xgcc -B/downloads/gcc-3.3.2/gcc/ -B/usr/local/i386-pc-solaris2.9/bin/ -B/usr/local/i386-pc-solaris2.9/lib/ -isystem /usr/local/i386-pc-solaris2.9/include -c -o crti.o crti.s
sed -e '/^!/d' <./config/i386/sol2-cn.asm >crtn.s
/downloads/gcc-3.3.2/gcc/xgcc -B/downloads/gcc-3.3.2/gcc/ -B/usr/local/i386-pc-solaris2.9/bin/ -B/usr/local/i386-pc-solaris2.9/lib/ -isystem /usr/local/i386-pc-solaris2.9/include -c -o crtn.o crtn.s
sed -e '/^!/d' <./config/i386/sol2-gc1.asm >gcrt1.s
as -o gcrt1.o gcrt1.s
make[1]: as: Command not found
make[1]: *** [gcrt1.o] Error 127
make[1]: Leaving directory `/downloads/gcc-3.3.2/gcc'
make: *** [all-gcc] Error 2
You have new mail in /var/mail/root

as command is not found.
as is assember which convert  object files from assembly language code.

since as is not working, it could not create gcrt1.0 which is needed for crt1.o, thats why your pine compilation did not work.

please put /usr/ccs/bin into your path and it should all your problems.


forgive me for sounding stupid, but I'd appreciate instructions on how to add that to my path.  thanks.

first u should know which shell u are working on.

# echo $SHELL

check the output of above command.
if it sh or ksh.

do like this.
#echo $PATH
# PATH = $PATH:/usr/ccs/bin:
#export PATH
# echo $PATH
check to see if the /usr/ccs/bin is in the path.
and the build the gcc and then pine.

1. You can downlaod the free GNU tools (binary packages) for Solaris 9  from:

autoconf-2.57, automake-1.7.2, bison-1.75, flex-2.5.4a,

gcc-3.3.1, glib-1.2.10, make-3.80, zlib-1.1.4, libgcc-3.3, perl-5.8.0

They will be install in /usr/local, please read the README file from the same site and
get all the required packages as well.

Just make sure that you set PATH,  LD_LIBRARY_PATH, and  MANPATH before you using them.


before you complie a new source code package:




You can also download other useful tools such as ssh, expect, mysql,
python-2.2.2 from the same size.

Good luck!


I'm running bash as a shell, and I got the path set, thanks.  But now I've got a NEW error.  Here goes...

checking for stdlib.h... (cached) yes
checking for stdio.h... (cached) yes
checking for ctype.h... yes
checking for dlfcn.h... (cached) yes
checking for dl.h... no
checking for dld.h... no
checking for string.h... (cached) yes
checking for strchr... (cached) yes
checking for strrchr... (cached) yes
checking for strcmp... yes
updating cache ../../config.cache
creating ./config.status
creating Makefile
creating config.h
mksh: Fatal error in reader: = missing from replacement macro reference
Current working directory /downloads/gcc-3.3.2/i386-pc-solaris2.9/libjava
*** Error code 1
make: Fatal error: Command failed for target `all-target-libjava'

It is non-GNU-make complaining about GNU Make syntax.
Makefile s written to work with gnu-make.

 u want to install gnu-make and run with that.
http://sunfreeware.com/ and look for make-3.80.

I thot I already suggested that.


I installed make-3.80, and get the same error :\

I think u still might be using the old make.

try which make.
it will give u /usr/ccs/bin/make since /usr/ccs is in your path first.

try with /usr/local/bin/make or gmake.

I think you dont have a main() in mtest.c. pls verify this.


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial