id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	lang	patch	platform
786	config step auto::gettext throws warnings on Darwin/PPC	jkeenan	jkeenan	"This ticket concerns warnings generated during ''Configure.pl'' during config step ''auto::gettext'' on Darwin/PPC.  These warnings were initially observed in the ''io_cleanups'' branch, but in fact were present in trunk from before the point at which that branch was created.

''auto::gettext'' conducts an automated probe of your system to determine ''... whether the platform supports gettext. This is needed for Parrot internationalization.  They are  a set of tools that provides a framework to help other GNU packages produce multi-lingual messages.''

''auto::gettext'' composes a short C program on the fly and then executes that program.  The name of that program is ''test_xxxxx.c'', where xxxxx is a 5-digit number probably derived from a process ID.   The configstep compiles this program into an object file ''test_xxxxx.o'' and then into an executable ''test_xxxxx''.

You can diagnose warnings which occur during a particular configuration step by (a) running configuration with that step in verbose mode:
{{{
perl Configure.pl --verbose-step=auto::gettext
}}}  
and (b) in ''lib/Parrot/Configure/Step/List.pm'', temporarily deleting all configuration steps '''after''' the step you need to examine.  This helps to ensure that any files resulting from the execution of ''test_xxxxx'' are still present and have not been cleaned up by Configure.pl.  (No guarantees on the latter, though.)

Here's what I got when following the above steps on Darwin/PPC:
{{{
auto::gettext -       Does your configuration include gettext...
/usr/bin/gcc-4.0 -fno-common -I/opt/local/include -no-cpp-precomp  -pipe -I/usr/local/include -I/opt/local/include -pipe -fno-common -Wno-long-double  -DHASATTRIBUTE_CONST  -DHASATTRIBUTE_DEPRECATED  -DHASATTRIBUTE_MALLOC  -DHASATTRIBUTE_NONNULL  -DHASATTRIBUTE_NORETURN  -DHASATTRIBUTE_PURE  -DHASATTRIBUTE_UNUSED  -DHASATTRIBUTE_WARN_UNUSED_RESULT  -falign-functions=16 -fvisibility=hidden -funit-at-a-time -W -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wdisabled-optimization -Wendif-labels -Wextra -Wformat -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimport -Winit-self -Winline -Winvalid-pch -Wmissing-braces -Wmissing-field-initializers -Wno-missing-format-attribute -Wmissing-include-dirs -Wpacked -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wno-shadow -Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs -Wundef -Wunknown-pragmas -Wno-unused -Wvariadic-macros -Wwrite-strings -Wbad-function-cast -Wdeclaration-after-statement -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wnonnull -I/sw/include  -I./include -c test_15027.c
c++ -undefined dynamic_lookup -L/sw/lib -L/opt/local/lib test_15027.o -lintl -o test_15027  -lm -lgmp -lreadline
./test_15027
dyld: lazy symbol binding failed: Symbol not found: _libintl_bindtextdomain
  Referenced from: /Users/jimk/work/io_cleanups/./test_15027
  Expected in: dynamic lookup

dyld: Symbol not found: _libintl_bindtextdomain
  Referenced from: /Users/jimk/work/io_cleanups/./test_15027
  Expected in: dynamic lookup


Setting Configuration Data:
(
        verbose => undef,
);

                      Does your configuration include gettext............done.
}}}
Here's ''test_15027.c'':
{{{
$ cat test_15027.c
/*
 * ex: set ro:
 * DO NOT EDIT THIS FILE
 * Generated by Parrot::Configure::Compiler from config/auto/gettext/gettext_c.in
 */

/*
  Copyright (C) 2008-2009, Parrot Foundation.
  $Id: gettext_c.in 37385 2009-03-13 19:25:41Z coke $
*/

#define PACKAGE   ""hello""
#define LOCALEDIR "".""

#include <stdio.h>
#include <stdlib.h>
#include <libintl.h>
#include <locale.h>

int
main(int argc, char *argv[])
{
    setlocale(LC_ALL, """");
    bindtextdomain(PACKAGE, LOCALEDIR);
    textdomain(PACKAGE);

    printf(gettext(""Hello, world!\n""));

    return EXIT_SUCCESS;
}

/*
 * Local variables:
 *   c-file-style: ""parrot""
 * End:
 * vim: expandtab shiftwidth=4:
 */
}}}
And if I execute ''test_15027'' directly, I get this output:
{{{
$ ./test_15027 
dyld: lazy symbol binding failed: Symbol not found: _libintl_bindtextdomain
  Referenced from: /Users/jimk/work/io_cleanups/./test_15027
  Expected in: dynamic lookup

dyld: Symbol not found: _libintl_bindtextdomain
  Referenced from: /Users/jimk/work/io_cleanups/./test_15027
  Expected in: dynamic lookup

Trace/BPT trap
}}}"	bug	closed	normal		configure	trunk	medium	fixed	gettext PPC Fink Macports	allison		applied	darwin
