[Scribus] Issues with building Scribus on Mac OS X natively (long!)

Kevin Walzer kevin
Wed Dec 31 10:59:28 CET 2003


I've made at least some progress in building Scribus 1.1.4 natively on 
OS X (using QT/Mac as opposed to QT/X11). Because Scribus couldn't find 
my QT installation on the first try (it died during ./configure), I 
finally figured out I had to recompile QT with threading support, which 
took several hours (I have a G3 iBook, which isn't the fastest machine 
in the world). After this, configuration was successful and I started 
to run make.

Here's the first error I ran into:

-----
In file included from ../../scribus/pageitem.h:30,
                  from ../../scribus/page.h:29,
                  from ../../scribus/scribusview.h:33,
                  from ../../scribus/scribus.h:48,
                  from prefs.h:27,
                  from prefs.cpp:1:
../../scribus/scpainter.h:155: error: 'GC' is used as a type, but is not
    defined as a type.
make[3]: *** [prefs.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
-----

Not being a coder, I wasn't sure how to handle this. A quick search of 
Google suggested that I uncomment a few lines in 
mkspecs/darwin-g++/qplatformdefs.h, but I wasn't sure which lines to 
edit. Any advice from the QT experts on this list? Instead, on a hunch, 
I opened up scpainter.h file in question and deleted the line 
containing GC. I figured this might cause problems later, but wanted to 
see if the build could continue. It did.

Here's my next error that caused a crash:

--------
art_kmisc.c:1:35: libart_lgpl/art_vpath.h: No such file or directory
art_kmisc.c:2:35: libart_lgpl/art_bpath.h: No such file or directory
art_kmisc.c:3:34: libart_lgpl/art_misc.h: No such file or directory
art_kmisc.c:4:36: libart_lgpl/art_affine.h: No such file or directory
In file included from art_kmisc.c:7:
art_kmisc.h:23:34: libart_lgpl/art_misc.h: No such file or directory
art_kmisc.h:24:35: libart_lgpl/art_bpath.h: No such file or directory
art_kmisc.h:25:35: libart_lgpl/art_vpath.h: No such file or directory
art_kmisc.h:26:40: libart_lgpl/art_alphagamma.h: No such file or 
directory
art_kmisc.h:27:41: libart_lgpl/art_filterlevel.h: No such file or 
directory
In file included from art_kmisc.c:7:
art_kmisc.h:35: error: parse error before '*' token
art_kmisc.h:42: error: parse error before '*' token
art_kmisc.h:42: error: parse error before '*' token
art_kmisc.h:42: warning: data definition has no type or storage class
art_kmisc.h:48: error: parse error before '*' token
art_kmisc.c:43: error: parse error before '*' token
art_kmisc.c: In function `ksvg_art_vpath_render_bez':
art_kmisc.c:85: error: `x3' undeclared (first use in this function)
art_kmisc.c:85: error: (Each undeclared identifier is reported only once
art_kmisc.c:85: error: for each function it appears in.)
art_kmisc.c:85: error: `x0' undeclared (first use in this function)
art_kmisc.c:86: error: `y3' undeclared (first use in this function)
art_kmisc.c:86: error: `y0' undeclared (first use in this function)
art_kmisc.c:106: error: `flatness' undeclared (first use in this 
function)
art_kmisc.c:107: error: `y1' undeclared (first use in this function)
art_kmisc.c:107: error: `x1' undeclared (first use in this function)
art_kmisc.c:111: error: `y2' undeclared (first use in this function)
art_kmisc.c:111: error: `x2' undeclared (first use in this function)
art_kmisc.c:131: error: `p_vpath' undeclared (first use in this 
function)
art_kmisc.c:131: error: `pn' undeclared (first use in this function)
art_kmisc.c:131: error: `pn_max' undeclared (first use in this function)
art_kmisc.c:132: error: `ART_LINETO' undeclared (first use in this 
function)
art_kmisc.c: At top level:
art_kmisc.c:172: error: parse error before '*' token
art_kmisc.c:173: error: parse error before '*' token
art_kmisc.c: In function `ksvg_art_bez_path_to_vec':
art_kmisc.c:175: error: `ArtVpath' undeclared (first use in this 
function)
art_kmisc.c:175: error: `vec' undeclared (first use in this function)
art_kmisc.c:204: error: `bez' undeclared (first use in this function)
art_kmisc.c:206: error: `ART_MOVETO_OPEN' undeclared (first use in this 
function)
art_kmisc.c:207: error: `ART_MOVETO' undeclared (first use in this 
function)
art_kmisc.c:208: error: `ART_LINETO' undeclared (first use in this 
function)
art_kmisc.c:216: error: `ART_END' undeclared (first use in this 
function)
art_kmisc.c:223: error: `ArtPathcode' undeclared (first use in this 
function)
art_kmisc.c:223: error: parse error before numeric constant
art_kmisc.c:228: error: `ART_CURVETO' undeclared (first use in this 
function)
art_kmisc.c:240: error: `flatness' undeclared (first use in this 
function)
art_kmisc.c: At top level:
art_kmisc.c:385: error: parse error before '*' token
art_kmisc.c: In function `ksvg_art_rgb_affine':
art_kmisc.c:398: error: `art_u8' undeclared (first use in this function)
art_kmisc.c:398: error: `dst_p' undeclared (first use in this function)
art_kmisc.c:398: error: `dst_linestart' undeclared (first use in this 
function)
art_kmisc.c:399: error: syntax error before '*' token
art_kmisc.c:400: error: `ArtPoint' undeclared (first use in this 
function)
art_kmisc.c:404: error: `dst' undeclared (first use in this function)
art_kmisc.c:405: error: `affine' undeclared (first use in this function)
art_kmisc.c:407: error: `alpha' undeclared (first use in this function)
art_kmisc.c:408: error: `y0' undeclared (first use in this function)
art_kmisc.c:408: error: `y1' undeclared (first use in this function)
art_kmisc.c:410: error: `pt' undeclared (first use in this function)
art_kmisc.c:411: error: `x0' undeclared (first use in this function)
art_kmisc.c:412: error: `x1' undeclared (first use in this function)
art_kmisc.c:413: error: `src_width' undeclared (first use in this 
function)
art_kmisc.c:413: error: `src_height' undeclared (first use in this 
function)
art_kmisc.c:419: error: `src_pt' undeclared (first use in this function)
art_kmisc.c:422: error: `src_p' undeclared (first use in this function)
art_kmisc.c:422: error: `src' undeclared (first use in this function)
art_kmisc.c:422: error: `src_rowstride' undeclared (first use in this 
function)
art_kmisc.c:434: error: `dst_rowstride' undeclared (first use in this 
function)
make[3]: *** [art_kmisc.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

---

As far as I can tell, Scribus is now complaining that I don't have 
libarts installed, which is correct. This seems to be more of a 
deal-breaker, because I attempted to install libarts on my machine, but 
it won't run under OS X natively (it does run under X11). I understand 
that libarts is one of the key dependencies for Scribus along with 
freetype2 (which I have installed just fine on OS X with my tetex 
distro).

This seems to be a big obstacle.  If I'm not mistaken, libart is based 
in GTK/Gnome, which does not run at all on OS X. (There are a couple of 
porting efforts to bring GTK to the Mac, but they are in very early 
stages.) So this dependency would prevent a successful native port of 
the latest version of Scribus to the Mac, at least unless until someone 
gets libart running on the Mac.

This leaves a couple of different alternatives:

1. Try to build 1.0.1. This is not the best option because 1.0.1 is no 
longer in the main line of development, but it is preferable (to me, at 
least) to the Fink version, which in my experience is unacceptably slow 
(probably because of the overhead of X11). I'll report on this effort 
later.

2. Is there anything more portable than libarts that could be used as 
the graphics engine? I'm not very knowledgeable about this stuff, 
especially on Linux, but the Python Imaging Libary comes to mind. (I'm 
aware that Franz did the earliest versions of Scribus in Python--it 
might run slower, but Python is infinitely portable.) This may not be 
the direction the team wants to go.

3. Split off Mac development into a parallel track that replaces 
libarts with the Mac-native graphics engine. This would be a tremendous 
amount of work. At a minimum, it would probably require a port from QT 
to Xcode and replace all the QT libraries with OS X's Carbon framework 
(the part of the Mac IDE that supports C++). Although QT compiles as a 
Carbon application on the Mac, I'm not sure you can mix QT and 
Mac-specific code in the same environment. If the effort went to be 
fully Mac-native, as some on the wish list have suggested, that would 
require rewriting all of the C++ in Objective C in the Cocoa framework. 
Regardless of how it was undertaken, it would be beyond my skills; I'm 
an *extreme* newbie when it comes to coding, and I'm only working at a 
beginner level in Python.

I hope this feedback is useful, even if I'm only identifying problems 
instead of proposing solutions. I'll keep the team posted on how the 
build of 1.0.1 goes. If that works, perhaps it would be possible to put 
together some kind of Mac binary distribution with source code 
available that could be downloaded from the Scribus web site? Learning 
how to build Mac application bundles is on my list of projects, so it 
is possible that I could take this on if time allows.

Regards,


Kevin Walzer, Ph.D.
Editor
WordTech Communications -- A New Paradigm of Poetry
http://www.wordtechcommunications.com
http://www.smallbizmac.com
http://www.kevin-walzer.com
mailto:kevin at wordtechweb.com




More information about the scribus mailing list