linking problems

Werner LEMBERG wl at
Sun Dec 8 23:32:15 UTC 2019

On my Mac Lion box running an up-to-date MacPorts, for experimentation
reasons I try to build the current git version of lilypond directly
from the repository – this is, I use the MacPorts infrastructure for
compilation with a recent clang version, but without any adaptations
of lilypond's source code.

Building in a separate directory I configure with

  /path/to/lilypond/git/configure \
  CC=clang-mp-9.0 \
  CXX=clang-mp-9.0 \
  --prefix=... \
  --with-texgyre-dir="/usr/local/texlive/2018/texmf-dist/fonts/opentype/public/tex-gyre" \
  --with-flexlexer-dir="/opt/local/include" \
  --disable-documentation \

then calling `make`.  However, this fails at the linking stage; I get
zillion of messages like

  Undefined symbols for architecture x86_64:
       std::__1::allocator<char> >::copy
          unsigned long,
          unsigned long) const", referenced from:
      ly_format(scm_unused_struct*, scm_unused_struct*)
        in general-scheme.o

I guess I miss some linker flags due to the need of a special C++

* Which linker flags do I miss?

* Why doesn't the above invocation of the `configure` script
  automatically handle this?  Or to ask differently, why doesn't
  `clang-mp-9.0` find its own library files automatically (at least I
  presume this is the problem)?


More information about the macports-users mailing list