Small patch to compile on IRIX 6.5 with gcc

Started by Matteo Beccatiover 19 years ago4 messagespatches
Jump to latest
#1Matteo Beccati
php@beccati.com

Hi,

had some spare time and I've been finally able to install some tools to
compile PostgreSQL on my SGI Octane 2 box, which is running IRIX 6.5.30.

Afre succesfully installing gcc-3.3, gmake, readline and some other
freeware packages, I tried to compile PgSQL.

This is the configure line:

CC="/usr/freeware/bin/gcc" CFLAGS="-I/usr/freeware/include
-L/usr/freeware/lib32" ./configure

There were a lot of complaints about missing declaration for base
functions (i.e. malloc), and a few errors. The attached patch fixes the
errors and allows gmake to build all. There is no failure in the
regression tests.

Of course, the patch is just a hack. If anyone is wanting to properly
address it I could create and ssh account.

Best regards
--
Matteo Beccati
http://phpadsnew.com
http://phppgads.com

Attachments:

pgsql-sgi.difftext/plain; name=pgsql-sgi.diffDownload+7-0
#2Andrew Dunstan
andrew@dunslane.net
In reply to: Matteo Beccati (#1)
Re: Small patch to compile on IRIX 6.5 with gcc

Matteo Beccati wrote:

Hi,

had some spare time and I've been finally able to install some tools to
compile PostgreSQL on my SGI Octane 2 box, which is running IRIX 6.5.30.

Afre succesfully installing gcc-3.3, gmake, readline and some other
freeware packages, I tried to compile PgSQL.

This is the configure line:

CC="/usr/freeware/bin/gcc" CFLAGS="-I/usr/freeware/include
-L/usr/freeware/lib32" ./configure

There were a lot of complaints about missing declaration for base
functions (i.e. malloc), and a few errors. The attached patch fixes the
errors and allows gmake to build all. There is no failure in the
regression tests.

Of course, the patch is just a hack. If anyone is wanting to properly
address it I could create and ssh account.

+ #include <internal/stdlib_core.h>
+

This will break many, possibly most platforms. It is certainly absent on
this Linux box.

+ #include <sys/file.h>
+

Why is this needed?

Perhaps if you showed us the errors that result from not having these
things we could judge better how to address them.

cheers

andrew

#3Matteo Beccati
php@beccati.com
In reply to: Andrew Dunstan (#2)
Re: Small patch to compile on IRIX 6.5 with gcc

Hi Andrew,

+ #include <internal/stdlib_core.h>
+

This will break many, possibly most platforms. It is certainly absent on
this Linux box.

+ #include <sys/file.h>
+

Why is this needed?

Perhaps if you showed us the errors that result from not having these
things we could judge better how to address them.

I will do as soon as possible.

Best regards
--
Matteo Beccati
http://phpadsnew.com
http://phppgads.com

#4Matteo Beccati
php@beccati.com
In reply to: Andrew Dunstan (#2)
Re: Small patch to compile on IRIX 6.5 with gcc

Hi,

+ #include <internal/stdlib_core.h>

This will break many, possibly most platforms. It is certainly absent on
this Linux box.

+ #include <sys/file.h>

Why is this needed?

Perhaps if you showed us the errors that result from not having these
things we could judge better how to address them.

After some digging, it seems that gcc is using some custom header files
in /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/ as first match.

This files seem to be generated by fixincludes and some seem to be non
working (I.e. unistd.h is empty). Moving away unistd.h and stlib.h does
the trick and postgresql compiles without any patch.

template1=# SELECT VERSION();
version
---------------------------------------------------------------------
PostgreSQL 8.2.3 on mips-sgi-irix6.5, compiled by GCC gcc (GCC) 3.3
(1 row)

gmake check also runs without any failure.

Best regards
--
Matteo Beccati
http://phpadsnew.com
http://phppgads.com