postgresql 8.2 Installation error at "gmake"

Started by Emi Luabout 19 years ago10 messagesgeneral
Jump to latest
#1Emi Lu
emilu@encs.concordia.ca

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?

#2Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Emi Lu (#1)
Re: postgresql 8.2 Installation error at "gmake"

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

#3Emi Lu
emilu@encs.concordia.ca
In reply to: Alvaro Herrera (#2)
Re: postgresql 8.2 Installation error at "gmake"

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!

#4Emi Lu
emilu@encs.concordia.ca
In reply to: Emi Lu (#3)
Re: postgresql 8.2 Installation error at "gmake"

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 !

#5Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Emi Lu (#3)
Re: postgresql 8.2 Installation error at "gmake"

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.

#6Emi Lu
emilu@encs.concordia.ca
In reply to: Alvaro Herrera (#5)
Re: postgresql 8.2 Installation error at "gmake"

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!

Attachments:

result.txttext/plain; name=result.txtDownload
#7Emi Lu
emilu@encs.concordia.ca
In reply to: Alvaro Herrera (#5)
Re: postgresql 8.2 Installation error at "gmake"

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!

#8Emi Lu
emilu@encs.concordia.ca
In reply to: Emi Lu (#7)
Re: postgresql 8.2 Installation error at "gmake"

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

#9Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Emi Lu (#8)
Re: postgresql 8.2 Installation error at "gmake"

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

#10Tom Lane
tgl@sss.pgh.pa.us
In reply to: Emi Lu (#6)
Re: postgresql 8.2 Installation error at "gmake"

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.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

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