bug-prolog
[Top][All Lists]
Advanced

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

Re: Problems building for older Macs


From: Jasper Taylor
Subject: Re: Problems building for older Macs
Date: Tue, 17 Feb 2009 17:30:23 +0000
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

OK, MacPorts seems to work nicely on my Leopard (10.5) Intel Mac and my Panther (10.3) PPC Mac.

What I am worried about is, whether an executable I build on the Leopard machine using gplc will then be able to run on a Tiger (10.4) machine (also Intel). I cannot test this immediately because I do not have a Tiger machine myself, but last time I tried, it failed (bus error). That was when I had compiled gprolog myself from source. If it fails again, I can resort to running the executable built on the Panther box on the Tiger machine, even though it is only built for ppc. It runs OK in compatibility mode. However this involves some loss of performance.
   --Jasper

Paulo Moura wrote:

On 2009/02/16, at 14:34, Daniel Diaz wrote:

Jasper,

it is not clear what you are trying. Is it to cross compile gprolog (this does not work) or else what ? You have to produce the executable on the target machine (I know Paulo could compile 1.3.1 for a ppc based mac some day ago).

Hope this helps

Daniel

Jasper Taylor a écrit :
Hi folks,
I have a Macbook running OSX 10.5. I want to distribute a prolog executable to run on older Macs, but I have problems. Firstly, my executable just gives 'bus error' when running on an OSX 10.4 Mac.

Is this OSX 10.4 Mac PowerPC-based or Intel-base? The MacBooks are Intel based so the executable will not work on PopwerPC. If your OSX 10.4 Mac is also Intel-based, then the problem can be related to the different version of the operating system.

This is even though I supply the -mmacosx-version-min=10.3 flag to gcc via the '-C' option of gplc when building it. I rebuilt Prolog itself using this flag, but that did not help. This is using gcc 4.0. Secondly I tried to build an executable for PowerPC macs by including the '-arch ppc' flag. This built the object code OK, but when making the executable I got:
cc1: error: unrecognized command line option "-march=i486"
In fact the object file reports itself as being of i386 architecture so I would be quite prepared to believe this is impossible!



Most likely not impossible but somewhere your flags are not passed to the build process. Hard to tell where the problem lies from your description. My suggestion is to install GNU Prolog using MacPorts:

% sudo port install -k gprolog

This worked fine for me both on Intel and PowerPC Macs. You can also use MacPorts to build an Apple's Installer package:

sudo port pkg gprolog

This worked fine for me in my Intel MacBook Pro but not in the PowerPC Mac (a Xserve) where I tried it. Could you try it and report back your findings?

Cheers,

Paulo


-----------------------------------------------------------------
Paulo Jorge Lopes de Moura
Dep. of Computer Science, University of Beira Interior
6201-001 Covilhã, Portugal

Office 4.3  Ext. 3257
Phone: +351 275319891 Fax: +351 275319899
Email: <mailto:address@hidden>

Home page: <http://www.di.ubi.pt/~pmoura>
Research:  <http://logtalk.org/>
-----------------------------------------------------------------





_______________________________________________
Bug-prolog mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-prolog





reply via email to

[Prev in Thread] Current Thread [Next in Thread]