Re: BUG #6758: ./configure script sets HAVE_WCSTOMBS_L 1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Hastie <andrew(at)ahastie(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6758: ./configure script sets HAVE_WCSTOMBS_L 1
Date: 2012-08-29 17:16:40
Message-ID: 28049.1346260600@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andrew Hastie <andrew(at)ahastie(dot)net> writes:
> I'm currently working on a project where I need to get PGv9.1 up and
> running on an IBM AIXv7.1 server, so I do have access to a suitable
> machine for a period of time if I can provide any further diags to help
> resolve the issue.

That would be helpful, because both of the previous complainants seem
to have wandered off without helping us get to the bottom of it :-(.

What I'd like to see at this point is the portion of config.log where
the configure script is trying to probe for wcstombs_l. For example,
on a machine that has wcstombs and not wcstombs_l, I see:

...
configure:19272: checking for wcstombs
configure:19328: gcc -o conftest -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wformat-security -fno-strict-aliasing -g -D_XOPEN_SOURCE_EXTENDED conftest.c -lz -lreadline -ltermcap -lm >&5
configure:19335: $? = 0
configure:19357: result: yes
configure:19272: checking for wcstombs_l
configure:19328: gcc -o conftest -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wformat-security -fno-strict-aliasing -g -D_XOPEN_SOURCE_EXTENDED conftest.c -lz -lreadline -ltermcap -lm >&5
/usr/ccs/bin/ld: Unsatisfied symbols:
wcstombs_l (code)
collect2: ld returned 1 exit status
configure:19335: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "PostgreSQL"
| #define PACKAGE_TARNAME "postgresql"
| #define PACKAGE_VERSION "9.3devel"
| #define PACKAGE_STRING "PostgreSQL 9.3devel"
| #define PACKAGE_BUGREPORT "pgsql-bugs(at)postgresql(dot)org"
| #define PG_VERSION "9.3devel"
| #define PG_MAJORVERSION "9.3"
| #define USE_INTEGER_DATETIMES 1
| #define DEF_PGPORT 5440
| #define DEF_PGPORT_STR "5440"
| #define BLCKSZ 8192
| #define RELSEG_SIZE 131072
| #define XLOG_BLCKSZ 8192
| #define XLOG_SEG_SIZE (16 * 1024 * 1024)
| #define USE_ASSERT_CHECKING 1
| #define PG_KRB_SRVNAM "postgres"
| #define HAVE_LIBM 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_LIBZ 1
| #define HAVE_SPINLOCKS 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_CRYPT_H 1
| #define HAVE_LANGINFO_H 1
| #define HAVE_POLL_H 1
| #define HAVE_PWD_H 1
| #define HAVE_SYS_IOCTL_H 1
| #define HAVE_SYS_IPC_H 1
| #define HAVE_SYS_POLL_H 1
| #define HAVE_SYS_PSTAT_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SYS_SEM_H 1
| #define HAVE_SYS_SHM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_WCHAR_H 1
| #define HAVE_NET_IF_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_NETINET_TCP_H 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_READLINE_HISTORY_H 1
| #define WORDS_BIGENDIAN 1
| #define USE_INLINE 1
| #define HAVE_STRINGIZE 1
| #define FLEXIBLE_ARRAY_MEMBER 1
| #define HAVE_FUNCNAME__FUNC 1
| #define HAVE_TZNAME 1
| #define HAVE_UNIX_SOCKETS 1
| #define HAVE_INTPTR_T 1
| #define HAVE_UINTPTR_T 1
| #define HAVE_LONG_LONG_INT 1
| #define _FILE_OFFSET_BITS 64
| #define SIZEOF_OFF_T 8
| #define HAVE_INT_TIMEZONE /**/
| #define ACCEPT_TYPE_RETURN int
| #define ACCEPT_TYPE_ARG1 int
| #define ACCEPT_TYPE_ARG2 struct sockaddr *
| #define ACCEPT_TYPE_ARG3 size_t
| #define HAVE_CBRT 1
| #define HAVE_FDATASYNC 1
| #define HAVE_GETRLIMIT 1
| #define HAVE_MEMMOVE 1
| #define HAVE_POLL 1
| #define HAVE_PSTAT 1
| #define HAVE_READLINK 1
| #define HAVE_SETSID 1
| #define HAVE_SIGPROCMASK 1
| #define HAVE_SYMLINK 1
| #define HAVE_TOWLOWER 1
| #define HAVE_UTIME 1
| #define HAVE_UTIMES 1
| #define HAVE_WCSTOMBS 1
| /* end confdefs.h. */
| /* Define wcstombs_l to an innocuous variant, in case <limits.h> declares wcstombs_l.
| For example, HP-UX 11i <limits.h> declares gettimeofday. */
| #define wcstombs_l innocuous_wcstombs_l
|
| /* System header to define __stub macros and hopefully few prototypes,
| which can conflict with char wcstombs_l (); below.
| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
| <limits.h> exists even on freestanding compilers. */
|
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|
| #undef wcstombs_l
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char wcstombs_l ();
| /* The GNU C library defines this for functions which it implements
| to always fail with ENOSYS. Some functions are actually named
| something starting with __ and the normal name is an alias. */
| #if defined __stub_wcstombs_l || defined __stub___wcstombs_l
| choke me
| #endif
|
| int
| main ()
| {
| return wcstombs_l ();
| ;
| return 0;
| }
configure:19357: result: no
configure:19374: checking for fseeko
...

It would also be interesting to check what would happen if configure
actually tried to probe for mbstowcs_l, instead of making assumptions.
To do that, copy the test program above (removing the "| " indentation),
replace "wcstombs_l" by "mbstowcs_l", and then try to compile it ---
but be sure to use the compile command shown in your config.log, not
mine.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Merlin Moncure 2012-08-29 19:02:07 Re: BUG #6489: Alter table with composite type/table
Previous Message Andrew Hastie 2012-08-29 16:43:56 Re: BUG #6758: ./configure script sets HAVE_WCSTOMBS_L 1