[MacPorts] #53449: cctools 895 breaks port:audacity build

MacPorts noreply at macports.org
Tue Jan 31 20:18:14 UTC 2017


#53449: cctools 895 breaks port:audacity build
----------------------+----------------------
  Reporter:  RJVB     |      Owner:  jeremyhu
      Type:  defect   |     Status:  assigned
  Priority:  Normal   |  Milestone:
 Component:  ports    |    Version:
Resolution:           |   Keywords:
      Port:  cctools  |
----------------------+----------------------

Comment (by RJVB):

 OK, so the underlying error comes from the way Audacity builds liblv2.a:

 {{{
 function waf
 {
    pkg=$1
    pushd >/dev/null ${pkg}
    shift
    /opt/local/bin/python2.7 waf --prefix="." --include="." $@ build ||
 exit 1
    popd >/dev/null

    . .buildvars

    if [ -e ${pkg}/build/*.a ]
    then
       mkdir -p obj
       pushd obj
       ar vx ../${pkg}/build/*.a
       ar vq ../liblv2.a *
       popd
       rm -rf obj
    fi
 }

 [ -e liblv2.a ] && exit 0

 waf lv2    -vvv --no-plugins
 waf serd   -vvv --static --no-shared --no-utils
 waf sord   -vvv --static --no-shared --no-utils
 waf sratom -vvv --static --no-shared
 waf lilv   -vvv --static --no-shared --no-utils
 waf suil   -vvv --static --no-shared --no-qt
 }}}

 IOW, different "modules" are built, and if that produces a static lib it
 is unpacked in a temp. directory, and the archive elements are added in
 cumulative fashion to liblv2.a . The first step succeeds, but subsequent
 steps fail in the ranlib stage (possibly because the temp. directory also
 contains a file with the symbol table?).

 Curiously, this took me back in time to an similar issue I had with one of
 my own projects, and which I solved by using a different approach which
 also works here:

 {{{
 function waf
 {
    pkg=$1
    pushd >/dev/null ${pkg}
    shift
    /opt/local/bin/python2.7 waf --prefix="." --include="." $@ build ||
 exit 1
    popd >/dev/null

    . .buildvars

    if [ -e ${pkg}/build/*.a ]
    then
       mkdir -p obj.${pkg}
       pushd obj.${pkg}
       ar vx ../${pkg}/build/*.a
       popd
    fi
 }

 [ -e liblv2.a ] && exit 0

 waf lv2    -vvv --no-plugins
 waf serd   -vvv --static --no-shared --no-utils
 waf sord   -vvv --static --no-shared --no-utils
 waf sratom -vvv --static --no-shared
 waf lilv   -vvv --static --no-shared --no-utils
 waf suil   -vvv --static --no-shared --no-qt

 # now create liblv2.a in a single call
 libtool -static -o liblv2.a obj.serd/*.o obj.sord/*.o obj.sratom/*.o
 obj.lilv/*.o obj.suil/*.o
 ar -sv liblv2.a
 }}}

 IOW, unpack the intermediate archives into dedicated directories (they'll
 contain files with the same names) and then use `libtool -static -o` to
 create the definitive archive.

--
Ticket URL: <https://trac.macports.org/ticket/53449#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list