Comment 1 for bug 1301187

Revision history for this message
su_v (suv-lp) wrote : Re: Problem compiling 0.48+devel with GCC 4.7 on Mavericks: Undefined Symbols

Unfortunately the instructions in the wiki for compiling on OS X are really outdated (most of them had been written at the time when Mac OS X 10.5.8 Leopard was the current version of OS X). The packaging scripts in the repo to create an app bundle don't work on Snow Leopard and later versions of OS X.

Did you consider to install the port 'inkscape-devel' to get a recent (unstable) trunk build, instead of trying to compile it yourself? The ports 'inkscape' and 'inkscape-devel' are well-maintained by David Evans, and usually quite up-to-date.

On 2014-04-02 08:58 +0100, Papoj Thamjaroenporn wrote:
> (How do I know the specific build version?)

$ bzr revno

> Compiler: gcc 4.7
> Libraries are all installed with macports (after proper migration)

This won't produce a stable build: you cannot mix C++ compilers due to ABI incompatibilities of the C++ Standard Library (MacPorts uses the system compiler for most of its ports, i.e. clang from Xcode). The available options are:
a) use the same compiler for your local build (i.e. clang on Mavericks)
b) recompile all C++ library dependencies in MacPorts with your custom compiler (not officially supported by MacPorts)
c) compile & install all C++ dependencies (libsigc++, glibmm, atkmm, cairomm, pangomm, gtkmm, …) with your custom C++ compiler into a custom prefix (use shared dependencies from MacPorts), and then configure your local inkscape build to use headers and libraries from that custom prefix first, before searching in MacPorts (no instructions for this option available).

> --enable-osxapp

Don't use this configure option for now - the scripts to create a self-contained relocateable application bundle don't work, and you cannot use a build configured with this flag regularly on the command line either.

> during inkscape linking I encounter "Undefined symbols for
> architecture x86_64" problem: it seems like a bunch of methods from
> Gdk, Glib, Glibmm, and Cairo are not found

Currently I have no clue why that would happen - the MacPorts 'inkscape-devel' port does compile successfully on Mavericks. Maybe you could check the details in its Portfile on which flags are required on Mavericks (with clang from Xcode, not with a custom compiler):
<https://trac.macports.org/browser/trunk/dports/graphics/inkscape-devel/Portfile>