Comment 4 for bug 1301187

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

On 2014-04-02 20:02 +0100, Papoj Thamjaroenporn wrote:

> 1) Is Inkscape wiki as a whole outdated, especially in the developer
> section?

It varies. From my point of view it is impossible to tell this with 100%
accuracy - it's a wiki, after all, and often used as 'scratchpad' for
developer discussions which don't aim for a 'consumer-ready' final state
of an individual page. The advantage of a wiki on the other hand is that
each page has the history recorded - you can quickly check what was
recently edited (and whether or not those edits had been relevant
updates, or just minor fixes of typos and broken links).

As far as I know most of the information about Inkscape and Mac OS X in
the wiki is likely to be outdated (i.e. dates back to when the currently
available package Inkscape 0.48.2 was created). It rarely takes changes
in newer versions of OS X into account (starting with Snow Leopard and
later versions), nor changes which occurred inside Inkscape's code base
since the release of 0.48.2.

There was only one recent addition I am aware of - about compiling
Inkscape trunk with a custom compiler which has C++11 support on Snow
Leopard - but this is only of interest to developers working on the core
code, not for (script-based) extensions. The current plan is to require
a modern compiler with C++11 support after the release of the next major
version (0.91).

> I want to develop Inkscape Extension

You don't have to compile Inkscape (stable or trunk) in order to develop
script-based extensions: just install the port inkscape (stable) or
'inkscape-devel' (trunk) and launch inkscape from the terminal. Custom
user extensions can be installed in
 $HOME/.config/inkscape/extensions
Newly installed extensions will be loaded after relaunching inkscape;
the same needs to be done if the INX file was modified (those get parsed
when launching inkscape, and can't be reloaded at runtime).

Note: there have been internal changes in current trunk which affect
certain aspects of extensions (unit and length conversions). Additional
information (draft, since this is still under development but will
affect the next major release) can be found here:
<http://wiki.inkscape.org/wiki/index.php/Release_notes/0.91#Units:_Breaking_change>
<http://wiki.inkscape.org/wiki/index.php/Notes_On_Units_Handling_in_Extensions_in_0.91>

> 2) How should I modify ./configure so it uses clang as default compiler
> instead of g++?

Why did it choose GCC in the first place? I really can't answer this
based on the available information: you seem to have modified the shell
environment yourself (maybe you installed GCC 4.7 in MacPorts and
selected it as "default compiler" for usage outside of MacPorts, or you
might have replaced files in /usr or /bin , or used a third-party
installer for GCC 4.7, or …) - try to reverse these settings for the
shell environment you use to run autogen.sh and configure for inkscape.

It is possible to override the currently configured default compiler e.g
like this:

$ CC=clang CXX=clang++ ./configure --prefix=/path/to/prefix

but I'm reluctant to recommend this since it is difficult to guess what
other environment variables might have been configured/changed which
would need to be overridden or changed.

> 3) If inkscape-devel is unstable, how do I find and install the stable
> build instead? How "unstable" is it?

There is no measurement for state of stability of the current
development branch. Trunk by definition is unstable - and this can
change with every new commit (new bugs, regressions, bugs fixed). A
common rule though is that it should always be compilable, and that
really bad regressions should be reverted or fixed quickly (many of the
core inkscape developers relied on Inkscape trunk to be usable for their
daily work).

Wrt stable builds I'd again refer you to the MacPorts portfile, this
time for the stable port 'inkscape' (to be able to compile 'stable'
Inkscape 0.48 on Mavericks with latest Xcode 5.1 you need to either
retrieve HEAD of the stable release branch (<lp:inkscape/0.48.x>) or use
the patches which David Evans maintains for the Inkscape port in MacPorts:
<https://trac.macports.org/browser/trunk/dports/graphics/inkscape/Portfile>

> 4) Also, if I want to install by macport instead, I guess I don't need
> bzr to manage it right? Should I just delete the entire bzr repository?

If you install inkscape via MacPorts, you do not need the local bzr
repository anymore (the download of the sources required to compile
inkscape when the port gets installed is handled by MacPorts internally).