Having problems with make/build on SunOS 5.9

Posted on 2003-10-27
Last Modified: 2013-12-27
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       |
Question by:magitek
  • 6
  • 6
  • 2
  • +2
LVL 34

Accepted Solution

PsiCop earned 150 total points
ID: 9628365
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.

Author Comment

ID: 9628582
Tried replacing make - no difference
LVL 24

Assisted Solution

shivsa earned 150 total points
ID: 9628676
There were problems with gcc 3.2.2, could u try installing latest one(3.2.2a).

Author Comment

ID: 9629369
I tried to upgrade gcc, and it also failed during the make process with errors.
LVL 24

Expert Comment

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

Author Comment

ID: 9630028
Here's the tail end of the error:

/bin/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
LVL 24

Expert Comment

ID: 9630301
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.

Author Comment

ID: 9630326
forgive me for sounding stupid, but I'd appreciate instructions on how to add that to my path.  thanks.
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

LVL 24

Expert Comment

ID: 9630381
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.

LVL 38

Expert Comment

ID: 9630846

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!

Author Comment

ID: 9633982
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'
LVL 24

Expert Comment

ID: 9634164
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. and look for make-3.80.

LVL 34

Expert Comment

ID: 9634248
I thot I already suggested that.

Author Comment

ID: 9634691
I installed make-3.80, and get the same error :\
LVL 24

Expert Comment

ID: 9634811
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.


Expert Comment

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


Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now