Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

[HACKERS] Bugs in version 970126


  • From: Massimo Dal Zotto <dz(at)cs(dot)unitn(dot)it>
  • Subject: [HACKERS] Bugs in version 970126
  • Date: Tue, 28 Jan 1997 12:37:49 +0100 (MET)

I have just compiled the version 970126 and found the following bugs (some
of them had already been reported last week).

1)	in config.h there is a reference to sys/select.h which doesn't exist
	under linux. I have undefined the flag in the linux section of the
	config and now it compiles ok.

2)	the libraries are installed with permission 664. In my opinion 444
	would be a better choice.

3)	in backend/Makefile postgres is linked again every time one tries to
	make anything. It should be made only if some of the OBJS has changed.
	Maybe we could also remove the postgres_group... targets ? I haven't
	really understood why they are needed.

4)	in libpgtcl/Makefile there is an error in the installation of the
	shared version of the library. It is installed with a wrong name
	and then replaced with a link to a non existing file:

	# tclsh
	% load /usr/local/pgsql/lib/libpgtcl.so
	couldn't load file "/usr/local/pgsql/lib/libpgtcl.so": File not found
	% load /usr/local/pgsql/lib/libpgtcl.so.1
	couldn't load file "/usr/local/pgsql/lib/libpgtcl.so.1": File not found

	# ls -l /usr/local/pgsql/lib/libpgtcl.s*
	lrwxrwxrwx   1 root     root           13 Jan 28 10:04 /usr/local/pgsql/lib/libpgtcl.so -> libpgtcl.so.1

5)	after installing manually the above library it can't still be loaded
	in tcl because it has not been linked correctly with the libpq, which
	is needed for the dynamic loading.
	The error is in libpq/Makefile which doesn't create the link libpq.so
	required by the linux linker to include a reference to it when the
	-rdynamic flag is used.

	% [ris02] /usr/local/pgsql/src # tclsh
	% load /usr/local/pgsql/lib/libpgtcl.so.1
	tclsh: can't resolve symbol 'pgresStatus'
	tclsh: can't resolve symbol 'lo_export'
	tclsh: can't resolve symbol 'lo_unlink'
	tclsh: can't resolve symbol 'PQfsize'
	tclsh: can't resolve symbol 'PQconnectdb'
	tclsh: can't resolve symbol 'PQftype'
	tclsh: can't resolve symbol 'lo_write'
	tclsh: can't resolve symbol 'lo_lseek'
	tclsh: can't resolve symbol 'PQexec'
	tclsh: can't resolve symbol 'PQntuples'
	tclsh: can't resolve symbol 'lo_tell'
	tclsh: can't resolve symbol 'PQconndefaults'
	tclsh: can't resolve symbol 'lo_read'
	tclsh: can't resolve symbol 'PQclear'
	tclsh: can't resolve symbol 'PQoidStatus'
	tclsh: can't resolve symbol 'lo_import'
	tclsh: can't resolve symbol 'PQresultStatus'
	tclsh: can't resolve symbol 'PQgetvalue'
	tclsh: can't resolve symbol 'PQnfields'
	tclsh: can't resolve symbol 'lo_creat'
	tclsh: can't resolve symbol 'PQsetdb'
	tclsh: can't resolve symbol 'PQfname'
	tclsh: can't resolve symbol 'lo_open'
	tclsh: can't resolve symbol 'PQnotifies'
	tclsh: can't resolve symbol 'lo_close'
	tclsh: can't resolve symbol 'PQfinish'
	couldn't load file "/usr/local/pgsql/lib/libpgtcl.so.1": Unable to resolve symbol

These are the patches I have applied to the sources to correct the problems.

- --- config.patch -------------------------------------------------------------
*** src/include/config.h.orig	Sun Jan 26 00:01:47 1997
- --- src/include/config.h	Tue Jan 28 09:30:40 1997
***************
*** 141,146 ****
- --- 141,147 ----
     __USE_BSD is set by bsd/signal.h, and __USE_BSD_SIGNAL appears not to
     be used.
  */
+ #  undef HAVE_SYS_SELECT_H
  #  define JMP_BUF
  #  define USE_POSIX_TIME
  #  define HAVE_TZSET
- ------------------------------------------------------------------------------


- --- makefile-global.patch ----------------------------------------------------
*** src/Makefile.global.orig	Sun Jan 26 00:00:30 1997
- --- src/Makefile.global	Tue Jan 28 09:57:09 1997
***************
*** 237,243 ****
  
  INSTLOPTS= -c -m 444
  INSTL_EXE_OPTS= -c -m 555
! INSTL_LIB_OPTS= -c -m 664
  
  ##############################################################################
  #
- --- 237,243 ----
  
  INSTLOPTS= -c -m 444
  INSTL_EXE_OPTS= -c -m 555
! INSTL_LIB_OPTS= -c -m 444
  
  ##############################################################################
  #
- ------------------------------------------------------------------------------


- --- backend-makefile.patch ---------------------------------------------------
*** src/backend/Makefile.orig	Mon Jan  6 00:00:18 1997
- --- src/backend/Makefile	Tue Jan 28 10:00:30 1997
***************
*** 59,67 ****
  EXP =
  endif
  
! all: postgres $(EXP) global1.bki.source local1_template1.bki.source
  
! postgres: postgres_group1 postgres_group2 postgres_group3 postgres_group4 
  	$(CC) $(LDFLAGS) -o postgres $(OBJS) $(LD_ADD)
  
  postgres_group1:
- --- 59,70 ----
  EXP =
  endif
  
! all: postmaster $(EXP) global1.bki.source local1_template1.bki.source
  
! postmaster: postgres_group1 postgres_group2 postgres_group3 postgres_group4 \
! 	    postgres
! 
! postgres: $(OBJS)
  	$(CC) $(LDFLAGS) -o postgres $(OBJS) $(LD_ADD)
  
  postgres_group1:
- ------------------------------------------------------------------------------


- --- libpgtcl-makefile.patch --------------------------------------------------
*** src/libpgtcl/Makefile.orig	Thu Jan 23 18:01:33 1997
- --- src/libpgtcl/Makefile	Tue Jan 28 09:01:22 1997
***************
*** 80,86 ****
  
  install-shlib: libpgtcl.so.1
  	$(INSTALL) $(INSTL_LIB_OPTS) libpgtcl.so.1 \
! 		$(DESTDIR)$(LIBDIR)/libpgtcl.so
  	rm -f $(DESTDIR)$(LIBDIR)/libpgtcl.so
  	ln -s libpgtcl.so.1 $(DESTDIR)$(LIBDIR)/libpgtcl.so
  
- --- 80,86 ----
  
  install-shlib: libpgtcl.so.1
  	$(INSTALL) $(INSTL_LIB_OPTS) libpgtcl.so.1 \
! 		$(DESTDIR)$(LIBDIR)/libpgtcl.so.1
  	rm -f $(DESTDIR)$(LIBDIR)/libpgtcl.so
  	ln -s libpgtcl.so.1 $(DESTDIR)$(LIBDIR)/libpgtcl.so
  
- ------------------------------------------------------------------------------


- --- libpq-makefile.patch -----------------------------------------------------
*** src/libpq/Makefile.orig	Mon Jan 20 06:01:48 1997
- --- src/libpq/Makefile	Tue Jan 28 09:01:17 1997
***************
*** 62,67 ****
- --- 62,69 ----
  
  libpq.so.1: $(OBJS)
  	gcc $(LDFLAGS) -shared -o $@ $(OBJS)
+ 	rm -f libpq.so
+ 	ln -s libpq.so.1 libpq.so
  
  c.h: ../include/c.h
  	rm -f c.h
***************
*** 130,135 ****
- --- 132,139 ----
  
  install-shlib: $(shlib)
  	$(INSTALL) $(INSTL_LIB_OPTS) $(shlib) $(DESTDIR)$(LIBDIR)/$(shlib)
+ 	rm -f $(DESTDIR)$(LIBDIR)/libpq.so
+ 	ln -s libpq.so.1 $(DESTDIR)$(LIBDIR)/libpq.so
  
  depend dep:
  	$(CC) -MM $(INCLUDE_OPT) *.c >depend
- ------------------------------------------------------------------------------


Massimo Dal Zotto

+----------------------------------------------------------------------+
|  Massimo Dal Zotto                e-mail:  dz(at)cs(dot)unitn(dot)it            |
|  Via Marconi, 141                 phone/fax:  ++39-461-534251        |
|  38057 Pergine Valsugana (TN)     pgp:  finger dz(at)tango(dot)cs(dot)unitn(dot)it  |
|  Italy                                                               |
+----------------------------------------------------------------------+

------------------------------



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group