[PATCHES] LDFLAGS overriding
Overriding the value of LDFLAGS breaks the build: $ make LDFLAGS=-g gcc-3.4 -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations -DFRONTEND -I../../src/include -I/home/neilc/build-pgsql/src/../../pgsql/src/include -D_GNU_SOURCE -c -o dirmod.o dirmod.c -MMD gcc-3.4 -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations zic.o ialloc.o scheck.o localtime.o dirmod.o -g -lpgport -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -o zic /usr/bin/ld: cannot find -lpgport collect2: ld returned 1 exit status make[2]: *** [zic] Error 1 make[2]: Leaving directory `/home/neilc/build-pgsql/src/timezone' make[1]: *** [all] Error 2 (The -g flag is just for example.) IMHO we ought to let users override LDFLAGS, just like we let them override CFLAGS. When we need to modify LDFLAGS unconditionally (i.e. regardless of whether the user has already defined it), the override directive should be used. Attached is a trivial patch that fixes the build for me. There are a few other assignments/concatenations to LDFLAGS that are going to be skipped if there is a user-defined LDFLAGS (e.g. enabling rpath in src/Makefile.global.in, and some HPUX port-specific stuff). I wasn't sure if this should also ignore user-defined LDFLAGS, so I didn't modify it. Comments? (I won't claim to be a make expert, so it's entirely possible this change is off the mark.) -Neil ? autom4te.cache Index: src/Makefile.global.in === RCS file: /home/neilc/private-cvsroot/pgsql-server/src/Makefile.global.in,v retrieving revision 1.195 diff -c -r1.195 Makefile.global.in *** src/Makefile.global.in 18 Sep 2004 13:28:54 - 1.195 --- src/Makefile.global.in 28 Sep 2004 10:07:21 - *** *** 361,369 LIBS := -lpgport $(LIBS) ifdef PGXS # where libpgport.a is installed ! LDFLAGS := -L$(libdir) $(LDFLAGS) else ! LDFLAGS := -L$(top_builddir)/src/port $(LDFLAGS) endif endif --- 361,369 LIBS := -lpgport $(LIBS) ifdef PGXS # where libpgport.a is installed ! override LDFLAGS := -L$(libdir) $(LDFLAGS) else ! override LDFLAGS := -L$(top_builddir)/src/port $(LDFLAGS) endif endif ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [PATCHES] [pgsql-hackers-win32] VC++ psql build broken
-Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED] Sent: 27 September 2004 23:58 To: Dave Page Cc: PgSQL Win32 developers; PostgreSQL Patches Subject: Re: [pgsql-hackers-win32] VC++ psql build broken I have fixed this issue with Dave's help. Hmm, not entirely it seems. An include path got missed out of the patch - see the attached fix. This also adds debug build support to src/bin/psql/win32.mak. Also: - The crash I was seeing last night appears to only occur when using mingw compiled libpq. Using the ones compiled with the VC++ build works just fine. The Windows installer puts libpq.dll and a couple of SSL libs in the Windows\System32 directory, so this potentially could cause some support emails. Strangely, pgAdmin works OK with my mingw compiled libpq.dll (with an import lib created from pq.def using VC++'s lib.exe), even though it is built with VC++ Windows. It crashes with the VC++ compiled libpq. - Compiling on a clean tree I now get the warnings below (sorry, I must have forgotten to try a completely clean build in my weary state last night :-) ): command.c C:\PROGRA~1\MICROS~3\VC98\INCLUDE\direct.h(132) : warning C4003: not enough actual parameters for macro 'mkdir' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005: 'SIG_DFL' : macro redefinition ..\..\include\port/win32.h(118) : see previous definition of 'SIG_DFL' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005: 'SIG_IGN' : macro redefinition ..\..\include\port/win32.h(120) : see previous definition of 'SIG_IGN' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005: 'SIG_ERR' : macro redefinition ..\..\include\port/win32.h(119) : see previous definition of 'SIG_ERR' common.c C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005: 'SIG_DFL' : macro redefinition ..\..\include\port/win32.h(118) : see previous definition of 'SIG_DFL' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005: 'SIG_IGN' : macro redefinition ..\..\include\port/win32.h(120) : see previous definition of 'SIG_IGN' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005: 'SIG_ERR' : macro redefinition ..\..\include\port/win32.h(119) : see previous definition of 'SIG_ERR' common.c(536) : warning C4018: '' : signed/unsigned mismatch copy.c C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005: 'SIG_DFL' : macro redefinition ..\..\include\port/win32.h(118) : see previous definition of 'SIG_DFL' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005: 'SIG_IGN' : macro redefinition ..\..\include\port/win32.h(120) : see previous definition of 'SIG_IGN' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005: 'SIG_ERR' : macro redefinition ..\..\include\port/win32.h(119) : see previous definition of 'SIG_ERR' describe.c C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005: 'SIG_DFL' : macro redefinition ..\..\include\port/win32.h(118) : see previous definition of 'SIG_DFL' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005: 'SIG_IGN' : macro redefinition ..\..\include\port/win32.h(120) : see previous definition of 'SIG_IGN' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005: 'SIG_ERR' : macro redefinition ..\..\include\port/win32.h(119) : see previous definition of 'SIG_ERR' help.c C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005: 'SIG_DFL' : macro redefinition ..\..\include\port/win32.h(118) : see previous definition of 'SIG_DFL' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005: 'SIG_IGN' : macro redefinition ..\..\include\port/win32.h(120) : see previous definition of 'SIG_IGN' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005: 'SIG_ERR' : macro redefinition ..\..\include\port/win32.h(119) : see previous definition of 'SIG_ERR' input.c C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005: 'SIG_DFL' : macro redefinition ..\..\include\port/win32.h(118) : see previous definition of 'SIG_DFL' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005: 'SIG_IGN' : macro redefinition ..\..\include\port/win32.h(120) : see previous definition of 'SIG_IGN' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005: 'SIG_ERR' : macro redefinition ..\..\include\port/win32.h(119) : see previous definition of 'SIG_ERR' large_obj.c C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005: 'SIG_DFL' : macro redefinition ..\..\include\port/win32.h(118) : see previous definition of 'SIG_DFL' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005: 'SIG_IGN' : macro redefinition ..\..\include\port/win32.h(120) : see previous definition of 'SIG_IGN' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005: 'SIG_ERR' : macro redefinition ..\..\include\port/win32.h(119) : see previous definition of
Re: [PATCHES] [pgsql-hackers-win32] VC++ psql build broken
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Page Sent: 28 September 2004 12:06 To: Bruce Momjian Cc: PgSQL Win32 developers; PostgreSQL Patches Subject: Re: [pgsql-hackers-win32] VC++ psql build broken - The crash I was seeing last night appears to only occur when using mingw compiled libpq. Using the ones compiled with the VC++ build works just fine. The Windows installer puts libpq.dll and a couple of SSL libs in the Windows\System32 directory, so this potentially could cause some support emails. Following up myself, it appears that the mingw build exports all symbols into pq.def before linking. The MSVC++/Borland builds uses a much more limited set of exports which appear to correspond with the published API (see all the other .def files in src/interfaces/libpq). A quick manual build using the mingw link steps, but substituting libpqdll.def for pq.def builds a dll which appears to work. pgAdmin does not however, though it appears that is because it is trying to use Pqgetssl et al. which do not appear to be exported by the Win32 .def file. It seems to me that the correct way to fix this is to add .def files for SSL enabled builds of libpq, and stop the mingw build exporting every symbol. I can probably fix the vc/borland builds (if that is the correct way forward), but I don't know enough about make to fix the mingw build. Regards, Dave. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [PATCHES] 8.0.0beta3 duration logging patch
Bruce Momjian [EMAIL PROTECTED] writes: Your issue brings up that the boolean API doesn't really work well, and in fact highlights the fact that printing the duration as an independent capability really made no sense at all. Perhaps your approach is the proper solution --- to link them together. I thought we had fixed things so that log_duration would print the statement if it hadn't already been logged for other reasons. Did that fix get broken again? regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [PATCHES] 8.0.0beta3 duration logging patch
On Tuesday September 28 2004 7:59, Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Your issue brings up that the boolean API doesn't really work well, and in fact highlights the fact that printing the duration as an independent capability really made no sense at all. Perhaps your approach is the proper solution --- to link them together. I thought we had fixed things so that log_duration would print the statement if it hadn't already been logged for other reasons. Did that fix get broken again? I guess so. If you set log_min_statement_duration = 0, you get duration: %ld.%03ld ms statement: %s regardless of your log_duration or log_statement settings. But log_duration does not heed log_statement, thus no way to quiet durations in sync with log_statement setting. In beta3, the logic is... if ( log_duration = true || (log_min_statement_duration = 0 || (log_min_statement_duration 0 duration log_min_statement_duration))) Going back to the issue of usefulness of queryless durations, I guess I can imagine that if someone wanted to measure average duration similar to a speedometer, they might want to log only durations, not queries, just to know how hot the DB is running. I have a 7.3 perl script to do just that. Maybe a better patch would be to make log_duration have the same options as log_statement (none, mod, ddl, all)? That would preserve the previous functionality and enable the more common usage as well. I would leave log_min_statement_duration alone since I can see where it would be useful to be able to visually distinguish between durations printed because they exceeded log_min_statement_duration. For example, logging all data-changing queries (mod) and also any overly slow SELECTs. Ed ---(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] LDFLAGS overriding
I think your 'override' fix is correct. Personally I think override should be used in most cases in our code because we are usually careful to add to any flags already supplied by the user. --- Neil Conway wrote: Overriding the value of LDFLAGS breaks the build: $ make LDFLAGS=-g gcc-3.4 -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations -DFRONTEND -I../../src/include -I/home/neilc/build-pgsql/src/../../pgsql/src/include -D_GNU_SOURCE -c -o dirmod.o dirmod.c -MMD gcc-3.4 -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations zic.o ialloc.o scheck.o localtime.o dirmod.o -g -lpgport -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -o zic /usr/bin/ld: cannot find -lpgport collect2: ld returned 1 exit status make[2]: *** [zic] Error 1 make[2]: Leaving directory `/home/neilc/build-pgsql/src/timezone' make[1]: *** [all] Error 2 (The -g flag is just for example.) IMHO we ought to let users override LDFLAGS, just like we let them override CFLAGS. When we need to modify LDFLAGS unconditionally (i.e. regardless of whether the user has already defined it), the override directive should be used. Attached is a trivial patch that fixes the build for me. There are a few other assignments/concatenations to LDFLAGS that are going to be skipped if there is a user-defined LDFLAGS (e.g. enabling rpath in src/Makefile.global.in, and some HPUX port-specific stuff). I wasn't sure if this should also ignore user-defined LDFLAGS, so I didn't modify it. Comments? (I won't claim to be a make expert, so it's entirely possible this change is off the mark.) -Neil [ Attachment, skipping... ] ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED] -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (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] [pgsql-hackers-win32] VC++ psql build broken
Patch applied. Thanks. I had removed the /I ..\..\include\port\win32 because I thought it wasn't needed anymore since I adjusted some include names, but I see it is needed. Thanks. --- Dave Page wrote: -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED] Sent: 27 September 2004 23:58 To: Dave Page Cc: PgSQL Win32 developers; PostgreSQL Patches Subject: Re: [pgsql-hackers-win32] VC++ psql build broken I have fixed this issue with Dave's help. Hmm, not entirely it seems. An include path got missed out of the patch - see the attached fix. This also adds debug build support to src/bin/psql/win32.mak. Also: - The crash I was seeing last night appears to only occur when using mingw compiled libpq. Using the ones compiled with the VC++ build works just fine. The Windows installer puts libpq.dll and a couple of SSL libs in the Windows\System32 directory, so this potentially could cause some support emails. Strangely, pgAdmin works OK with my mingw compiled libpq.dll (with an import lib created from pq.def using VC++'s lib.exe), even though it is built with VC++ Windows. It crashes with the VC++ compiled libpq. - Compiling on a clean tree I now get the warnings below (sorry, I must have forgotten to try a completely clean build in my weary state last night :-) ): command.c C:\PROGRA~1\MICROS~3\VC98\INCLUDE\direct.h(132) : warning C4003: not enough actual parameters for macro 'mkdir' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005: 'SIG_DFL' : macro redefinition ..\..\include\port/win32.h(118) : see previous definition of 'SIG_DFL' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005: 'SIG_IGN' : macro redefinition ..\..\include\port/win32.h(120) : see previous definition of 'SIG_IGN' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005: 'SIG_ERR' : macro redefinition ..\..\include\port/win32.h(119) : see previous definition of 'SIG_ERR' common.c C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005: 'SIG_DFL' : macro redefinition ..\..\include\port/win32.h(118) : see previous definition of 'SIG_DFL' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005: 'SIG_IGN' : macro redefinition ..\..\include\port/win32.h(120) : see previous definition of 'SIG_IGN' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005: 'SIG_ERR' : macro redefinition ..\..\include\port/win32.h(119) : see previous definition of 'SIG_ERR' common.c(536) : warning C4018: '' : signed/unsigned mismatch copy.c C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005: 'SIG_DFL' : macro redefinition ..\..\include\port/win32.h(118) : see previous definition of 'SIG_DFL' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005: 'SIG_IGN' : macro redefinition ..\..\include\port/win32.h(120) : see previous definition of 'SIG_IGN' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005: 'SIG_ERR' : macro redefinition ..\..\include\port/win32.h(119) : see previous definition of 'SIG_ERR' describe.c C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005: 'SIG_DFL' : macro redefinition ..\..\include\port/win32.h(118) : see previous definition of 'SIG_DFL' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005: 'SIG_IGN' : macro redefinition ..\..\include\port/win32.h(120) : see previous definition of 'SIG_IGN' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005: 'SIG_ERR' : macro redefinition ..\..\include\port/win32.h(119) : see previous definition of 'SIG_ERR' help.c C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005: 'SIG_DFL' : macro redefinition ..\..\include\port/win32.h(118) : see previous definition of 'SIG_DFL' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005: 'SIG_IGN' : macro redefinition ..\..\include\port/win32.h(120) : see previous definition of 'SIG_IGN' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005: 'SIG_ERR' : macro redefinition ..\..\include\port/win32.h(119) : see previous definition of 'SIG_ERR' input.c C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005: 'SIG_DFL' : macro redefinition ..\..\include\port/win32.h(118) : see previous definition of 'SIG_DFL' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(80) : warning C4005: 'SIG_IGN' : macro redefinition ..\..\include\port/win32.h(120) : see previous definition of 'SIG_IGN' C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(87) : warning C4005: 'SIG_ERR' : macro redefinition ..\..\include\port/win32.h(119) : see previous definition of 'SIG_ERR' large_obj.c C:\PROGRA~1\MICROS~3\VC98\INCLUDE\signal.h(79) : warning C4005: 'SIG_DFL' : macro redefinition
[PATCHES] Translation updates for pt_BR
Hi, Attached is the initdb, libpq, pg_controldata, pg_ctl, pg_resetxlog, psql and scripts translation updates. Note that pg_ctl have to be added to nls.mk Please apply. = Euler Taveira de Oliveira euler[at]yahoo_com_br ___ Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! http://br.acesso.yahoo.com/ pg_cvs_pt_br.tar.bz2 Description: pg_cvs_pt_br.tar.bz2 ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org