Mac OS X 10.9 (Mavericks) build issues lp:inkscape/0.48.x

Bug #1245722 reported by David Evans on 2013-10-29
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
High
Johan Engelen

Bug Description

Mac OS X 10.9 (Mavericks)
MacPorts 2.2.1
Xcode 5.0.1 (Build 5A2053 )
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Uses libc++

Current lp:inkscape/0.48.x r9972 fails to build on the above configuration. The attached patch fixes the problem.
Based on the BSD patch in bug #1232474 plus some additional c++x11 compatibility patches.

Tested successfully on the following

OS X 10.6 i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.6)
OS X 10.7 Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) -stdlib=libstdc++ -std=c++11
OS X 10.8 Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) -stdlib=libstdc++ -std=c++11
OS X 10.9 Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) -stdlib=libc++ -std=c++11

Related branches

David Evans (devans-n) wrote :
su_v (suv-lp) on 2013-10-29
tags: added: backport-proposed
Changed in inkscape:
milestone: none → 0.48.5
su_v (suv-lp) wrote :

The patch has been also been confirmed to work when compiling Inkscape (lp:inkscape/0.48.x) via homebrew formula:
<https://github.com/mxcl/homebrew/pull/24137>

Changed in inkscape:
importance: Undecided → High
status: New → Triaged
Johan Engelen (johanengelen) wrote :

Thanks a bunch for the patch!
I will go over it and start committing. The problem is that it is pretty huge, and fixes a bunch of unrelated things. Note that many fixes apply to trunk too. So I'll commit in steps.

su_v (suv-lp) wrote :

@Johan - the patch for trunk is in bug #1244295 !!

Johan Engelen (johanengelen) wrote :

Fully committed !
Please test. I modified a few fixes.

su_v (suv-lp) on 2013-11-12
Changed in inkscape:
assignee: nobody → Johan Engelen (johanengelen)
status: Triaged → Fix Committed
Markus Engel (engelmarkus) wrote :

@Johan: For me (OS X 10.6.8, clang-3.3 -std=c++11, libc++) compilation of the stable branch fails with the attached error. This seems to be a problem with libc++ and the iterator implementation there or with the adjustments you made to the patch before applying it.

su_v (suv-lp) wrote :

Fix has been confirmed (stable branch HEAD compiles without additional patch on Mavericks) with homebrew:
<https://github.com/mxcl/homebrew/issues/23277#issuecomment-28349383>

David Evans (devans-n) wrote :

Additionally confirming that stable branch HEAD compiles without additional patches on MacPorts for all configurations
listed above.

Inkscape 4.8.4 patched to that level (r9985) committed to MacPorts as inkscape @0.48.4_18
http://trac.macports.org/changeset/113401

Jack Howarth (howarth) wrote :

On fink, we had to add one other patch for inkscape 0.48.4 patched to r9985 to build on 10.9…

--- inkscape-0.48.4/src/extension/system.cpp.orig 2013-11-17 17:15:40.000000000 -0500
+++ inkscape-0.48.4/src/extension/system.cpp 2013-11-17 17:15:59.000000000 -0500
@@ -20,6 +20,7 @@

 #include <interface.h>

+#include <unistd.h>
 #include "system.h"
 #include "preferences.h"
 #include "extension.h"

Without that change, the patched file doesn't compile due to the getpwd call used in that file being undeclared.

Jack Howarth (howarth) wrote :

This issue in fink is due to our usage of glib2 2.22.4 which doesn't cause the system.ii generated on fink to include unistd.h….

extension/system.cpp:91:18: error: use of undeclared identifier 'getcwd'
        curdir = getcwd(__null, 0);
                 ^

so extension/system.cpp needs to include…

--- src/extension/system.cpp.orig 2013-11-18 19:30:30.000000000 -0500
+++ src/extension/system.cpp 2013-11-18 19:30:07.000000000 -0500
@@ -20,6 +20,9 @@

 #include <interface.h>

+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 #include "system.h"
 #include "preferences.h"
 #include "extension.h"

MacPorts doesn't see this because they are using glib 2.38.2

su_v (suv-lp) on 2013-12-12
tags: removed: backport-proposed
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments