Re: [HACKERS] report for Win32 port - Mailing list pgsql-hackers

From Vince Vielhaber
Subject Re: [HACKERS] report for Win32 port
Date
Msg-id XFMail.990526205712.vev@michvhf.com
Whole thread Raw
In response to Re: [HACKERS] report for Win32 port  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 27-May-99 Tom Lane wrote:
> Vince Vielhaber <vev@michvhf.com> writes:
>> I've just discovered that libpq++'s makefile uses whatever is defined as
>> CXX for the compiler.
> 
> As it should ...
> 
>> When I force it to use g++28 (ver 2.8.1), it misses /usr/include/g++.
>> Adding that to the list of CXXFLAGS fixes that.  Now then..  Will it
>> break something on another platform if I were to leave that in the
>> list?
> 
> Absolutely.  For example: if someone has both g++ and a vendor C++
> compiler installed, and tries to compile with the vendor C++, that
> would fail because you'd be forcing the vendor C++ to try to eat
> g++-specific include files.
> 
> The right place to fix any problem along this line is in configure,
> *not* by hardwiring platform-dependent assumptions into libpq++'s
> makefile.
> 
> If it's actually necessary to do what you suggest, then the way to
> do it would be for configure to add -I/usr/include/g++ to CXXFLAGS
> after checking that CXX is g++.  However, I misdoubt that you have
> diagnosed the problem correctly, because the versions of gcc/g++
> that I've used automatically include their private include areas into
> the -I list.  This smells more like an incorrect installation of
> g++ than a problem that Postgres ought to be solving.
> 
>                       regards, tom lane

More than likely this is the case.  FreeBSD comes with a version of gcc
and g++ installed.  In this case it's 2.7.2.1.   In ports/packages it has
gcc-2.8.1, but being pressed for time I installed the package (20 mins
before trying to build with it).  I was a bit surprised to see that it
installed in /usr/local/bin and didn't even put a link in /usr/local/include
or /usr/local/lib, so I probably need to look into the installation more.
The makefile *is* doing a test for g++ tho (it was already there, I didn't
do it :)

Fortunately xemacs saves a backup of the file you're working on with a ~
tacked onto the end.  That saved me some work (I have a tape backup but
didn't really want to have to restore from it).  I'm referring to libpq++.sgml
that I'm about to send to TommyG before I wipe it out again.

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH   email: vev@michvhf.com   flame-mail: /dev/null      # include <std/disclaimers.h>
       TEAM-OS2       Online Campground Directory    http://www.camping-usa.com      Online Giftshop Superstore
http://www.cloudninegifts.com
==========================================================================




pgsql-hackers by date:

Previous
From: "Thomas A. Szybist"
Date:
Subject: Re: [HACKERS] Problem in S_LOCK?
Next
From: "D'Arcy" "J.M." Cain
Date:
Subject: Re: [HACKERS] Help: fmgr_info: function 0: cache lookup failed