Ticket #786 (closed bug: fixed)

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 Fink Macports
Cc: allison Language:
Patch status: applied 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

Attachments

26308.26309.config.init.hints.darwin.pm.diff Download (1.1 KB) - added by jkeenan 13 years ago.
Changes to config/init/hints/darwin.pm at r26309 (part of merge of pdd17pmc branch into trunk)

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

follow-up: ↓ 7   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

in reply to: ↑ 6 ; follow-up: ↓ 9   Changed 13 years ago by jkeenan

  • cc particle added

Bisection indicates that this bug was introduced in r26948:

Index: config/auto/gettext.pm
===================================================================
--- config/auto/gettext.pm      (revision 26947)
+++ config/auto/gettext.pm      (revision 26948)
@@ -71,7 +71,9 @@
         }
     }
     else {
-        eval { $conf->cc_build( '', '-lintl' ); };
+        # don't need to link with libintl if we have GNU libc
+        my $linklibs = defined $conf->data->get('glibc') ? '' : '-lintl';
+        eval { $conf->cc_build( '', $linklibs ); };
     }
     my $has_gettext;
     if ( !$@ ) {
------------------------------------------------------------------------
r26948 | particle | 2008-04-12 14:26:51 -0400 (Sat, 12 Apr 2008) | 1 line

[config] modifying auto::gettext to work properly with GNU libc

  Changed 13 years ago by jkeenan

  • status changed from new to assigned

in reply to: ↑ 7 ; follow-up: ↓ 10   Changed 13 years ago by jkeenan

Replying to jkeenan:

Bisection indicates that this bug was introduced in r26948:

That statement is probably inaccurate. r26948 was the first revision in which there was a change to config/auto/gettext.pm and which displayed the failure.

I am conducting further bisection to determine where between r26121 and r26948 the failure first occurred.

kid51

in reply to: ↑ 9 ; follow-up: ↓ 15   Changed 13 years ago by jkeenan

  • cc allison added; particle removed

Replying to jkeenan:

I am conducting further bisection to determine where between r26121 and r26948 the failure first occurred.

I ran Configure.pl at both r26121 and r26948 with verbose-step=auto::gettext. I then examined the verbose output for that step at each revision. I immediately became suspicious when I saw that the probe for gettext at r26121 was called with this:

/usr/bin/g++  -L/opt/local/lib -L/sw/lib -L/opt/local/lib test.o -lintl -o test  -lm -lgmp -lreadline

... while the same probe at r26948 was called with this:

/usr/bin/g++ -undefined dynamic_lookup -L/sw/lib -L/opt/local/lib test.o -lintl -o test  -lm -lgmp -lreadline -lgdbm -lcrypto

I recalled that we had tremendous problems with -undefined dynamic_lookup on Darwin two years ago. So I grepped the config/ directory at HEAD and came up with this:

$ fns ./config | xargs grep -n dynamic_lookup
./config/init/hints/darwin.pm:52:        linkflags           => '-undefined dynamic_lookup',
./config/init/hints/darwin.pm:54:        ld_share_flags      => '-dynamiclib -undefined dynamic_lookup',
./config/init/hints/darwin.pm:55:        ld_load_flags       => '-undefined dynamic_lookup -bundle',

I then ran svn blame on the Darwin hints file and came up with this:

$ svn blame config/init/hints/darwin.pm | head -60 | tail -10
 10888       rafl         link                => 'c++',
 26309    allison         linkflags           => '-undefined dynamic_lookup',
 10888       rafl         ld                  => 'c++',
 26309    allison         ld_share_flags      => '-dynamiclib -undefined dynamic_lookup',
 28885  chromatic         ld_load_flags       => '-undefined dynamic_lookup -bundle',
 10888       rafl         memalign            => 'some_memalign',
 16144 paultcochrane         has_dynamic_linking => 1,
 16144 paultcochrane 
 37632       coke         # TT #344:  When built against a dynamic libparrot,
 30173    jkeenan         # installable_parrot records the path to the blib version

I then checked out both r26308 and r26309 and configured each with verbose-step=auto::gettext. Here is the verbose output for each:

26308

Seeing if your configuration includes gettext.../usr/bin/gcc -fno-common -no-cpp-precomp  -pipe -I/opt/local/include -pipe -fno-common -Wno-long-double  -DHASATTRIBUTE_CONST  -DHASATTRIBUTE_DEPRECATED  -DHASATTRIBUTE_FORMAT  -DHASATTRIBUTE_MALLOC  -DHASATTRIBUTE_NONNULL  -DHASATTRIBUTE_NORETURN  -DHASATTRIBUTE_PURE  -DHASATTRIBUTE_UNUSED  -DHASATTRIBUTE_WARN_UNUSED_RESULT  -falign-functions=16 -fvisibility=hidden -W -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wdeclaration-after-statement -Wdisabled-optimization -Wendif-labels -Wextra -Wformat -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Winit-self -Winline -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wno-missing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wnonnull -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 -I/sw/include -I/opt/local/include  -I./include -c test.c
/usr/bin/g++  -L/opt/local/lib -L/sw/lib -L/opt/local/lib test.o -lintl -o test  -lm -lgmp -lreadline
./test
Hello, world!
 (yes) 
  ccflags: -fno-common -no-cpp-precomp  -pipe -I/opt/local/include -pipe -fno-common -Wno-long-double  -DHASATTRIBUTE_CONST  -DHASATTRIBUTE_DEPRECATED  -DHASATTRIBUTE_FORMAT  -DHASATTRIBUTE_MALLOC  -DHASATTRIBUTE_NONNULL  -DHASATTRIBUTE_NORETURN  -DHASATTRIBUTE_PURE  -DHASATTRIBUTE_UNUSED  -DHASATTRIBUTE_WARN_UNUSED_RESULT  -falign-functions=16 -fvisibility=hidden -W -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wdeclaration-after-statement -Wdisabled-optimization -Wendif-labels -Wextra -Wformat -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Winit-self -Winline -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wno-missing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wnonnull -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 -I/sw/include -I/opt/local/include -DHAS_GETTEXT
.......................yes.
Setting Configuration Data:
(
        verbose => undef,
);

26309

Seeing if your configuration includes gettext.../usr/bin/gcc -fno-common -no-cpp-precomp  -pipe -I/opt/local/include -pipe -fno-common -Wno-long-double  -DHASATTRIBUTE_CONST  -DHASATTRIBUTE_DEPRECATED  -DHASATTRIBUTE_FORMAT  -DHASATTRIBUTE_MALLOC  -DHASATTRIBUTE_NONNULL  -DHASATTRIBUTE_NORETURN  -DHASATTRIBUTE_PURE  -DHASATTRIBUTE_UNUSED  -DHASATTRIBUTE_WARN_UNUSED_RESULT  -falign-functions=16 -fvisibility=hidden -W -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wdeclaration-after-statement -Wdisabled-optimization -Wendif-labels -Wextra -Wformat -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Winit-self -Winline -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wno-missing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wnonnull -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 -I/sw/include -I/opt/local/include  -I./include -c test.c
/usr/bin/g++ -undefined dynamic_lookup -L/sw/lib -L/opt/local/lib test.o -lintl -o test  -lm -lgmp -lreadline
./test
dyld: lazy symbol binding failed: Symbol not found: _libintl_bindtextdomain
  Referenced from: /Users/jimk/work/26309/./test
  Expected in: dynamic lookup

dyld: Symbol not found: _libintl_bindtextdomain
  Referenced from: /Users/jimk/work/26309/./test
  Expected in: dynamic lookup

 (no) ........................no.
Setting Configuration Data:
(
        verbose => undef,
);


So it now appears as if r26309 is the real culprit. Allison, can you suggest a remedy?

Thank you very much.
kid51

Changed 13 years ago by jkeenan

Changes to config/init/hints/darwin.pm at r26309 (part of merge of pdd17pmc branch into trunk)

follow-up: ↓ 12   Changed 13 years ago by doughera

I've never used Darwin, but I will note that there really are two changes here: One is that Configure.pl is no longer explicitly linking against -lintl , and the second is the -undefined dynamic_lookup . I wonder: If you take the current revision and add back in the -lintl library, does it work? It seems quite plausible to me that the comment

# don't need to link with libintl if we have GNU libc

might not actually be accurate for your system.

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

Replying to doughera:

If you take the current revision and add back in the -lintl library, does it work? It seems quite plausible to me that the comment {{{ # don't need to link with libintl if we have GNU libc }}} might not actually be accurate for your system.

I don't think that's sufficient.

I tried out this patch:

Index: config/auto/gettext.pm
===================================================================
--- config/auto/gettext.pm      (revision 39871)
+++ config/auto/gettext.pm      (working copy)
@@ -52,12 +52,16 @@
 
     my $osname = $conf->data->get_p5('OSNAME');
 
+my $darwincheck = defined $conf->data->get('glibc');
+$darwincheck ? print "glibc defined on Darwin/PPC\n"
+    : print "glibc NOT defined on Darwin/PPC\n";
     my $extra_libs = $self->_select_lib( {
         conf            => $conf,
         osname          => $osname,
         cc              => $conf->data->get('cc'),
         win32_gcc       => '-lintl',
         win32_nongcc    => 'intl.lib',
+        darwin          => '-lintl',
         default         => defined $conf->data->get('glibc') ? '' : '-lintl',
     } );

If I understand Parrot::Configure::Step::Methods::_select_lib() correctly, adding darwin => '-lintl' should have done the trick. But when I reconfigured with verbose-step=auto::gettext, this was my output:

auto::gettext -       Does your configuration include gettext...
glibc NOT defined on Darwin/PPC
/usr/bin/gcc -fno-common -no-cpp-precomp  -pipe -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_3747.c
/usr/bin/g++ -undefined dynamic_lookup -L/sw/lib -L/opt/local/lib test_3747.o -lintl -o test_3747  -lm -lgmp -lreadline
./test_3747
dyld: lazy symbol binding failed: Symbol not found: _libintl_bindtextdomain
  Referenced from: /Users/jimk/work/parrot/./test_3747
  Expected in: dynamic lookup

dyld: Symbol not found: _libintl_bindtextdomain
  Referenced from: /Users/jimk/work/parrot/./test_3747
  Expected in: dynamic lookup


Setting Configuration Data:
(
        verbose => undef,
);
Does your configuration include gettext............done.

and I saw this in lib/Parrot/Config/Generated.pm:

             'HAS_GETTEXT' => 0,

So, assuming I took the correct approach, it appears that simply adding -lintl back in is not sufficient.

kid51

follow-up: ↓ 14   Changed 13 years ago by jkeenan

Continuing to blunder around in here, I wondered, "Maybe the value I should have supplied to darwin was -libintl rather than -lintl."

When I tried that, i.e.,

Index: config/auto/gettext.pm
===================================================================
--- config/auto/gettext.pm      (revision 39891)
+++ config/auto/gettext.pm      (working copy)
@@ -52,12 +52,17 @@
 
     my $osname = $conf->data->get_p5('OSNAME');
 
+my $darwincheck = defined $conf->data->get('glibc');
+$darwincheck ? print "glibc defined on Darwin/PPC\n"
+    : print "glibc NOT defined on Darwin/PPC\n";
     my $extra_libs = $self->_select_lib( {
         conf            => $conf,
         osname          => $osname,
         cc              => $conf->data->get('cc'),
         win32_gcc       => '-lintl',
         win32_nongcc    => 'intl.lib',
+#        darwin          => '-lintl',
+        darwin          => '-libintl',
         default         => defined $conf->data->get('glibc') ? '' : '-lintl',
     } );

... I got this output:

auto::gettext -       Does your configuration include gettext...
glibc NOT defined on Darwin/PPC
/usr/bin/gcc -fno-common -no-cpp-precomp  -pipe -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_17026.c
/usr/bin/g++ -undefined dynamic_lookup -L/sw/lib -L/opt/local/lib test_17026.o -libintl -o test_17026  -lm -lgmp -lreadline
/usr/bin/ld: can't locate file for: -libintl
collect2: ld returned 1 exit status

Setting Configuration Data:
(
        verbose => undef,
);

                      Does your configuration include gettext............done.

On the one hand, this coding is still not detecting gettext, which I believe is installed on this iBook. On the other hand, it's a much cleaner failure message than previously; all that -undefined dynamic_lookup stuff is gone.

Continuing to diagnose. Any help appreciated.

Thank you very much.

kid51

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

Replying to jkeenan:

On the one hand, this coding is still not detecting gettext, which I believe is installed on this iBook. On the other hand, it's a much cleaner failure message than previously; all that -undefined dynamic_lookup stuff is gone.

Correction:

-undefined dynamic_lookup is, of course, still there. It's the following error message that is gone:

dyld: lazy symbol binding failed: Symbol not found: _libintl_bindtextdomain
  Referenced from: /Users/jimk/work/parrot/./test_3747
  Expected in: dynamic lookup

dyld: Symbol not found: _libintl_bindtextdomain
  Referenced from: /Users/jimk/work/parrot/./test_3747
  Expected in: dynamic lookup

in reply to: ↑ 10 ; follow-ups: ↓ 16 ↓ 17   Changed 13 years ago by jkeenan

  • keywords Fink Macports added
  • patch set to applied

Replying to jkeenan:

So it now appears as if r26309 is the real culprit. Allison, can you suggest a remedy?

The above analysis was also wrong. It turns out that this was not a Parrot problem per se. But that's not to say that there's no problem here for Parrot.

In the course of staring at the screen for multiple hours, I decided to run locate gettext. I noticed that certain gettext files were showing up under /opt/local as well as /sw. The latter is where libraries imported via Fink live; the former is for those imported by Macports. The date of the files under /opt/local was June 18; those under /sw were at least a year older.

Until very recently I had never used Macports. But on June 18 I was preparing to go to the Parrot VM Workshop in Pittsburgh. I had posted on the mailing list for that workshop a request as to the minimum prerequisites. pmichaud said that people should have Rakudo on their laptops. Since I had not attempted to build Perl 6 since Rakudo flew out the Parrot cage several months ago, I had to download it from github.

That, in turn, meant that I had to install git. For an older Mac like mine, the best alternative was to use the Macport of git. Which meant I had to install Macports, in the course of which I apparently installed the Macports version of gettext. This was confirmed via gettext --version, which gettext and man gettext, which collectively revealed that the Macport of gettext was newer than the Fink version and had precedence in my path.

But, unlike some other configuration steps, no one had ever requested that auto::gettext be fine-tuned to look for that library, when on Darwin, as a macport rather than as a Fink package. So I patched config/auto/gettext.pm in r39893. To really get this to work, however, I had to remove the Fink package of gettext -- which was not easy, but I'll spare you the details.

So I can configure on Darwin/PPC and once again include gettext in the configuration.

The fact that I can date this change to June 18 suggests that I was wrong to think this error had been occurring, but going unobserved, since the pdd17pmc branch merge early last year. It proves that sometimes I actually do look at Configure.pl's output sometimes and explains why I was so startled to see the error messages last week.

But, as I noted at the beginning of this post, while I no longer have a problem, Parrot has a problem -- or at least a decision to make. On particular operating systems, when libraries are available from multiple sources, how do we (or a user) choose among different versions of those libraries?

We haven't had to face this question much, because the only OS on which Parrot developers have requested the capacity to install packages from non-GCC libraries is Darwin. And the code that does exist for Darwin appears to have been included in the configuration system solely in response to user requests here and there over time. Surprisingly, we have so far had no request to search for BSD ports during configuration.

So I suspect we have some policy decisions still to be made on the question of libraries from package vendors.

I'll leave this ticket open for a few days for comments, but I think the larger question I just posed will deserve a separate TT.

Thank you very much.
kid51

in reply to: ↑ 15   Changed 13 years ago by coke

Replying to jkeenan:

But, unlike some other configuration steps, no one had ever requested that auto::gettext be fine-tuned to look for that library, when on Darwin, as a macport rather than as a Fink package.

See also TT #727.

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

  • status changed from assigned to closed
  • resolution set to fixed

Replying to jkeenan:

I'll leave this ticket open for a few days for comments, but I think the larger question I just posed will deserve a separate TT.

Since the only comment I got was ... more work! ... I think we can close this ticket.

Word of advice to macports users: Crude use of macports -- as would be typical of a newbie like me as of last month -- results in installation of all macports on your disk and rearrangement of your path to prepend /opt/local/bin to your path.

This was of mixed benefit for me. On the one hand, the svn client which came with macports was much newer than the one I installed several years ago. On the other hand, the perl that came with macports was 5.8.9. So suddenly I was no longer running the 5.10.0 that I compiled from source on the day that version was released! I had to re-arrange my PATH in my .bashrc file to get what I really wanted, which was to have programs that I myself compiled and installed in /usr/local to be located before those in /opt.

Thank you very much.
kid51

Note: See TracTickets for help on using tickets.