BUG #6758: ./configure script sets HAVE_WCSTOMBS_L 1

Started by Jez Wainover 13 years ago5 messagesbugs
Jump to latest
#1Jez Wain
jez.wain@bull.net

The following bug has been logged on the website:

Bug reference: 6758
Logged by: jez wain
Email address: jez.wain@bull.net
PostgreSQL version: 9.1.4
Operating system: AIX 7.1
Description:

Building Postgresql on AIX7.1 with IBM's xlc compiler I got an undefined
symbol error on the link phase for the 'postgres' binary:

ld: 0711-317 ERROR: Undefined symbol: .mbstowcs_l
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.

AIX7 supports the mbstowcs API but not mbstowcs_l. In
src/include/pg_config.h I commented out the define for HAVE_WCSTOMBS_L 1,
recompiled src/backend/utils/adt/pg_locale.c and the build completed
successfully.

This indicates that the ./configure script does not correctly detect the
absence of the locale specific wide-character/multi-byte API's (xxxx_l), on
AIX (near line 18945)

#2Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Jez Wain (#1)
Re: BUG #6758: ./configure script sets HAVE_WCSTOMBS_L 1

Excerpts from jez.wain's message of mié jul 25 05:49:35 -0400 2012:

ld: 0711-317 ERROR: Undefined symbol: .mbstowcs_l
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.

AIX7 supports the mbstowcs API but not mbstowcs_l. In
src/include/pg_config.h I commented out the define for HAVE_WCSTOMBS_L 1,
recompiled src/backend/utils/adt/pg_locale.c and the build completed
successfully.

This had been reported some time ago, see bug #6585:
http://archives.postgresql.org/message-id/E1SINxs-0001Zy-Gj@wrigleys.postgresql.org

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alvaro Herrera (#2)
Re: BUG #6758: ./configure script sets HAVE_WCSTOMBS_L 1

Alvaro Herrera <alvherre@commandprompt.com> writes:

Excerpts from jez.wain's message of mié jul 25 05:49:35 -0400 2012:

AIX7 supports the mbstowcs API but not mbstowcs_l. In
src/include/pg_config.h I commented out the define for HAVE_WCSTOMBS_L 1,
recompiled src/backend/utils/adt/pg_locale.c and the build completed
successfully.

This had been reported some time ago, see bug #6585:
http://archives.postgresql.org/message-id/E1SINxs-0001Zy-Gj@wrigleys.postgresql.org

and in particular the relevant question is here:
http://archives.postgresql.org/pgsql-bugs/2012-04/msg00076.php

The previous complainant didn't help us do anything to resolve the
problem, but maybe you can help more.

regards, tom lane

#4Jez Wain
jez.wain@bull.net
In reply to: Alvaro Herrera (#2)
Re: BUG #6758: ./configure script sets HAVE_WCSTOMBS_L 1

Alvaro,

This is indeed the same problem; my apologies for posting a duplicate.

I've checked on two AIXv7.1 servers, one using an xlCv11 runtime, the other using an xlCv12 runtime.

On the v11 neither mbstowcs_l nor wcstombs_l are defined. On the v12, both are. So to answer the question posed on the archive link you provided, the assumption made by your configure script appears to be valid. This points to there being a problem in the way the presence of these APIs is detected in the configure script.

I built postgres on the V11 platform when I posted my bug report. I'll have a go on the V12 to ensure that this error goes away.

Thanks for your reply,

Jez

On 25 Jul 2012, at 18:17, Alvaro Herrera wrote:

Show quoted text

Excerpts from jez.wain's message of mié jul 25 05:49:35 -0400 2012:

ld: 0711-317 ERROR: Undefined symbol: .mbstowcs_l
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.

AIX7 supports the mbstowcs API but not mbstowcs_l. In
src/include/pg_config.h I commented out the define for HAVE_WCSTOMBS_L 1,
recompiled src/backend/utils/adt/pg_locale.c and the build completed
successfully.

This had been reported some time ago, see bug #6585:
http://archives.postgresql.org/message-id/E1SINxs-0001Zy-Gj@wrigleys.postgresql.org

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jez Wain (#4)
Re: BUG #6758: ./configure script sets HAVE_WCSTOMBS_L 1

Jez Wain <jez.wain@bull.net> writes:

On the v11 neither mbstowcs_l nor wcstombs_l are defined. On the v12, both are. So to answer the question posed on the archive link you provided, the assumption made by your configure script appears to be valid. This points to there being a problem in the way the presence of these APIs is detected in the configure script.

OK, now we understand what we're dealing with at least. Can you look
into why mbstowcs_l is misdetected on v11? The portion of config.log
where configure is probing for that function might be illuminating.

regards, tom lane