#79 configure doesn't use gcc on Solaris

cannot reproduce
closed
other (29)
5
2001-11-21
2001-10-31
Anonymous
No

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:
/usr/gnu/bin:/usr/lang/WorkShop_V7_N1/bin

I use GNU tools as follows:
$ which gcc ; which cc; which make
/usr/gnu/bin/gcc
/usr/lang/WorkShop_V7_N1/bin/cc
/usr/gnu/bin/make
$ gcc --version
egcs-2.91.66

Here is the initial output of configure:
$ ./configure
loading cache ./config.cache
checking for a BSD compatible install... ./install-sh
-c
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
`/export/ctesupp/htdig/htdig-3.2.0b3/db'
/bin/sh ./libtool --mode=compile cc -DHAVE_CONFIG_H -I.
-I. -I. -I./../htlib -D_REENTRANT -g -c
bt_compare.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
`/export/ctesupp/htdig/htdig-3.2.0b3/db'
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'

Discussion

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

    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
    http://www.htdig.org/files/snapshots/
    and make sure gcc is in your PATH.

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