users-prolog
[Top][All Lists]
Advanced

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

Compiling GNU Prolog 1.4.0 on MacOS X 10.7 (Lion)


From: Paulo Moura
Subject: Compiling GNU Prolog 1.4.0 on MacOS X 10.7 (Lion)
Date: Sun, 31 Jul 2011 20:03:47 +0100

Hi,

This message is only of interest for MacOS X users that have upgraded to Lion 
(MacOS X 10.7) and which to compile GNU Prolog 1.4.0 from sources.

Lion's Xcode 4.1 changes the default C compiler from gcc-4.2 to llvm-gcc-4.2. 
The first part of the workaround for now is, you guessed it, to revert to 
gcc-4.2 when compiling GNU Prolog. If you're using MacPorts, you can patch the 
swi-prolog-devel portfile by adding the following lines:

platform darwin 11 {
        configure.compiler gcc-4.2
}

If you're not using MacPorts, you should be able to set the CC environment 
variable to gcc-4.2.

The issue with the default llvm-gcc-4.2 compiler (which also affects other 
Prolog compilers such as YAP and SWI-Prolog) seems to be related to memory 
management.

The second part of the workaround is to patch configure to make it aware of 
Lion. Open the configure file in a text editor and search for the two 
occurrences of the "darwin10" string, replacing it by "darwin1".

Cheers,

Paulo

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

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

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




reply via email to

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