Subject: Re: libtool "--tag" error (fwd)
To: Nick Hudson <skrll@netbsd.org>
From: gabriel rosenkoetter <gr@eclipsed.net>
List: current-users
Date: 03/05/2001 17:15:26
On Mon, Mar 05, 2001 at 10:01:39PM +0000, Nick Hudson wrote:
> What is important is the compilers that libtool finds when it is built
> as these are the only compilers it supports. gcc != cc != /usr/bin/cc !=
> /usr/bin/gcc != ...

Huh?

ambriel:~% which cc
/usr/bin/cc
ambriel:~% which gcc
/usr/bin/gcc
ambriel:~% cc -v
Using builtin specs.
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
ambriel:~% gcc -v
Using builtin specs.
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
ambriel:~% ls -il /usr/bin/cc /usr/bin/gcc
2246 -r-xr-xr-x  2 root  wheel  63952 Nov 16 20:41 /usr/bin/cc*
2246 -r-xr-xr-x  2 root  wheel  63952 Nov 16 20:41 /usr/bin/gcc*

That's stock 1.5.

If what Ruibiao said earlier is true and the only (g)cc he's got
installed lives in /usr/bin, then either 1) he's got a non-standard
gcc installed over top (even -current is still using the egcs
version unless one has actively installed something out of the
toolchain, no?), 2) there's something wrong with Ruibaio's pkgsrc
tree, or 3) the libtool package really is broken.

I'm leaning towards 1 or 2 before 3, since I just did a cvs update
in /usr/pkgsrc/devel/libtool and did not get any compiler errors. (I
did get a complaint about trying to install a new libtool-base over
my installed libtool-1.3.5nb4, but that's for totally legitimate
reasons, and I'm kind of using my laptop at the moment, so would
rather not break everything libtool depends on by ripping it out
and upgrading right now.)

Fwiw, in my config.log, I have:

configure:822: checking for gcc
configure:935: checking whether the C compiler (cc -O2  -Wl,-R/usr/pkg/lib -L/us
r/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib) works
configure:951: cc -o conftest -O2   -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr
/pkg/lib -L/usr/pkg/lib conftest.c  1>&5
configure:977: checking whether the C compiler (cc -O2  -Wl,-R/usr/pkg/lib -L/us
r/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib) is a cross-compiler

... and then later on:

configure:1282: checking for Cygwin environment
configure:1298: cc -c -O2  conftest.c 1>&5
configure: In function `main':
configure:1294: `__CYGWIN32__' undeclared (first use in this function)
configure:1294: (Each undeclared identifier is reported only once
configure:1294: for each function it appears in.)
configure: failed program was:
#line 1287 "configure"
#include "confdefs.h"

int main() {

#ifndef __CYGWIN__
#define __CYGWIN__ __CYGWIN32__
#endif
return __CYGWIN__;
; return 0; }

... so I'd say Ruibaio's problem is NOT the lack of a __CYGWIN32__
declaration, as I'd originally (and without much thought) presumed.

Ruibaio, based on what my copy of the Makefile picks up for the
compiler (see the long command line above), something's probably
misconfigured (whether automatically or actively) on your machine.

> I cannot tell why libtool is picking up "gcc" instead of "cc" in
> Ruibiao's case as I don't have enough information.

Ditto.

       ~ g r @ eclipsed.net