Ticket #786 (new bug) — at Version 6

Opened 13 years ago

Last modified 13 years ago

config step auto::gettext throws warnings on Darwin/PPC

Reported by: jkeenan Owned by: jkeenan
Priority: normal Milestone:
Component: configure Version: trunk
Severity: medium Keywords: gettext PPC
Cc: allison Language:
Patch status: Platform: darwin

Description (last modified by jkeenan) (diff)

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

Change History

  Changed 13 years ago by coke

Is the bug report that this step is generating warnings visible to the user, or that gettext is probed for incorrectly?

In general, I would expect programs run in an effort to determine what your system supports to fail if the support isn't present in the way we're checking for it.

If the problem is that the warnings are user visible, I would expect that to be handled by the config system in general, not by the each individual step that runs C code as part of the probe process.

If the problem is that you expect gettext support to be there, then we probably have to refine the test.

follow-up: ↓ 3   Changed 13 years ago by coke

  • version changed from 1.3.0 to branch

FWIW, I get no warnings running Configure.pl in this branch on OS X 10.4 /intel; if I manually follow the steps in the original post to build the executable for testing, it works fine (if I remove the /sw include/lib directives while compiling -- I don't have that dir on my system), and the resulting executable generates "hello world".

in reply to: ↑ 2   Changed 13 years ago by jkeenan

Replying to coke:

FWIW, I get no warnings running Configure.pl in this branch on OS X 10.4 /intel

Coke: I'm not entirely surprised by this. Whenever I see dyld in a Darwin configuration error message, I groan ... because it inevitably means we have a problem that exists on PPC or on Intel but not on both. Cf.: old RTs dealing with auto::readline on Darwin.

But these warnings often have a canary in coal mine character. I didn't bother to try to build on Darwin/PPC in this branch. I did build on Linux/Intel, and got a lot of test failures (reported on Smolder).

follow-up: ↓ 5   Changed 13 years ago by whiteknight

  • owner set to whiteknight
  • status changed from new to assigned

For what it's worth, I haven't made any changes to the configuration system in the branch that would cause these kinds of errors. At least, none that I am aware of. Once we get a few more bugs fixed I will update from trunk to see if any of these configuration issues disappear.

Thanks for the report!

in reply to: ↑ 4   Changed 13 years ago by jkeenan

  • priority changed from normal to major

Replying to whiteknight:

For what it's worth, I haven't made any changes to the configuration system in the branch that would cause these kinds of errors.

Grrr! #$#!#@$%@%$*(&*(&!!!

You are correct. I just tried to configure in trunk and got the same errors. Which means someone has recently introduced something that screws up configuration on Darwin/PPC regardless of branch.

Let the bisection begin!

kid51

  Changed 13 years ago by jkeenan

  • status changed from assigned to new
  • description modified (diff)
  • cc whiteknight removed
  • summary changed from io_cleanups branch: config step auto::gettext throws warnings on Darwin/PPC to config step auto::gettext throws warnings on Darwin/PPC
  • priority changed from major to normal
  • owner changed from whiteknight to jkeenan
  • version changed from branch to trunk
  • keywords PPC added; io_cleanups removed

This problem has nothing to do with what Whiteknight was doing in the io_cleanups branch. The config warnings were present in trunk long before that branch was created. So I'm taking the ticket.

I'm currently bisecting to try to determine the point of origin of the warnings. I failed to spot them earlier because I do not customarily log configuration output, and because this particular configuration step tends to spew its output one full screen above the 'you may now use make to build parrot' success message.

kid51

Note: See TracTickets for help on using tickets.