- 22 Nov, 2021 2 commits
-
-
Tom Lane authored
Per buildfarm.
-
Tom Lane authored
Normally "prove" and "perl" come from the same Perl installation, but we support the case where they don't (mainly because the MSys buildfarm animals need this). In that case, AX_PROG_PERL_MODULES is completely the wrong thing to use, because it's checking what "perl" has. Instead, make a little TAP test script including the required modules, and run that under "prove". We don't need ax_prog_perl_modules.m4 at all after this change, so remove it. Back-patch to all supported branches, for the buildfarm's benefit. (In v10, this also back-patches the effects of commit 264eb03a.) Andrew Dunstan and Tom Lane, per an observation by Noah Misch Discussion: https://postgr.es/m/E1moZHS-0002Cu-Ei@gemulon.postgresql.org
-
- 24 Jul, 2021 1 commit
-
-
Tom Lane authored
This testing was useful when it was written, nigh twenty years ago, but it seems fairly pointless for any platform built in the last dozen or more years. (Compare also the comments at 8a212118.) Also we now have reports that the test program itself fails under ThreadSanitizer. Rather than invest effort in fixing it, let's just drop it, and assume that the few people who still care already know they need to use --disable-thread-safety. Back-patch into v14, for consistency with 8a212118. Discussion: https://postgr.es/m/CADhDkKzPSiNvA3Hyq+wSR_icuPmazG0cFe=YnC3U-CFcYLc8Xw@mail.gmail.com
-
- 21 Apr, 2021 1 commit
-
-
Peter Eisentraut authored
-
- 02 Jan, 2021 1 commit
-
-
Bruce Momjian authored
Backpatch-through: 9.5
-
- 08 Dec, 2020 1 commit
-
-
Andres Freund authored
Until recently 'native' was implicitly included via 'orcjit', but a change included in LLVM 11 (not yet released) removed a number of such indirect component references. Reported-By:
Fabien COELHO <coelho@cri.ensmp.fr> Reported-By:
Andres Freund <andres@anarazel.de> Reported-By:
Thomas Munro <thomas.munro@gmail.com> Author: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/20201201064949.mex6kvi2kygby3ni@alap3.anarazel.de Backpatch: 11-, where jit support was added
-
- 30 Nov, 2020 1 commit
-
-
Tom Lane authored
Checking for DocBook being installed was valuable when we were on the OpenSP docs toolchain, because that was rather hard to get installed fully. Nowadays, as long as you have xmllint and xsltproc installed, you're good, because those programs will fetch the DocBook files off the net at need. Moreover, testing this at configure time means that a network access may well occur whether or not you have any interest in building the docs later. That can be slow (typically 2 or 3 seconds, though much higher delays have been reported), and it seems not very nice to be doing an off-machine access without warning, too. Hence, drop the PGAC_CHECK_DOCBOOK probe, and adjust related documentation. Without that macro, there's not much left of config/docbook.m4 at all, so I just removed it. Back-patch to v11, where we started to use xmllint in the PGAC_CHECK_DOCBOOK probe. Discussion: https://postgr.es/m/E2EE6B76-2D96-408A-B961-CAE47D1A86F0@yesql.se Discussion: https://postgr.es/m/A55A7FC9-FA60-47FE-98B5-139CDC57CE6E@gmail.com
-
- 21 Oct, 2020 1 commit
-
-
Tom Lane authored
Theoretically one could go into src/test/thread and build/run this program there. In practice, that hasn't worked since 96bf88d5, and probably much longer on some platforms (likely including just the sort of hoary leftovers where this test might be of interest). While it wouldn't be too hard to repair the breakage, the fact that nobody has noticed for two years shows that there is zero usefulness in maintaining this build pathway. Let's get rid of it and decree that thread_test.c is *only* meant to be built/used in configure. Given that decision, it makes sense to put thread_test.c under config/ and get rid of src/test/thread altogether, so that's what I did. In passing, update src/test/README, which had been ignored by some not-so-recent additions of subdirectories. Discussion: https://postgr.es/m/227659.1603041612@sss.pgh.pa.us
-
- 24 Jul, 2020 1 commit
-
-
Peter Eisentraut authored
The new name has been preferred by Autoconf for a long time. Future versions of Autoconf will warn about the old name. Discussion: https://www.postgresql.org/message-id/flat/e796c185-5ece-8569-248f-dd3799701be1%402ndquadrant.com
-
- 30 Apr, 2020 1 commit
-
-
Peter Eisentraut authored
-
- 22 Apr, 2020 1 commit
-
-
Tom Lane authored
Make header/trailer comments agree with the actual names of some macros. These seem like legit names in earlier iterations of respective patches (commit b779168f "Detect PG_PRINTF_ATTRIBUTE automatically." and commit 6869b4f2 "Add C++ support to configure.") but the macro had been renamed out of sync with the header / trailer comment in the final committed patch. Even more nitpickily, make the dashed underlines agree with the lengths of the macro names everyplace. There doesn't seem to have been any meeting of the minds previously on whether those should match or not, but at least some people have been trying to make 'em match. Jesse Zhang, Tom Lane Discussion: https://postgr.es/m/CAGf+fX7DDyq6WfCy6X_KtD28MkbNBE6NkRi26fSf25dfUwX0zw@mail.gmail.com
-
- 28 Mar, 2020 1 commit
-
-
Peter Eisentraut authored
As of Windows 10 version 1803, Unix-domain sockets are supported on Windows. But it's not automatically detected by configure because it looks for struct sockaddr_un and Windows doesn't define that. So we just make our own definition on Windows and override the configure result. Set DEFAULT_PGSOCKET_DIR to empty on Windows so by default no Unix-domain socket is used, because there is no good standard location. In pg_upgrade, we have to do some extra tweaking to preserve the existing behavior of not using Unix-domain sockets on Windows. Adding support would be desirable, but it needs further work, in particular a way to select whether to use Unix-domain sockets from the command-line or with a run-time test. The pg_upgrade test script needs a fix. The previous code passed "localhost" to postgres -k, which only happened to work because Windows used to ignore the -k argument value altogether. We instead need to pass an empty string to get the desired effect. The test suites will continue to not use Unix-domain sockets on Windows. This requires a small tweak in pg_regress.c. The TAP tests don't need to be changed because they decide by the operating system rather than HAVE_UNIX_SOCKETS. Reviewed-by:
Andrew Dunstan <andrew.dunstan@2ndquadrant.com> Discussion: https://www.postgresql.org/message-id/flat/54bde68c-d134-4eb8-5bd3-8af33b72a010@2ndquadrant.com
-
- 21 Feb, 2020 1 commit
-
-
Tom Lane authored
These compiler features are required by C99, so remove the configure probes for them. This is part of a series of commits to get rid of no-longer-relevant configure checks and dead src/port/ code. I'm committing them separately to make it easier to back out individual changes if they prove less portable than I expect. Discussion: https://postgr.es/m/15379.1582221614@sss.pgh.pa.us
-
- 23 Jan, 2020 2 commits
-
-
Tom Lane authored
I had supposed that all versions of Readline that have filename quoting hooks also have the rl_completion_suppress_quote variable. But it seems OpenBSD managed to find a version someplace that does not, so we'll have to expend a separate configure probe for that. (Light testing suggests that this version also lacks the bugs that make it necessary to frob that variable. Hooray!) Per buildfarm.
-
Tom Lane authored
The Readline library contains a fair amount of knowledge about how to tab-complete filenames, but it turns out that that doesn't work too well unless we follow its expectation that we use its filename quoting hooks to quote and de-quote filenames. We were trying to do such quote handling within complete_from_files(), and that's still what we have to do if we're using libedit, which lacks those hooks. But for Readline, it works a lot better if we tell Readline that single-quote is a quoting character and then provide hooks that know the details of the quoting rules for SQL and psql meta-commands. Hence, resurrect the quoting hook functions that existed in the original version of tab-complete.c (and were disabled by commit f6689a32 because they "didn't work so well yet"), and whack on them until they do seem to work well. Notably, this fixes bug #16059 from Steven Winfield, who pointed out that the previous coding would strip quote marks from filenames in SQL COPY commands, even though they're syntactically necessary there. Now, we not only don't do that, but we'll add a quote mark when you tab-complete, even if you didn't type one. Getting this to work across a range of libedit versions (and, to a lesser extent, libreadline versions) was depressingly difficult. It will be interesting to see whether the new regression test cases pass everywhere in the buildfarm. Some future patch might try to handle quoted SQL identifiers with similar explicit quoting/dequoting logic, but that's for another day. Patch by me, reviewed by Peter Eisentraut. Discussion: https://postgr.es/m/16059-8836946734c02b84@postgresql.org
-
- 08 Jan, 2020 1 commit
-
-
Peter Eisentraut authored
Supporting very old Python versions is a maintenance burden, especially with the several variant test files to maintain for Python <2.6. Since we have dropped support for older OpenSSL versions in 7b283d0e, RHEL 5 is now effectively desupported, and that was also the only mainstream operating system still using Python versions before 2.6, so it's a good time to drop those as well. Reviewed-by:
Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/98b69261-298c-13d2-f34d-836fd9c29b21%402ndquadrant.com
-
- 07 Oct, 2019 1 commit
-
-
Peter Eisentraut authored
Since 63bd0db1 we don't use tzname anymore, so we don't need to check for it. Instead, just keep the part of PGAC_STRUCT_TIMEZONE that we need, which is the check for struct tm.tm_zone. Discussion: https://www.postgresql.org/message-id/flat/5eb11a37-f3ca-5fb7-308f-4485dec25a2e%402ndquadrant.com
-
- 18 Aug, 2019 1 commit
-
-
Peter Eisentraut authored
-
- 27 Apr, 2019 1 commit
-
-
Peter Eisentraut authored
-
- 27 Mar, 2019 1 commit
-
-
Peter Eisentraut authored
Skip doc/src/sgml/images/Makefile since the directory is not created.
-
- 04 Mar, 2019 1 commit
-
-
Andrew Dunstan authored
Currently only frogmouth in the buildfarm uses the 32bit params, and it's not able to build past release 10, so put those last, saving substantial configure time on more modern systems. Even if we get a modern 32 bit Windows system at some stage we should probably prefer the 64 bit interface here these days.
-
- 16 Feb, 2019 1 commit
-
-
Tom Lane authored
Test for the compiler builtins __builtin_clz, __builtin_ctz, and __builtin_popcount, and make use of these in preference to handwritten C code if they're available. Create src/port infrastructure for "leftmost one", "rightmost one", and "popcount" so as to centralize these decisions. On x86_64, __builtin_popcount generally won't make use of the POPCNT opcode because that's not universally supported yet. Provide code that checks CPUID and then calls POPCNT via asm() if available. This requires indirecting through a function pointer, which is an annoying amount of overhead for a one-instruction operation, but it's probably not worth working harder than this for our current use-cases. I'm not sure we've found all the existing places that could profit from this new infrastructure; but we at least touched all the ones that used copied-and-pasted versions of the bitmapset.c code, and got rid of multiple copies of the associated constant arrays. While at it, replace c-compiler.m4's one-per-builtin-function macros with a single one that can handle all the cases we need to worry about so far. Also, because I'm paranoid, make those checks into AC_LINK checks rather than just AC_COMPILE; the former coding failed to verify that libgcc has support for the builtin, in cases where it's not inline code. David Rowley, Thomas Munro, Alvaro Herrera, Tom Lane Discussion: https://postgr.es/m/CAKJS1f9WTAGG1tPeJnD18hiQW5gAk59fQ6WK-vfdAKEHyRg2RA@mail.gmail.com
-
- 15 Feb, 2019 2 commits
-
-
Alvaro Herrera authored
This reverts commits fc6c7274, 109de05c, d0b4663c and 711bab1e. Somebody will have to try harder before submitting this patch again. I've spent entirely too much time on it already, and the #ifdef maze yet to be written in order for it to build at all got on my nerves. The amount of work needed to get a platform-specific performance improvement that's barely above the noise level is not worth it.
-
Alvaro Herrera authored
Split out these new functions in three parts: one in a new file that uses the compiler builtin and gets compiled with the -mpopcnt compiler option if it exists; another one that uses the compiler builtin but not the compiler option; and finally the fallback with open-coded algorithms. Split out the configure logic: in the original commit, it was selecting to use the -mpopcnt compiler switch together with deciding whether to use the compiler builtin, but those two things are really separate. Split them out. Also, expose whether the builtin exists to Makefile.global, so that src/port's Makefile can decide whether to compile the hw-optimized file. Remove CPUID test for CTZ/CLZ. Make pg_{right,left}most_ones use either the compiler intrinsic or open-coded algo; trying to use the HW-optimized version is a waste of time. Make them static inline functions. Discussion: https://postgr.es/m/20190213221719.GA15976@alvherre.pgsql
-
- 13 Feb, 2019 2 commits
-
-
Alvaro Herrera authored
We were using uint64 function arguments as "long int" arguments to compiler builtins, which fails on machines where long ints are 32 bits: the upper half of the uint64 was being ignored. Fix by using the "ll" builtin variants instead, which on those machines take 64 bit arguments. Also, remove configure tests for __builtin_popcountl() (as well as "long" variants for ctz and clz): the theory here is that any compiler version will provide all widths or none, so one test suffices. Were this theory to be wrong, we'd have to add tests for __builtin_popcountll() and friends, which would be tedious. Per failures in buildfarm member lapwing and ensuing discussion.
-
Alvaro Herrera authored
These opcodes have been around in the AMD world since 2007, and 2008 in the case of intel. They're supported in GCC and Clang via some __builtin macros. The opcodes may be unavailable during runtime, in which case we fall back on a C-based implementation of the code. In order to get the POPCNT instruction we must pass the -mpopcnt option to the compiler. We do this only for the pg_bitutils.c file. David Rowley (with fragments taken from a patch by Thomas Munro) Discussion: https://postgr.es/m/CAKJS1f9WTAGG1tPeJnD18hiQW5gAk59fQ6WK-vfdAKEHyRg2RA@mail.gmail.com
-
- 09 Feb, 2019 1 commit
-
-
Peter Eisentraut authored
The comment marker "#" is copied to the output, so it's only appropriate for comments that make sense in the shell output. For comments about the Autoconf language, "dnl" should be used.
-
- 18 Jan, 2019 1 commit
-
-
Peter Eisentraut authored
AC_ARG_VAR is necessary if an environment variable influences a configure result that is then used by other tests that are cached. With AC_ARG_VAR, a change in the variable is detected on subsequent configure runs and the user is then advised to remove the cache. This adds AC_ARG_VAR calls for: MSGFMT, PERL, PYTHON, TCLSH, XML2_CONFIG Reviewed-by:
Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/30672.1546816567@sss.pgh.pa.us
-
- 13 Jan, 2019 1 commit
-
-
Peter Eisentraut authored
Some systems don't ship with "python" by default anymore, only "python3" or "python2" or some combination, so include those in the configure search. Discussion: https://www.postgresql.org/message-id/flat/1457.1543184081%40sss.pgh.pa.us#c9cc1199338fd6a257589c6dcea6cf8d
-
- 19 Nov, 2018 3 commits
-
-
Tom Lane authored
This change doesn't fix any bugs that we've heard about, but it seems like a good idea on general principles to track upstream occasionally. Discussion: https://postgr.es/m/3320.1542647565@sss.pgh.pa.us
-
Tom Lane authored
Calling AC_CHECK_DECLS before we've finished setting up the compiler's CFLAGS seems like a pretty risky proposition, especially now that the first use of that macro will result in a test to see whether the compiler gives warning or error for undeclared built-in functions. That answer could very easily get changed later than where PGAC_LLVM_SUPPORT is called; furthermore, it's hardly unlikely that flags such as -D_GNU_SOURCE could change visibility of declarations. Hence, be a little less cavalier about where to do LLVM-related tests. This results in v11 and HEAD doing the warning-or-error check at the same place in the script as older branches are doing it, which seems like a good thing. Per further thought about commits 0b59b0e8 and 16fbac39.
-
Tom Lane authored
The test case that Autoconf uses to discover whether a function has been declared doesn't work reliably with clang, because clang reports a warning not an error if the name is a known built-in function. On some platforms, this results in a lot of compile-time warnings about strlcpy and related functions not having been declared. There is a fix for this (by Noah Misch) in the upstream Autoconf sources, but since they've not made a release in years and show no indication of doing so anytime soon, let's just absorb their fix directly. We can revert this when and if we update to a newer Autoconf release. Back-patch to all supported branches. Discussion: https://postgr.es/m/26819.1542515567@sss.pgh.pa.us
-
- 09 Oct, 2018 1 commit
-
-
Tom Lane authored
NetBSD-current generates a large number of warnings about "%m" not being appropriate to use with *printf functions. While that's true for their native printf, it's surely not true for snprintf.c, so I think they have misunderstood gcc's definition of the "gnu_printf" archetype. Nonetheless, choosing "__syslog__" instead silences the warnings; so teach configure about that. Since this is only a cosmetic warning issue (and anyway it depends on previous hacking to be self-consistent), no back-patch. Discussion: https://postgr.es/m/16785.1539046036@sss.pgh.pa.us
-
- 26 Sep, 2018 2 commits
-
-
Tom Lane authored
The method we've traditionally used, of redeclaring strerror_r() to see if the compiler complains of inconsistent declarations, turns out not to work reliably because some compilers only report a warning, not an error. Amazingly, this has gone undetected for years, even though it certainly breaks our detection of whether strerror_r succeeded. Let's instead test whether the compiler will take the result of strerror_r() as a switch() argument. It's possible this won't work universally either, but it's the best idea I could come up with on the spur of the moment. We should probably back-patch this once the dust settles, but first let's see what the buildfarm thinks of it. Discussion: https://postgr.es/m/10877.1537993279@sss.pgh.pa.us
-
Tom Lane authored
We've spent an awful lot of effort over the years in coping with platform-specific vagaries of the *printf family of functions. Let's just forget all that mess and standardize on always using src/port/snprintf.c. This gets rid of a lot of configure logic, and it will allow a saner approach to dealing with %m (though actually changing that is left for a follow-on patch). Preliminary performance testing suggests that as it stands, snprintf.c is faster than the native printf functions for some tasks on some platforms, and slower for other cases. A pending patch will improve that, though cases with floating-point conversions will doubtless remain slower unless we want to put a *lot* of effort into that. Still, we've not observed that *printf is really a performance bottleneck for most workloads, so I doubt this matters much. Patch by me, reviewed by Michael Paquier Discussion: https://postgr.es/m/2975.1526862605@sss.pgh.pa.us
-
- 25 Sep, 2018 1 commit
-
-
Tom Lane authored
Apple's latest rearrangements of the system-supplied headers have broken building of PL/Perl and PL/Tcl. The only practical way to fix PL/Tcl is to start using the "-isysroot" compiler flag to point to SDK-supplied headers, as Apple expects. We must also start distinguishing where to find Perl's headers from where to find its shared library; but that seems like good cleanup anyway. Extensions that formerly did something like -I$(perl_archlibexp)/CORE should now do -I$(perl_includedir)/CORE instead. perl_archlibexp is still the place to look for libperl.so, though. If for some reason you don't like the default -isysroot setting, you can override that by setting PG_SYSROOT in configure's arguments. I don't currently think people would need to do so, unless maybe for cross-version build purposes. In addition, teach configure where to find tclConfig.sh. Our traditional method of searching $auto_path hasn't worked for the last couple of macOS releases, and it now seems clear that Apple's not going to change that. The workaround of manually specifying --with-tclconfig was annoying already, but Mojave's made it a lot more so because the sysroot path now has to be included as well. Let's just wire the knowledge into configure instead. To avoid breaking builds against non-default Tcl installations (e.g. MacPorts) wherein the $auto_path method probably still works, arrange to try the additional case only after all else has failed. Back-patch to all supported versions, since at least the buildfarm cares about that. The changes are set up to not do anything on macOS releases that are old enough to not have functional sysroot trees.
-
- 13 Sep, 2018 1 commit
-
-
Andres Freund authored
Before this commit LLVM 7 was supported, but only if one explicitly provided LLVM_CONFIG= and CLANG= paths. As LLVM 7 is the first version that includes our upstreamed debugging and profiling features, and as debian is planning to default to 7 due to wider architecture support, it seems good to support auto-detecting that version. Author: Christoph Berg Discussion: https://postgr.es/m/20180912124517.GD24584@msg.df7cb.de Backpatch: 11, where LLVM was introduced
-
- 24 Aug, 2018 2 commits
-
-
Andres Freund authored
This simplifies logic / reduces duplication in a few headers. Author: Andres Freund Discussion: https://postgr.es/m/97d4b165-192d-3605-749c-f614a0c4e783@2ndquadrant.com
-
Andres Freund authored
Noticed thanks to buildfarm animal seawasp. Author: Andres Freund Backpatch: v11-, where LLVM based JIT compliation was introduced.
-
- 17 Aug, 2018 1 commit
-
-
Tom Lane authored
Since commit e1d19c90, buildfarm member gharial has been failing with symptoms indicating that snprintf sometimes returns -1 for buffer overrun, even though it passes the added configure check. Some google research suggests that this happens only in limited cases, such as when the overrun happens partway through a %d item. Adjust the configure check to exercise it that way. Since I'm now feeling more paranoid than I was before, also make the test explicitly verify that the buffer doesn't get physically overrun.
-