Re: [PATCHES] Makefile breakage
Tom Lane wrote: > Bruce Momjian writes: > > OK, here is a new patch. I called it 'libpq_pgport'. > > Looks alright to me now. Are you going to get this into 8.0.2beta? Yea, I guess. It really just has to be in our final release before 8.1. Would someone else eyeball it before I apply it, or should I just keep it for post 8.0.2? -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PATCHES] Makefile breakage
Bruce Momjian wrote: > Tom Lane wrote: > > Bruce Momjian writes: > > > OK, here is a new patch. I called it 'libpq_pgport'. > > > > Looks alright to me now. Are you going to get this into 8.0.2beta? > > Yea, I guess. It really just has to be in our final release before 8.1. > > Would someone else eyeball it before I apply it, or should I just keep > it for post 8.0.2? I just remembered 8.0.2 is going to get more testing than a typical 8.0.X release, so I am applying now. -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [PATCHES] Makefile breakage
Bruce Momjian writes: > OK, here is a new patch. I called it 'libpq_pgport'. Looks alright to me now. Are you going to get this into 8.0.2beta? regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [PATCHES] Makefile breakage
Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> I think you should leave the $(libpq) macro alone and add a $(libpgport) > >> macro ... and yes, you will have to go around and modify the client > >> program Makefiles individually. > > > How is this? It creates a new $(libpq_only) for library usage. > > ecpglib/Makefile is the only place I saw that can use it. > > I think you are creating long-term confusion in order to save yourself a > little bit of editing work. I don't object to having a combined macro > but it shouldn't be called $(libpq). Maybe $(libpq_plus_support) > or something like that ... or even libpq_plus_libpgport ... > > Also think about whether the hack in Makefile.global to add PTHREAD_LIBS > to $(libpq) ought to add them to $(libpq_plus_support) instead. I'm > not sure about that one ... it might be that you cannot link libpq > successfully without PTHREAD_LIBS in the cases where the hack fires. OK, here is a new patch. I called it 'libpq_pgport'. I restructured the code so the threading is added first, and uses just $libpq so it includes any thread additions. -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 Index: contrib/dbase/Makefile === RCS file: /cvsroot/pgsql/contrib/dbase/Makefile,v retrieving revision 1.6 diff -c -c -r1.6 Makefile *** contrib/dbase/Makefile 20 Aug 2004 20:13:02 - 1.6 --- contrib/dbase/Makefile 25 Mar 2005 17:59:39 - *** *** 3,9 PROGRAM = dbf2pg OBJS = dbf.o dbf2pg.o endian.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq) # Uncomment this to provide charset translation #PG_CPPFLAGS += -DHAVE_ICONV_H --- 3,9 PROGRAM = dbf2pg OBJS = dbf.o dbf2pg.o endian.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq_pgport) # Uncomment this to provide charset translation #PG_CPPFLAGS += -DHAVE_ICONV_H Index: contrib/findoidjoins/Makefile === RCS file: /cvsroot/pgsql/contrib/findoidjoins/Makefile,v retrieving revision 1.16 diff -c -c -r1.16 Makefile *** contrib/findoidjoins/Makefile 20 Aug 2004 20:13:03 - 1.16 --- contrib/findoidjoins/Makefile 25 Mar 2005 17:59:39 - *** *** 4,10 OBJS = findoidjoins.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq) SCRIPTS = make_oidjoins_check DOCS = README.findoidjoins --- 4,10 OBJS = findoidjoins.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq_pgport) SCRIPTS = make_oidjoins_check DOCS = README.findoidjoins Index: contrib/oid2name/Makefile === RCS file: /cvsroot/pgsql/contrib/oid2name/Makefile,v retrieving revision 1.6 diff -c -c -r1.6 Makefile *** contrib/oid2name/Makefile 20 Aug 2004 20:13:05 - 1.6 --- contrib/oid2name/Makefile 25 Mar 2005 17:59:39 - *** *** 4,10 OBJS = oid2name.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq) DOCS = README.oid2name --- 4,10 OBJS = oid2name.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq_pgport) DOCS = README.oid2name Index: contrib/pg_autovacuum/Makefile === RCS file: /cvsroot/pgsql/contrib/pg_autovacuum/Makefile,v retrieving revision 1.3 diff -c -c -r1.3 Makefile *** contrib/pg_autovacuum/Makefile 16 Oct 2004 21:50:02 - 1.3 --- contrib/pg_autovacuum/Makefile 25 Mar 2005 17:59:39 - *** *** 2,8 OBJS = pg_autovacuum.o dllist.o PG_CPPFLAGS = -I$(libpq_srcdir) -DFRONTEND ! PG_LIBS = $(libpq) DOCS = README.pg_autovacuum --- 2,8 OBJS = pg_autovacuum.o dllist.o PG_CPPFLAGS = -I$(libpq_srcdir) -DFRONTEND ! PG_LIBS = $(libpq_pgport) DOCS = README.pg_autovacuum Index: contrib/pg_dumplo/Makefile === RCS file: /cvsroot/pgsql/contrib/pg_dumplo/Makefile,v retrieving revision 1.13 diff -c -c -r1.13 Makefile *** contrib/pg_dumplo/Makefile 20 Aug 2004 20:13:05 - 1.13 --- contrib/pg_dumplo/Makefile 25 Mar 2005 17:59:39 - *** *** 4,10 OBJS = main.o lo_export.o lo_import.o utils.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq) DOCS = README.pg_dumplo --- 4,10 OBJS = main.o lo_export.o lo_import.o utils.o PG_CPPFLAGS = -I$(libpq_srcdir) ! PG_LIBS = $(libpq_pgport) DOCS = README.pg_dumplo Index: contrib/pgbench/Makefile === RCS file: /cvsroot/pgsql/contrib/pgbench/Makefile,v retrieving revision 1.12 diff -c -c -r1.12
Re: [PATCHES] Makefile breakage
Bruce Momjian writes: > Tom Lane wrote: >> I think you should leave the $(libpq) macro alone and add a $(libpgport) >> macro ... and yes, you will have to go around and modify the client >> program Makefiles individually. > How is this? It creates a new $(libpq_only) for library usage. > ecpglib/Makefile is the only place I saw that can use it. I think you are creating long-term confusion in order to save yourself a little bit of editing work. I don't object to having a combined macro but it shouldn't be called $(libpq). Maybe $(libpq_plus_support) or something like that ... or even libpq_plus_libpgport ... Also think about whether the hack in Makefile.global to add PTHREAD_LIBS to $(libpq) ought to add them to $(libpq_plus_support) instead. I'm not sure about that one ... it might be that you cannot link libpq successfully without PTHREAD_LIBS in the cases where the hack fires. regards, tom lane ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PATCHES] Makefile breakage
Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> You can't just arbitrarily pull in libpgport.a everywhere that libpq.so > >> is used. That breaks anything that requires position-independent code > >> ... for instance ecpglib. > > > Strange because it worked on my BSD system and I do compile ecpg. What > > do you suggest? Is this worth fixing somehow? > > Intel machines tend not to care whether code is officially > position-independent or not. Most other platforms are sticky about it. > You don't have a choice whether to fix it. > > I think you should leave the $(libpq) macro alone and add a $(libpgport) > macro ... and yes, you will have to go around and modify the client > program Makefiles individually. How is this? It creates a new $(libpq_only) for library usage. ecpglib/Makefile is the only place I saw that can use it. -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 Index: src/Makefile.global.in === RCS file: /cvsroot/pgsql/src/Makefile.global.in,v retrieving revision 1.211 diff -c -c -r1.211 Makefile.global.in *** src/Makefile.global.in 24 Mar 2005 23:53:48 - 1.211 --- src/Makefile.global.in 25 Mar 2005 02:51:45 - *** *** 306,313 libpq_builddir = $(top_builddir)/src/interfaces/libpq endif ! libpq = -L$(libpq_builddir) -lpq # If doing static linking, shared library dependency can't be # used so we specify pthread libs for every usage of libpq ifeq ($(enable_shared), no) --- 306,327 libpq_builddir = $(top_builddir)/src/interfaces/libpq endif ! # Force clients to pull symbols from the non-shared library libpgport ! # rather than pulling some libpgport symbols from libpq just because ! # libpq uses those functions too. This makes applications less ! # dependent on changes in libpq's usage of pgport. To do this we link to ! # pgport before libpq. This does cause duplicate -lpgport's to appear ! # on client link lines. ! ifdef PGXS ! libpq = -L$(libdir) -lpgport -L$(libpq_builddir) -lpq ! else ! libpq = -L$(top_builddir)/src/port -lpgport -L$(libpq_builddir) -lpq ! endif + # This is for use for libraries linking to libpq. Because libpqport + # isn't created with the same link flags as libpq, it can't be used. + libpq_libonly = -L$(libpq_builddir) -lpq + # If doing static linking, shared library dependency can't be # used so we specify pthread libs for every usage of libpq ifeq ($(enable_shared), no) Index: src/interfaces/ecpg/compatlib/Makefile === RCS file: /cvsroot/pgsql/src/interfaces/ecpg/compatlib/Makefile,v retrieving revision 1.21 diff -c -c -r1.21 Makefile *** src/interfaces/ecpg/compatlib/Makefile 14 Mar 2005 17:27:49 - 1.21 --- src/interfaces/ecpg/compatlib/Makefile 25 Mar 2005 02:51:48 - *** *** 20,26 override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdir) \ -I$(top_srcdir)/src/include/utils $(CPPFLAGS) override CFLAGS += $(PTHREAD_CFLAGS) ! SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq) \ $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(PTHREAD_LIBS) OBJS= informix.o --- 20,26 override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdir) \ -I$(top_srcdir)/src/include/utils $(CPPFLAGS) override CFLAGS += $(PTHREAD_CFLAGS) ! SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq_libonly) \ $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(PTHREAD_LIBS) OBJS= informix.o Index: src/interfaces/ecpg/ecpglib/Makefile === RCS file: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/Makefile,v retrieving revision 1.33 diff -c -c -r1.33 Makefile *** src/interfaces/ecpg/ecpglib/Makefile14 Mar 2005 17:27:50 - 1.33 --- src/interfaces/ecpg/ecpglib/Makefile25 Mar 2005 02:51:48 - *** *** 27,33 OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \ connect.o misc.o path.o exec.o ! SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) \ $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(PTHREAD_LIBS) ifeq ($(PORTNAME), win32) --- 27,33 OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \ connect.o misc.o path.o exec.o ! SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq_libonly) \ $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(PTHREAD_LIBS) ifeq ($(PORTNAME), win32) ---(end of broadcast)--- TIP
Re: [PATCHES] Makefile breakage
Bruce Momjian writes: > Tom Lane wrote: >> You can't just arbitrarily pull in libpgport.a everywhere that libpq.so >> is used. That breaks anything that requires position-independent code >> ... for instance ecpglib. > Strange because it worked on my BSD system and I do compile ecpg. What > do you suggest? Is this worth fixing somehow? Intel machines tend not to care whether code is officially position-independent or not. Most other platforms are sticky about it. You don't have a choice whether to fix it. I think you should leave the $(libpq) macro alone and add a $(libpgport) macro ... and yes, you will have to go around and modify the client program Makefiles individually. regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [PATCHES] Makefile breakage
Tom Lane wrote: > You can't just arbitrarily pull in libpgport.a everywhere that libpq.so > is used. That breaks anything that requires position-independent code > ... for instance ecpglib. Strange because it worked on my BSD system and I do compile ecpg. What do you suggest? Is this worth fixing somehow? -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
[PATCHES] Makefile breakage
You can't just arbitrarily pull in libpgport.a everywhere that libpq.so is used. That breaks anything that requires position-independent code ... for instance ecpglib. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]