linking problems

Werner LEMBERG wl at gnu.org
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 \
  --disable-optimising

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

  Undefined symbols for architecture x86_64:
    "std::__1::basic_string
      <char,
       std::__1::char_traits<char>,
       std::__1::allocator<char> >::copy
         (char*,
          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++
library.

* 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)?


    Werner


More information about the macports-users mailing list