Thread: postgresql 8.2 Installation error at "gmake"

postgresql 8.2 Installation error at "gmake"

From
Emi Lu
Date:
Hello,

Tried to install 8.2, configuration passed, but when running "gmake",
got the following error, any clues?

Thanks a lot!


Step1
========
./configure --prefix=/local/postgresql --datadir=/postgreSQL_data
--without-docdir --without-readline --disable-spinlocks --without-zlib

PASS!


Step2
========
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wendif-labels -fno-strict-aliasing zic.o ialloc.o scheck.o localtime.o
-L../../src/port  -Wl,-rpath,'/local/postgresql/lib' -lpgport -lcrypt
-ldl -lm  -o zic
zic.o(.text+0xb5f): In function `associate':
zic.c: undefined reference to `pg_qsort'
zic.o(.text+0x2c54): In function `writezone':
zic.c: undefined reference to `pg_qsort'
collect2: ld returned 1 exit status
gmake[2]: *** [zic] Error 1
gmake[2]: Leaving directory `/postgresql/src/timezone'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/postgresql/src'
gmake: *** [all] Error 2

FAIL?


Re: postgresql 8.2 Installation error at "gmake"

From
Alvaro Herrera
Date:
Emi Lu wrote:
> Hello,
>
> Tried to install 8.2, configuration passed, but when running "gmake",
> got the following error, any clues?

Please provide more details -- what operating system is this?

> Step1
> ========
> ./configure --prefix=/local/postgresql --datadir=/postgreSQL_data
> --without-docdir --without-readline --disable-spinlocks --without-zlib

Please note that --datadir does not do what you seem to think.  Remove
it, because it's going to cause other problems further on.  Also, if you
need --disable-spinlocks, your installation is not going to perform very
well; did you try without that?

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: postgresql 8.2 Installation error at "gmake"

From
Emi Lu
Date:
Hello,

>> Tried to install 8.2, configuration passed, but when running "gmake",
>> got the following error, any clues?
>
> Please provide more details -- what operating system is this?

i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.2


>> Step1
>> ========
>> ./configure --prefix=/local/postgresql --datadir=/postgreSQL_data
>> --without-docdir --without-readline --disable-spinlocks --without-zlib
>
> Please note that --datadir does not do what you seem to think.  Remove
> it, because it's going to cause other problems further on.  Also, if you
> need --disable-spinlocks, your installation is not going to perform very
> well; did you try without that?

I am not super user for this Linux OS! I can only access my directories.

Specified --datadir=/postgreSQL_data
because my previous version 8.0.0 DATA was there (which is not used anymore)

I do not care the spinlocks for now.

Thanks!


Re: postgresql 8.2 Installation error at "gmake"

From
Emi Lu
Date:
>
>>> Tried to install 8.2, configuration passed,

 >>> but when running "gmake",

>>> got the following error, any clues?

>>> Step1
>>> ========
>>> ./configure --prefix=/local/postgresql --datadir=/postgreSQL_data
>>> --without-docdir --without-readline --disable-spinlocks --without-zlib
>>
>> Please note that --datadir does not do what you seem to think.  Remove
>> it, because it's going to cause other problems further on.  Also, if you
>> need --disable-spinlocks, your installation is not going to perform very
>> well; did you try without that?
>
> I am not super user for this Linux OS! I can only access my directories.
>
> Specified --datadir=/postgreSQL_data
> because my previous version 8.0.0 DATA was there (which is not used
> anymore)

Also tried

./configure --prefix=/local/postgresql --without-docdir
--without-readline --without-zlib PASS

But gmake failed as well!


gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wendif-labels -fno-strict-aliasing zic.o ialloc.o scheck.o localtime.o
-L../../src/port  -Wl,-rpath,'/local/postgresql/lib' -lpgport -lcrypt
-ldl -lm  -o zic
zic.o(.text+0xb5f): In function `associate':
zic.c: undefined reference to `pg_qsort'
zic.o(.text+0x2c54): In function `writezone':
zic.c: undefined reference to `pg_qsort'
collect2: ld returned 1 exit status
gmake[2]: *** [zic] Error 1
gmake[2]: Leaving directory `/nfs/home/e/u/postgresql/src/timezone'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/nfs/home/e/u/postgresql/src'
gmake: *** [all] Error 2



Thanks !

Re: postgresql 8.2 Installation error at "gmake"

From
Alvaro Herrera
Date:
Emi Lu wrote:
> Hello,
>
> >>Tried to install 8.2, configuration passed, but when running "gmake",
> >>got the following error, any clues?
> >
> >Please provide more details -- what operating system is this?
>
> i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.2
>
>
> >>Step1
> >>========
> >>./configure --prefix=/local/postgresql --datadir=/postgreSQL_data
> >>--without-docdir --without-readline --disable-spinlocks --without-zlib
> >
> >Please note that --datadir does not do what you seem to think.  Remove
> >it, because it's going to cause other problems further on.  Also, if you
> >need --disable-spinlocks, your installation is not going to perform very
> >well; did you try without that?
>
> I am not super user for this Linux OS! I can only access my directories.
>
> Specified --datadir=/postgreSQL_data
> because my previous version 8.0.0 DATA was there (which is not used anymore)

You're confusing the "datadir" as understood by configure with the
PGDATA dir that's created by initdb.  Don't.  Leave the --datadir option
out.

> I do not care the spinlocks for now.

Configure will work anyway without the --disable-spinlock; you're
wasting your time with that option.

Anyway, please note that your linker problem does not seem to be related
to any of these options.

Do you happen to have a previous installation at /local/postgresql?  I
think the presence of an older libpgport.a there could be causing the
confusion.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Re: postgresql 8.2 Installation error at "gmake"

From
Emi Lu
Date:
Hello,

> Do you happen to have a previous installation at /local/postgresql?  I
> think the presence of an older libpgport.a there could be causing the
> confusion.


(1) \rm -r /local/postgresql


(2) ./configure --prefix=/local/postgresql --without-docdir
--without-readline --without-zlib

    The last line for the above configuration is:
config.status: linking ./src/makefiles/Makefile.linux to src/Makefile.port

(3) gmake

     ERROR shown in the attached file.


Thank you!





gmake
gmake -C doc all
gmake[1]: Entering directory `/postgresql-8.2.3/doc'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/postgresql-8.2.3/doc'
gmake -C src all
gmake[1]: Entering directory `/postgresql-8.2.3/src'
gmake -C port all
gmake[2]: Entering directory `/postgresql-8.2.3/src/port'
echo "#define PGBINDIR \"/local/postgresql/bin\"" >pg_config_paths.h
echo "#define PGSHAREDIR \"/local/postgresql/share\"" >>pg_config_paths.h
echo "#define SYSCONFDIR \"/local/postgresql/etc\"" >>pg_config_paths.h
echo "#define INCLUDEDIR \"/local/postgresql/include\"" >>pg_config_paths.h
echo "#define PKGINCLUDEDIR \"/local/postgresql/include\"" >>pg_config_paths.h
echo "#define INCLUDEDIRSERVER \"/local/postgresql/include/server\"" >>pg_config_paths.h
echo "#define LIBDIR \"/local/postgresql/lib\"" >>pg_config_paths.h
echo "#define PKGLIBDIR \"/local/postgresql/lib\"" >>pg_config_paths.h
echo "#define LOCALEDIR \"\"" >>pg_config_paths.h
echo "#define DOCDIR \"\"" >>pg_config_paths.h
echo "#define MANDIR \"/local/postgresql/man\"" >>pg_config_paths.h
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wendif-labels -fno-strict-aliasing -I../../src/port
-DFRONTEND-I../../src/include -D_GNU_SOURCE   -c -o path.o path.c 
ar crs libpgport.a strlcpy.o copydir.o dirmod.o exec.o noblock.o path.o pipe.o pgsleep.o pgstrcasecmp.o qsort.o
qsort_arg.osprompt.o thread.o 
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wendif-labels -fno-strict-aliasing  -I../../src/port
-I../../src/include-D_GNU_SOURCE  -c path.c -o path_srv.o 
ar crs libpgport_srv.a strlcpy_srv.o copydir_srv.o dirmod_srv.o exec_srv.o noblock_srv.o path_srv.o pipe_srv.o
pgsleep_srv.opgstrcasecmp_srv.o qsort_srv.o qsort_arg_srv.o sprompt_srv.o thread_srv.o 
gmake[2]: Leaving directory `/postgresql-8.2.3/src/port'
gmake -C timezone all
gmake[2]: Entering directory `/postgresql-8.2.3/src/timezone'
gmake -C ../../src/port all
gmake[3]: Entering directory `/postgresql-8.2.3/src/port'
gmake[3]: Nothing to be done for `all'.
gmake[3]: Leaving directory `/postgresql-8.2.3/src/port'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wendif-labels -fno-strict-aliasing zic.o ialloc.o scheck.o
localtime.o-L../../src/port  -Wl,-rpath,'/local/postgresql/lib' -lpgport -lcrypt -ldl -lm  -o zic 
zic.o(.text+0xb5f): In function `associate':
zic.c: undefined reference to `pg_qsort'
zic.o(.text+0x2c54): In function `writezone':
zic.c: undefined reference to `pg_qsort'
collect2: ld returned 1 exit status
gmake[2]: *** [zic] Error 1
gmake[2]: Leaving directory `/postgresql-8.2.3/src/timezone'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/postgresql-8.2.3/src'
gmake: *** [all] Error 2

Re: postgresql 8.2 Installation error at "gmake"

From
Emi Lu
Date:
>>>> Tried to install 8.2, configuration passed, but when running "gmake",
>>>> got the following error, any clues?
>>> Please provide more details -- what operating system is this?
>> i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.2
>>
>>
>>>> Step1
>>>> ========
>>>> ./configure --prefix=/local/postgresql --datadir=/postgreSQL_data
>>>> --without-docdir --without-readline --disable-spinlocks --without-zlib
>>> Please note that --datadir does not do what you seem to think.  Remove
>>> it, because it's going to cause other problems further on.  Also, if you
>>> need --disable-spinlocks, your installation is not going to perform very
>>> well; did you try without that?
>> I am not super user for this Linux OS! I can only access my directories.
>>
>> Specified --datadir=/postgreSQL_data
>> because my previous version 8.0.0 DATA was there (which is not used anymore)
>
> You're confusing the "datadir" as understood by configure with the
> PGDATA dir that's created by initdb.  Don't.  Leave the --datadir option
> out.
>
>> I do not care the spinlocks for now.
>
> Configure will work anyway without the --disable-spinlock; you're
> wasting your time with that option.
>
> Anyway, please note that your linker problem does not seem to be related
> to any of these options.
>
> Do you happen to have a previous installation at /local/postgresql?  I
> think the presence of an older libpgport.a there could be causing the
> confusion.

All right. I know how it caused the problem for me.

My gcc was not setup correctly. After changing the gcc, it works for me
now :).

Thank you for all your help!















Re: postgresql 8.2 Installation error at "gmake"

From
Emi Lu
Date:
Hello,

>> Configure will work anyway without the --disable-spinlock; you're
>> wasting your time with that option.
>>
>> Anyway, please note that your linker problem does not seem to be related
>> to any of these options.
>>
>> Do you happen to have a previous installation at /local/postgresql?  I
>> think the presence of an older libpgport.a there could be causing the
>> confusion.
>
> All right. I know how it caused the problem for me.
>
> My gcc was not setup correctly. After changing the gcc, it works for me
> now :).
>

Just have one comments about this,

(1)   ./configure --prefix=/local/postgresql --without-docdir
--without-readline --without-zlib CC=/usr/bin/gcc


Success for both 8.2.2 & 8.2.3 :)



(2) gmake

Success for 8.2.2 :)


But for base-8.2.3, I have the following error msg:

gmake -C pl all
gmake[2]: Entering directory `/postgresql-8.2.3/src/pl'
gmake[3]: Entering directory `/postgresql-8.2.3/src/pl/plpgsql'
gmake -C src all
gmake[4]: Entering directory `/postgresql-8.2.3/src/pl/plpgsql/src'
gmake[4]: Nothing to be done for `all'.
gmake[4]: Leaving directory `/postgresql-8.2.3/src/pl/plpgsql/src'
gmake[3]: Leaving directory `/postgresql-8.2.3/src/pl/plpgsql'
gmake[2]: Leaving directory `/postgresql-8.2.3/src/pl'
gmake -C makefiles all
gmake[2]: Entering directory `/postgresql-8.2.3/src/makefiles'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/postgresql-8.2.3/src/makefiles'
gmake -C test/regress all
gmake: *** test/regress: No such file or directory.  Stop.
gmake: Entering an unknown directorygmake: Leaving an unknown
directorygmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/postgresql-8.2.3/src'
gmake: *** [all] Error 2


Re: postgresql 8.2 Installation error at "gmake"

From
Alvaro Herrera
Date:
Emi Lu wrote:

> (2) gmake
>
> Success for 8.2.2 :)
>
>
> But for base-8.2.3, I have the following error msg:

Forget those "base" stuff.  It's broken.  Just get the whole package.
It's not that big anyway.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: postgresql 8.2 Installation error at "gmake"

From
Tom Lane
Date:
Emi Lu <emilu@encs.concordia.ca> writes:
>> Do you happen to have a previous installation at /local/postgresql?  I
>> think the presence of an older libpgport.a there could be causing the
>> confusion.

> (1) \rm -r /local/postgresql

> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wendif-labels -fno-strict-aliasing zic.o ialloc.o
scheck.olocaltime.o -L../../src/port  -Wl,-rpath,'/local/postgresql/lib' -lpgport -lcrypt -ldl -lm  -o zic 
> zic.o(.text+0xb5f): In function `associate':
> zic.c: undefined reference to `pg_qsort'
> zic.o(.text+0x2c54): In function `writezone':
> zic.c: undefined reference to `pg_qsort'
> collect2: ld returned 1 exit status

Still, I think Alvaro must be right: somehow the link is picking up an
older version of libpgport.  Maybe there's one in /usr/lib or
/usr/local/lib?

            regards, tom lane