<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Just for fun I grabbed the latest snapshot and tried to compile it on
my Solaris10 server at home. I ran into a couple of problems which I
was able to fix.  Long gory details below, quick summary at the bottom.<br>
<br>
I configured with all default options, except no to LDAP.  Here's the
results:<br>
<br>
<tt>[hobbit@ultra5 snapshot]$ make<br>
CC="gcc" CFLAGS="-g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I.
-I`pwd`/include -I/usr/local/include" OSDEF="-DSunOS" RPATHOPT=""
PCREINCDIR="-I/usr/local/include" SSLFLAGS="-DBBGEN_SSL"
SSLINCDIR="-I/usr/local/ssl/include " SSLLIBS="-L/usr/lib -lssl
-lcrypto" NETLIBS="-lresolv -lsocket -lnsl" BBTOPDIR="/home/hobbit"
BBLOGDIR="/var/log/hobbit" BBHOSTNAME="ultra5" BBHOSTIP="192.168.0.103"
BBHOSTOS="sunos" make -C lib all<br>
make[1]: Entering directory `/home/hobbit/snapshot/lib'<br>
make[1]: Nothing to be done for `all'.<br>
make[1]: Leaving directory `/home/hobbit/snapshot/lib'<br>
CC="gcc" CFLAGS="-g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I.
-I`pwd`/include -I/usr/local/include" RPATHOPT=""
SSLFLAGS="-DBBGEN_SSL" SSLINCDIR="-I/usr/local/ssl/include "
SSLLIBS="-L/usr/lib -lssl -lcrypto" NETLIBS="-lresolv -lsocket -lnsl"
BBHOME="/home/hobbit/server" make -C common all<br>
make[1]: Entering directory `/home/hobbit/snapshot/common'<br>
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I.
-I/home/hobbit/snapshot/include -I/usr/local/include -o bbhostgrep
bbhostgrep.o ../lib/libbbgen.a<br>
Undefined                       first referenced<br>
 symbol                             in file<br>
recv                                ../lib/libbbgen.a(sendmsg.o)<br>
getservbyname                       ../lib/libbbgen.a(sendmsg.o)<br>
gethostbyname                       ../lib/libbbgen.a(sendmsg.o)<br>
socket                              ../lib/libbbgen.a(sendmsg.o)<br>
getsockopt                          ../lib/libbbgen.a(sendmsg.o)<br>
connect                             ../lib/libbbgen.a(sendmsg.o)<br>
inet_aton                           ../lib/libbbgen.a(sendmsg.o)<br>
inet_ntoa                           ../lib/libbbgen.a(sendmsg.o)<br>
shutdown                            ../lib/libbbgen.a(sendmsg.o)<br>
ld: fatal: Symbol referencing errors. No output written to bbhostgrep<br>
collect2: ld returned 1 exit status<br>
make[1]: *** [bbhostgrep] Error 1<br>
make[1]: Leaving directory `/home/hobbit/snapshot/common'<br>
make: *** [common-build] Error 2</tt><br>
<br>
These errors are typical of missing networking libraries
(resolv,socket,nsl), so I checked the Makefile and added $(NETLIBS) to
snapshot/common/Makefile<br>
<br>
bbhostgrep: $(HOSTGREPOBJS) ../lib/libbbgen.a<br>
        $(CC) $(CFLAGS) -o $@ $(HOSTGREPOBJS) ../lib/libbbgen.a <b>$(NETLIBS)</b><br>
<br>
I then did a "make clean" and ran make again. This time I get this
error:<br>
<tt><br>
make[1]: Leaving directory `/home/hobbit/snapshot/common'<br>
CC="gcc" CFLAGS="-g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I.
-I`pwd`/include -I/usr/local/include" BBHOME="/home/hobbit/client"
BBHOSTIP="192.168.0.103" LOCALCLIENT="" make -C client all<br>
make[1]: Entering directory `/home/hobbit/snapshot/client'<br>
cat hobbitclient.cfg.DIST | sed -e'<a class="moz-txt-link-abbreviated"
 href="mailto:s%21@BBHOSTIP@%21192.168.0.103%21g">s!@BBHOSTIP@!192.168.0.103!g</a>'
>hobbitclient.cfg<br>
make[1]: *** [hobbitclient.cfg] Error 2<br>
make[1]: Leaving directory `/home/hobbit/snapshot/client'<br>
make: *** [client] Error 2</tt><br>
<br>
I checked to see if /home/hobbit/snapshot/client/hobbitclient.cfg was
created, and it was, but zero bytes.<br>
So, I checked the hobbitclient.cfg.DIST to make sure it had data in it
and it did, I then I decided to check the sed command being used:<br>
 "<tt>sed -e'<a class="moz-txt-link-abbreviated"
 href="mailto:s%21@BBHOSTIP@%21192.168.0.103%21g">s!@BBHOSTIP@!192.168.0.103!g</a>'". 
<br>
<br>
The syntax of that looks correct but when I tried it on the command
line, it didn't work! So then I grepped for sed in all of the
Makefiles, and found many usages of sed, but all the others had one
difference, <b>a space after the -e option</b>. I changed the sed
commands in snapshot/client/Makefile to have a space after the "-e"
option, did a make clean; make; and now it compiled smoothly. <br>
<br>
--- Summary ---<br>
So, to summarize, for Solaris compatibility in the latest snapshot,
please add the netlibs to the snapshot/common/Makefile, and correct the
spacing of the sed command options in snapshot/client/Makefile.<br>
<br>
-Charles<br>
</tt>
<br>
</body>
</html>