[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] Mac build



Hi Brian,

Glad to hear you're trying the Mac build. As you've found, we haven't been able to spend as much time on the Mac version as we have on the Linux version. The Mac version needs more contributors - like you, perhaps?

The problem with GetSvnVersion is my fault. I had to remove that function temporarilly to get the Universal Binary version of libCDraw to build. I'll check-in a fix shortly.

I'll try to fold your comments into the Mac build instructions when I get time.

I have created an ad-hoc "External makefile" project in XCode which works OK but I'm not sure whether I've done it the best way. I guess that Xara LX may always have to be built using a makefile but it would be much better to develop using a "proper" XCode project.

When you get the Mac version running you will find the most obvious problems are that (1) you get some warnings when loading files and (2) some objects don't render correctly. 1. I'm 99% certain this is because of byte-order problems in the CXaraFile::Read(FLOAT*) and CXaraFile::Read(double*) functions. 2. This may follow from 1 but may be something more fundamental in the rendering of transparent bitmaps.

Thanks for the feedback.

Phil
phil@xxxxxxxx

On 18 Mar 2006, at 18:34, Brian Raderman wrote:

Hello everyone,

I have been trying to build a Mac version of XaraLX and I have been unable to thus far. I have gotten as far as linking but I am getting an undefined symbol error:

/usr/bin/ld: Undefined symbols:
_GDraw_GetSvnVersion

I'm guessing that this is defined in the recently checked in libCDraw.a because I see a prototype but no implementation for it anywhere. I had to run ranlib on it because ld was complaining about an out of date table of contents. I know that libCDraw.a is a fat binary because I had to upgrade from XCode 2.1 to 2.2 to even be able to get this far (2.1 can't handle the Mac/Intel universal binaries), so I was thinking that might have something to do with it. I am developing on a G4 PowerPC chip. This latest build attempt was made with revision 685 from subversion.

I have collected some notes about some things that I have encountered and thought I would share them to save others some pain, or at the very least someone can tell me if I've misunderstood something.

-Gettext is out of date in Fink. I abandoned Fink and just built gettext and automake myself. You have to configure gettext with "-- disable-csharp".

-GTK is not included in the Apple developer tools nor is it necessary. wxWidgets uses Carbon by default. You can configure it to use Cocoa, but that is currently beta. I actually attempted to build GTK before realizing this and none of the examples even worked. I've gotten GTK apps to work before on the Mac, but I used Fink binaries. This little adventure is where I discovered the jpeglib issue listed below.

-The IJG distribution of libjpeg does not build correctly using the standard procedure. Everything appears to work fine and the tests even run without any errors, but other packages will fail to recognize the resulting binaries. I found the following instructions online that corrected this problem:
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
cp /usr/share/libtool/config.sub .
cp /usr/share/libtool/config.guess .
./configure --enable-shared --enable-static
make
sudo make install
sudo ranlib /usr/local/lib/libjpeg.a

-There is some confusion in the build instructions with wxWidgets versions. The latest wxMac source is version 2.6.2. You have to get the full source if you want the 2.6.3 RC1, although wx-config -- version still reports it as being version 2.6.2. I am using 2.6.3 RC1.

-The error tracking code in wxOil/errors.h and wxOil/errors.cpp that uses wxStackWalker is a problem on the mac. wxWidgets configure reports that the backtrace() method is not available and warns that this functionality will be disabled. I surrounded the small amount of code that uses the wxStackWalker class with "#ifndef __WXMAC__" as a temporary solution to get the build going.

-You have to add "--enable-debug" to the XaraLX configure command if you are using a debug wxWidgets build as specified in the build instructions. If you don't do this, wx-config will not be able to retrieve the proper settings for CPPFLAGS.

Has anyone attempted to create an XCode project? I can look into this after I get a working build if no one else wants to. I still need to make my way through all the XaraLX documentation on the web site, but if someone could give me some brief direction on what current Mac issues I could start with and the areas of the code where they exist, that would be much appreciated.

I hope everyone is having a great weekend,
Brian