[tlbuild] Stripping the luatex binary

Philipp Stephani st_philipp at yahoo.de
Mon May 2 21:10:50 CEST 2011


Am 02.05.2011 um 19:49 schrieb George N. White III:

> On Sat, Apr 30, 2011 at 2:40 PM, Philipp Stephani <st_philipp at yahoo.de> wrote:
>> 
>> Am 28.04.2011 um 23:13 schrieb Karl Berry:
>> 
>>>    I'm on OS X 10.6. Running ./Build ends with:
>>>    Undefined symbols:
>>>      "_u_getDataDirectory_46", referenced from:
>>>          _main in makeconv.o
>>> 
>>> Hmm.  u_getDataDirectory is defined in icu-4.6/common/putil.c.  So the
>>> question is apparently where this _46 suffix is being added and how to
>>> stop it (or add it to definition).  That's not something I want to delve
>>> into, even if I had access to such a system (which I don't), sorry.
>> 
>> The 46 suffix indicates the version number of the ICU library, and that is fine. The problem was that I had a dynamic version of the ICU libraries in /usr/local which are always preferred by the linker even if the directory of the static libraries is listed on the command line. (This means that linking against static libraries without giving the full file name is not portable.)
>> 
> 
> You are missing a key option to ld -- "man ld" (on Leopard) says:
> 
> -search_paths_first
>                 By default the -lx and -weak-lx options first search for a
>                 file of the form `libx.dylib' in each directory in the
>                 library search path, then a file of the form `libx.a' is
>                 searched for in the library search paths.  This option
>                 changes it so that in each path `libx.dylib' is searched for
>                 then `libx.a' before the next path in the library search path
>                 is searched.

Thanks a lot for this hint! I've read over the ld manpage but must have overlooked this. I think this flag should be added to all invocations of the linker on OS X since there are quite a few binaries that link against static libraries.


More information about the tlbuild mailing list