Changes between Initial Version and Version 1 of Ticket #38630, comment 2


Ignore:
Timestamp:
Apr 10, 2013, 2:49:45 AM (11 years ago)
Author:
aphor (Jeremy McMillan)
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #38630, comment 2

    initial v1  
    77with no -L to help it find any libcom_err.dylib, especially the /opt/local/lib/libcom_err.dylib which I confirmed implements the missing __et_list symbol.
    88
    9 I took a peek at the Makefile, and found it sets an interesting ld option: -search_paths_first. So then I looked it up and "man ld" yields this possibly interesting news:
    10 {{{
    11     -search_paths_first
    12                  This is now the default (in Xcode4 tools).  When processing
    13                  -lx the linker now searches each directory in its library
    14                  search paths for `libx.dylib' then `libx.a' before the moving
    15                  on to the next path in the library search path.
    16 
    17      -search_dylibs_first
    18                  Changes the searching behavior for libraries.  The default is
    19                  that when processing -lx the linker searches each directory
    20                  in its library search paths for `libx.dylib' then `libx.a'.
    21                  This option changes the behavior to first search for a file
    22                  of the form `libx.dylib' in each directory in the library
    23                  search path, then a file of the form `libx.a' is searched for
    24                  in the library search paths.  This option restores the search
    25                  behavior of the linker prior to Xcode4.
     9I took a peek at the portfile, and found
     10{{{
     11# kerberos5 fails to build in its own presence, see #23769, #37944
     12configure.cppflags-delete   -I${prefix}/include
     13configure.ldflags-delete    -L${prefix}/lib
    2614}}}
    2715
    28 Makefile contains:
    29 {{{LDFLAGS = -arch x86_64 -arch i386 -Wl,-search_paths_first}}}
    30 Maybe I misunderstand, but the new Xcode's default linker option (set explicitly in the Macport, presumably to make the old Xcode llvm ld behave as the new one) seems to be set for searching default library paths. Trouble: $prefix is not defined until later in the Makefile, so I'm not sure how $prefix/lib should be added to the -L linker options.
     16so is apparently broken by r77769, and I can confirm that commenting those lines out of the portfile works (at least with no active kerberos5 package/port). Some test common.o failed to compile with make -j, but built fine without parallel make.