make check passes in Solaris 10 x86

Matthias Andree matthias.andree at gmx.de
Mon Nov 28 05:19:28 CET 2005


Chris Wilkes <cwilkes-bf at ladro.com> writes:

> Just thought I would share with everyone that "make check" passes on a
> solaris 10 x86 box I have.
>
> # uname -a
> SunOS sol01 5.10 Generic i86pc i386 i86pc
>
>>>From http://www.sunfreeware.com I installed the following packages:
>
> * gcc 3.3.2
> * Berkeley 4.2
> * make (although I use the /usr/ccs/bin/make one)
>
> Make sure to go through the steps on the sunfreeware site to update the
> gcc header files or else you'll get some errors involving "ctid_t"

That's "normal" for GCC installations, but good that you mention it.

> one weird thing I noticed was that if /usr/ccs/bin wasn't in the PATH the
>   ./configure  --with-libdb-prefix=/usr/local/BerkeleyDB.4.2/
> wouldn't complain about not being able to find "ar" (which is in the
> /usr/ccs/bin directory).  Its a little confusing as make tries do so a
> " cru ..." on something (should be "ar cru ...") and it fails, not being
> able to find the "cru" program.

Well, to make Solaris 10 standards compliant, it is necessary to have PATH
start with 

PATH=/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:... (whatever else)

Solaris 7 - 9 use the same without the xpg6 part.

On Solaris 8, SUNWxcu4t and SUNWxcu4 need to be installed,
I don't know about packages on other versions.

This PATH setting is so that the POSIX and CCS build tools are found
early, and the POSIX ar and make are in /usr/xpg4/bin. Bogofilter relies
on such setting, apparently we need to document this somewhere (or find
where it's documented and point users there).

It appears to work for with /usr/ccs/bin for you, but I'm not sure if it
will everywhere or for future versions.

> Putting /usr/ccs/bin in the $PATH fixed that.  I'm not sure how the
> configure program can check for the existance of the "ar" program.

It'll currently just walk along your $PATH, trying
i386-sun-solaris2.10-ar and ar. The relevant macro is, as David stated,
AC_CHECK_TOOL, and we might catch the "not found" case and abort with
error.

We might also add these Solaris directories mentioned above to PATH in
our search and then use AC_PATH_TOOL instead, but if /usr/xpg4/bin and
/usr/ccs/bin are not in PATH, we'll still have to check for "make"
somehow. I wonder if we should just complain and tell the user 1. to
install the tools if needed and 2. set the PATH right, or if we should
search for make ourselves and print an appropriate message to the user
from configure.ac what he should type next to build everything.

The difference: AC_CHECK_TOOL will just stuff the right filename into
AR, AC_PATH_TOOL will store the filename with full path into AR.

AFAIK the FAQ's porting notes on Solaris' make are obsolete, IIRC the
Makefile.am bug was fixed some time ago, but I need to re-check. This
might be our chance to document the right PATH for Solaris.

-- 
Matthias Andree



More information about the Bogofilter mailing list