[Fwd: Re: [PORTS] Re: Postgress 6.5.3 on Irix 6.5.x?]

From: Mark Dalphin <mdalphin(at)amgen(dot)com>
To: pgsql-ports(at)postgresql(dot)org
Subject: [Fwd: Re: [PORTS] Re: Postgress 6.5.3 on Irix 6.5.x?]
Date: 2000-01-05 00:05:56
Message-ID: 38728AE4.D97E42C7@amgen.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

> Jim Gramke wrote:
>
> > I have g++ 2.8.1, and CC is the SGI supplied MIPS-Pro C++ compiler. It would
> > seem one of those would be ok.
> >
> > I'll try it with the without option you describe.
>
> I don't have the C++ compiler, so I always use the --without-CXX option.
> However, I wonder if you may want to use the g++ compiler instead of CC (if you
> really need c++). (Postgres was created for the GNU compilers I believe.)
>
> Anyone out there know if using the GNU compilers is better for Postgres? Or is
> there no real difference?
>
> -Tony
>

I have always _assumed_ that the performance of the compiled code generated by
the
native compiler was superior to the GNU (generic) compiler. This assumption
echos
what others have told me. I also assume that the reason for using the GNU
compiler
is portability as most native compilers that I have used (DEC, SGI, MicroSoft,
Borland) have "special features" which make transporting the code to another
platform difficult.

I have not been able to get Postgres (6.5.1) to compile and run under SGI Irix
6.5
using a GNU compiler, gcc 2.8.1. I have not tracked down the problem as I can
get
it to run with the native cc. There are hints at the SGI site for some
differences between gcc and the SGI cc on their page: "Notes on building Open
Source software on IRIX",
http://toolbox.sgi.com/TasteOfDT/public/freeware/shared/howto.html.

There, they have a section comparing cc and gcc which states:

> gcc vs cc
>
> Code that runs fine when compiled withe SGI cc and doesn't run when compiled with gcc is possibly using calls to one of the following:
>
> inet_ntoa, (and some other inet_XXX), semctl
>
> (there may be others). These are functions that get passed or return structs that are smaller than 16-bit long and not 8-bits long. gcc and SGI cc are incompatible in the
> way they pass these structs so compiling with gcc and linking with the SGI libc.so (which was compiled with the SGI cc) is likely to cause these problems. Note that this
> problem is pretty rare since such functions are not widely used. This may be considered a bug in gcc but is too involved to fix I'm told.
>

I have no idea if this is the problem, or something else more trivial such as
which constants are defined by difference compilers.

In the case of C++, I believe there is a problem with a new feature of C++;
something about "name spaces" (I do not know C++; this information comes from a
co-worker who played with solving the problem of compiling PostgreSQL with me).
I
also believe the SGI C++ compiler has a switch to make it revert to the earlier
style of "no-namespaces". I believe (untested by me) that this should work to
make
the SGI C++ compiler run thru PostgreSQL 6.5.3. If it is really crucial for
someone, I'll try to track down more information.

There seems to be enough trouble building PostgreSQL for Irix that I wonder if I
should prepare binaries for people. While I can not offer access from my work
site, I wonder about using a free web site like GeoCities? Has anyone had
experience with any free sites like this for downloading from?

Mark

--
Mark Dalphin email: mdalphin(at)amgen(dot)com
Mail Stop: 29-2-A phone: +1-805-447-4951 (work)
One Amgen Center Drive +1-805-375-0680 (home)
Thousand Oaks, CA 91320 fax: +1-805-499-9955 (work)

Browse pgsql-ports by date

  From Date Subject
Next Message G. Anthony Reina 2000-01-05 00:12:27 Re: [PORTS] Re: Postgress 6.5.3 on Irix 6.5.x?
Previous Message G. Anthony Reina 2000-01-04 23:57:52 Re: [PORTS] Re: Postgress 6.5.3 on Irix 6.5.x?