Thread: Can't compile 6.4.2 on Solaris 2.6

Can't compile 6.4.2 on Solaris 2.6

From
Patrick Verdon
Date:
Hi all,

I don't know what's going on here. I simply
cannot compile PostgreSQL 6.4.2 on SPARC
Solaris 2.6. The first trouble arises in the
configure script:

kandinsky:root# ./configure
creating cache ./config.cache
checking host system type... sparc-sun-solaris2.6
checking echo setting...
checking setting template to... solaris_sparc_gcc
./configure: conftest.sh: not found

I think the problem here seems to be at line 743:

741: rm -f conftest.sh
742: sed 's/^\([A-Za-z_]*\):\(.*\)$/\1="\2"/' "template/$TEMPLATE" >conftest.sh
743: . conftest.sh
744: rm -f conftest.sh

I changed it to:

741: rm -f conftest.sh
742: sed 's/^\([A-Za-z_]*\):\(.*\)$/\1="\2"/' "template/$TEMPLATE" >conftest.sh
743: chmod +x conftest.sh; ./conftest.sh
744: rm -f conftest.sh

and configure finally lurched into action.

But then it fell over when compiling too!:

gmake[3]: Entering directory `/usr/local/src/postgresql-6.4.2/src/backend/access/transam'
gcc -I../../../include -I../../../backend   -g -O2  -Wall -Wmissing-prototypes -I../..    -c transam.c -o transam.o
gcc -I../../../include -I../../../backend   -g -O2  -Wall -Wmissing-prototypes -I../..    -c transsup.c -o transsup.o
gcc -I../../../include -I../../../backend   -g -O2  -Wall -Wmissing-prototypes -I../..    -c varsup.c -o varsup.o
gcc -I../../../include -I../../../backend   -g -O2  -Wall -Wmissing-prototypes -I../..    -c xact.c -o xact.o
gcc -I../../../include -I../../../backend   -g -O2  -Wall -Wmissing-prototypes -I../..    -c xid.c -o xid.o
ld -r -o SUBSYS.o transam.o transsup.o varsup.o xact.o xid.o
gmake[3]: Leaving directory `/usr/local/src/postgresql-6.4.2/src/backend/access/transam'
ld -r -o SUBSYS.o common/SUBSYS.o gist/SUBSYS.o hash/SUBSYS.o heap/SUBSYS.o index/SUBSYS.o rtree/SUBSYS.o
nbtree/SUBSYS.otransam/SUBSYS.o 
gmake[2]: Leaving directory `/usr/local/src/postgresql-6.4.2/src/backend/access'
gmake -C bootstrap all
gmake[2]: Entering directory `/usr/local/src/postgresql-6.4.2/src/backend/bootstrap'
/usr/local/bin/bison -y  bootparse.y
grep -v "^#" boot.sed > sedfile
sed -f sedfile < y.tab.c > bootparse.c
mv y.tab.h bootstrap_tokens.h
mv: cannot access y.tab.h
gmake[2]: *** [bootparse.c] Error 2
gmake[2]: Leaving directory `/usr/local/src/postgresql-6.4.2/src/backend/bootstrap'
gmake[1]: *** [bootstrap.dir] Error 2
gmake[1]: Leaving directory `/usr/local/src/postgresql-6.4.2/src/backend'
gmake: *** [all] Error 2

??

What's going on here? Postgresql-v6.4 compiles fine.

I'm using:

SPARC Solaris 2.6 5/98 + sundry patches
gcc 2.8.1
flex 2.5.4a
bison 1.25

Has anyone else got 6.4.2 working on Solaris 2.6?

Cheers.



Patrick

--

#===============================#
\  KAN Design & Publishing Ltd  /
/  T: +44 (0)1223 511134        \
\  F: +44 (0)1223 571968        /
/  E: mailto:patrick@kan.co.uk  \
\  W: http://www.kan.co.uk      /
#===============================#

RE: [GENERAL] Can't compile 6.4.2 on Solaris 2.6

From
"Daryl W. Dunbar"
Date:
Make sure '.' is in your path.  Also, make sure you are running sh.
You can simply sh ./configure.

I also had to install flex first.  (Make sure it's in your path,
probably /usr/local/bin.)

On Solaris7 with gcc, I ran:
./configure --without-CXX

DwD

> -----Original Message-----
> From: owner-pgsql-general@postgreSQL.org
> [mailto:owner-pgsql-general@postgreSQL.org]On Behalf Of
> Patrick Verdon
> Sent: Saturday, February 13, 1999 6:12 PM
> To: pgsql-general@postgreSQL.org
> Subject: [GENERAL] Can't compile 6.4.2 on Solaris 2.6
>
>
>
> Hi all,
>
> I don't know what's going on here. I simply
> cannot compile PostgreSQL 6.4.2 on SPARC
> Solaris 2.6. The first trouble arises in the
> configure script:
>
> kandinsky:root# ./configure
> creating cache ./config.cache
> checking host system type... sparc-sun-solaris2.6
> checking echo setting...
> checking setting template to... solaris_sparc_gcc
> ./configure: conftest.sh: not found
>
> I think the problem here seems to be at line 743:
>
> 741: rm -f conftest.sh
> 742: sed 's/^\([A-Za-z_]*\):\(.*\)$/\1="\2"/'
> "template/$TEMPLATE" >conftest.sh
> 743: . conftest.sh
> 744: rm -f conftest.sh
>
> I changed it to:
>
> 741: rm -f conftest.sh
> 742: sed 's/^\([A-Za-z_]*\):\(.*\)$/\1="\2"/'
> "template/$TEMPLATE" >conftest.sh
> 743: chmod +x conftest.sh; ./conftest.sh
> 744: rm -f conftest.sh
>
> and configure finally lurched into action.
>
> But then it fell over when compiling too!:
>
> gmake[3]: Entering directory
> `/usr/local/src/postgresql-6.4.2/src/backend/access/transam'
> gcc -I../../../include -I../../../backend   -g -O2  -Wall
> -Wmissing-prototypes -I../..    -c transam.c -o transam.o
> gcc -I../../../include -I../../../backend   -g -O2  -Wall
> -Wmissing-prototypes -I../..    -c transsup.c -o transsup.o
> gcc -I../../../include -I../../../backend   -g -O2  -Wall
> -Wmissing-prototypes -I../..    -c varsup.c -o varsup.o
> gcc -I../../../include -I../../../backend   -g -O2  -Wall
> -Wmissing-prototypes -I../..    -c xact.c -o xact.o
> gcc -I../../../include -I../../../backend   -g -O2  -Wall
> -Wmissing-prototypes -I../..    -c xid.c -o xid.o
> ld -r -o SUBSYS.o transam.o transsup.o varsup.o xact.o xid.o
> gmake[3]: Leaving directory
> `/usr/local/src/postgresql-6.4.2/src/backend/access/transam'
> ld -r -o SUBSYS.o common/SUBSYS.o gist/SUBSYS.o
> hash/SUBSYS.o heap/SUBSYS.o index/SUBSYS.o rtree/SUBSYS.o
> nbtree/SUBSYS.o transam/SUBSYS.o
> gmake[2]: Leaving directory
> `/usr/local/src/postgresql-6.4.2/src/backend/access'
> gmake -C bootstrap all
> gmake[2]: Entering directory
> `/usr/local/src/postgresql-6.4.2/src/backend/bootstrap'
> /usr/local/bin/bison -y  bootparse.y
> grep -v "^#" boot.sed > sedfile
> sed -f sedfile < y.tab.c > bootparse.c
> mv y.tab.h bootstrap_tokens.h
> mv: cannot access y.tab.h
> gmake[2]: *** [bootparse.c] Error 2
> gmake[2]: Leaving directory
> `/usr/local/src/postgresql-6.4.2/src/backend/bootstrap'
> gmake[1]: *** [bootstrap.dir] Error 2
> gmake[1]: Leaving directory
> `/usr/local/src/postgresql-6.4.2/src/backend'
> gmake: *** [all] Error 2
>
> ??
>
> What's going on here? Postgresql-v6.4 compiles fine.
>
> I'm using:
>
> SPARC Solaris 2.6 5/98 + sundry patches
> gcc 2.8.1
> flex 2.5.4a
> bison 1.25
>
> Has anyone else got 6.4.2 working on Solaris 2.6?
>
> Cheers.
>
>
>
> Patrick
>
> --
>
> #===============================#
> \  KAN Design & Publishing Ltd  /
> /  T: +44 (0)1223 511134        \
> \  F: +44 (0)1223 571968        /
> /  E: mailto:patrick@kan.co.uk  \
> \  W: http://www.kan.co.uk      /
> #===============================#
>


Re: [GENERAL] Can't compile 6.4.2 on Solaris 2.6

From
Patrick Verdon
Date:
Hi Daryl,

Thanks muchly for your help.

> Make sure '.' is in your path.  Also, make sure you are running sh.
> You can simply sh ./configure.

This was indeed the cause of the problem. It seems a
bit ridiculous that you need to have '.' in your PATH
to install PostgreSQL. These problems have obviously
been introduced at 6.4.2 because I can compile previous
versions without taking these steps.

> On Solaris7 with gcc, I ran:
> ./configure --without-CXX

Thanks also for this pointer - this is something else
that seems to have been introduced at 6.4.2 because
I've never had to add --without-CXX before and
without it the compile fails like so:

gmake -C libpq++ all
gmake[2]: Entering directory `/usr/local/src/postgresql-6.4.2/src/interfaces/libpq++'
gcc  -I../../backend -I../../include -I../../interfaces/libpq -I../../include -I../../backend     -Wall
-Wmissing-prototypes-fPIC   -c pgenv.cc -o pgenv.o 
In file included from pgenv.cc:23:
pgenv.h:21: string: No such file or directory
gmake[2]: *** [pgenv.o] Error 1
gmake[2]: Leaving directory `/usr/local/src/postgresql-6.4.2/src/interfaces/libpq++'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/local/src/postgresql-6.4.2/src/interfaces'
gmake: *** [all] Error 2

Does anyone know why all these complications have
been introduced for Solaris compilation? Why change
procedures that have worked for ages??

Anyway - thanks again - postmaster is up and
running now.



Patrick

--

#===============================#
\  KAN Design & Publishing Ltd  /
/  T: +44 (0)1223 511134        \
\  F: +44 (0)1223 571968        /
/  E: mailto:patrick@kan.co.uk  \
\  W: http://www.kan.co.uk      /
#===============================#