Re: /usr/local/{include,lib} on Cygwin

From: Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-ports(at)postgresql(dot)org
Subject: Re: /usr/local/{include,lib} on Cygwin
Date: 2001-03-07 18:54:49
Message-ID: 20010307135449.A327@dothill.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

Tom,

On Tue, Mar 06, 2001 at 11:22:34PM -0500, Tom Lane wrote:
> Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com> writes:
> > I'm not a gcc expert, but from empirical evidence I was able to determine
> > that Cygwin gcc seems to automatically search /usr/local/include and
> > /usr/local/lib during compilation and linking, respectively.
>
> I believe that the built-in search paths for gcc are a
> configuration-time option, with (if hazy memory serves) defaults that
> vary across platforms. However, /usr/local/include and .../lib are
> certainly in those paths on *most* platforms. If Jason can attest that
> they're in there in the standard Cygwin build of gcc, then I see no
> reason to fear assuming that they're normally there for cygwin.

I guess that I spoke too soon or once again I forgot about Cygwin b20.1.

I just tried the same experiment on the Cygwin b20.1 gcc. Unfortunately,
it does *not* automatically search /usr/local/include during compilation
but it *does* automatically search /usr/local/lib during linking. This
asymmetry seems strange or at least inconsistent.

I've tried 2.95.2-6, 2.95.2-7, and b20.1 and I can't get gcc to
explicitly tell me that it will automatically search /usr/local/lib
during linking. I am using the -print-search-dirs which displays the
follow (for 2.95.2-7):

$ gcc -print-search-dirs
install: /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-7/
programs:
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-7/:/usr/lib/gcc-lib/i686-pc-cygwin/:/usr/lib/gcc/i686-pc-cygwin/2.95.2-7/:/usr/lib/gcc/i686-pc-cygwin/:/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-7/../../../../i686-pc-cygwin/bin/i686-pc-cygwin/2.95.2-7/:/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-7/../../../../i686-pc-cygwin/bin/
libraries:
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-7/:/usr/lib/gcc/i686-pc-cygwin/2.95.2-7/:/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-7/../../../../i686-pc-cygwin/lib/i686-pc-cygwin/2.95.2-7/:/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-7/../../../../i686-pc-cygwin/lib/:/usr/lib/i686-pc-cygwin/2.95.2-7/:/usr/lib/:/usr/lib/mingw/i686-pc-cygwin/2.95.2-7/:/usr/lib/mingw/:/lib/i686-pc-cygwin/2.95.2-7/:/lib/:/usr/lib/i686-pc-cygwin/2.95.2-7/:/usr/lib/

Does anyone know how to glean this information from gcc? Should I
actually be asking ld?

Anyway, if the PostgreSQL teams stills wants to support Cygwin b20.1,
then the -I/usr/local/include option should be set for b20.1 during configure.

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp. Fax: +1 (732) 264-8798
82 Bethany Road, Suite 7 Email: Jason(dot)Tishler(at)dothill(dot)com
Hazlet, NJ 07730 USA WWW: http://www.dothill.com

In response to

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message Jason Tishler 2001-03-07 19:41:01 Re: new beep problem
Previous Message Tom Lane 2001-03-07 04:22:34 Re: /usr/local/{include,lib} on Cygwin