#79 configure doesn't use gcc on Solaris

cannot reproduce
other (29)

I'm using htdig-3.2.0b3 on Solaris 7.
No compiled version available, so I'm trying to
build it.

Filing a bug report because I couldn't find any
similar reports and FAQs, etc. didn't mention
this problem.

The initial directories in PATH are:

I use GNU tools as follows:
$ which gcc ; which cc; which make
$ gcc --version

Here is the initial output of configure:
$ ./configure
loading cache ./config.cache
checking for a BSD compatible install... ./install-sh
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking whether make sets ${MAKE}... (cached) yes
checking host system type... sparc-sun-solaris2.7
checking build system type... sparc-sun-solaris2.7
checking for ranlib... (cached) ranlib
checking for gcc... (cached) cc
checking whether the C compiler (cc ) works... yes
checking whether the C compiler (cc ) is a
cross-compiler... no
checking whether we are using GNU C... (cached) no
checking whether cc accepts -g... (cached) yes
checking for non-GNU ld... (cached) /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld...
(cached) no
checking for BSD-compatible nm... (cached)
/usr/ccs/bin/nm -p
checking zlib in /usr/local... failed
configure: error: either specify a valid zlib
installation with --with-zlib=DIR or disable zlib usage
with --without-zlib

I have the cc/gcc ambiguity with --without-zlib too.

I *expected* gcc to be used, not cc.

When I actually compile, cc seems to be used instead of
gcc, and I thus get some option errors:
$ make
Making all in db
make[1]: Entering directory
/bin/sh ./libtool --mode=compile cc -DHAVE_CONFIG_H -I.
-I. -I. -I./../htlib -D_REENTRANT -g -c
rm -f .libs/bt_compare.lo
cc -DHAVE_CONFIG_H -I. -I. -I. -I./../htlib
-D_REENTRANT -g -Wp,-MD,.deps/bt_compare.pp -c
bt_compare.c -KPIC -DPIC -o bt_compare.o
command line: fatal: invalid arg for option M D: No
such file or directory
cc: acomp failed for bt_compare.c
make[1]: *** [bt_compare.lo] Error 1
make[1]: Leaving directory
make: *** [all-recursive] Error 1

If I force the use of gcc, I get other errors:
$ cd db; rm -f ./libs/bt_compare.lo; cc -DHAVE_CONFIG_H
-I. -I. -I. -I./../htlib -D_REENTRANT -g
-Wp,-MD,.deps/bt_compare.pp -c bt_compare.c -KPIC
-DPIC -o bt_compare.o
gcc: unrecognized option `-KPIC'


    • milestone: --> cannot reproduce
    • assigned_to: nobody --> grdetil
    • status: open --> closed
  • Logged In: YES

    Your "initial" run of ./configure found a config.cache, so
    it doesn't
    seem so initial to me. Try again with a clean installation
    of the
    latest 3.2.0b4 snapshot from
    and make sure gcc is in your PATH.

    Support requests such as this are best dealt with on the
    mailing list.