# New Ticket Created by James Keenan # Please include the string: [perl #52212] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=52212 >
This is one of a series of tickets reporting issues encountered at a Parrot/Rakudo buildfest held at Toronto Perlmongers on March 27, 2008. Attempting to configure Parrot on Darwin, the participant received warnings during configuration step auto::readline -- the same sort of warnings I was receiving over the past few weeks on auto::readline following changes to config/init/hints/darwin.pm when the PDD 17 branch was merged into trunk. Earlier this week, I diagnosed those problems as due to some combination of the revisions in hints/darwin and the specific version of readline I had installed via Fink. The apparent solution was to uninstall that version and install the latest (along with upgrading Xcode tools). The participant in the buildfest provided a deeper analysis of the problems of readline on Darwin. See attachment.
Environment: ============ OS X 10.5.2 (Darwin 9.2.0) ICU4C 3.8.1 GNU readline 5.2 Perl 5.8.8 (Apple build) gcc 4.0.1 (Apple build) Xcode Developer Tools 3.0 Build Issues: ============= _rl_get_keymap -------------- Configuration results in the following message being displayed: dyld: lazy symbol binding failed: Symbol not found: _rl_get_keymap Referenced from: /opt/src/perl6/svn/parrot/./test Expected in: dynamic lookup Resolution for it is to pass in the location of where GNU readline 5 is installed via --ccflags and --linkflags. Cause is OS X shipping with NetBSD libedit and symlinking /usr/lib/libreadline.dylib to libedit (editline). NetBSD editline has a wrapper API that is rather compatible with GNU readline, but lacks _rl_get_keymap. If the readline check is run without a real GNU readline in a higher-priority location than /usr/lib, the test binary is linked against libedit. The lack of the symbol '_rl_get_keymap' does not cause the compile/static link to fail as the compiler flags in the test include '-undefined dynamic_lookup', which causes the static linker to ignore the missing symbol when linking against libreadline.dylib and the dynamic linker to output an error message when it can't find it. $ c++ -undefined dynamic_lookup test.o -o test-2 -lm -lutil -lreadline -L/opt/readline52_20071129/lib $ otool -L test-2 test-2: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0) /usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0) /opt/readline52_20071129/lib/libreadline.5.2.dylib (compatibility version 5.0.0, current version 5.2.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) $ ./test-2 1 $ c++ -undefined dynamic_lookup test.o -o test -lm -lutil -lreadline $ otool -L test test: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0) /usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libedit.2.dylib (compatibility version 2.0.0, current version 2.9.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) $ ./test dyld: lazy symbol binding failed: Symbol not found: _rl_get_keymap Referenced from: /private/tmp/./test Expected in: dynamic lookup dyld: Symbol not found: _rl_get_keymap Referenced from: /private/tmp/./test Expected in: dynamic lookup Trace/BPT trap $