[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Building on OSX without package managers
From: |
Richard Campbell |
Subject: |
Re: Building on OSX without package managers |
Date: |
Mon, 24 Jan 2011 23:13:58 -0500 |
On Jan 24, 2011, at 10:03 PM, Ben Abbott wrote:
> On Jan 24, 2011, at 9:49 PM, Richard Campbell wrote:
>
>> On Jan 24, 2011, at 8:05 PM, Ben Abbott wrote:
>>
>>> On Jan 24, 2011, at 6:24 PM, Richard Campbell wrote:
>>>
>>>> All,
>>>>
>>>> My coworkers and I rely heavily on Octave.app from octave.sourceforge.net
>>>> and I am becoming concerned that it's not being actively maintained. I am
>>>> willing to take over the building of Octave.app from source but I'm having
>>>> trouble with it and I want to know what the state of the art is for
>>>> compiling Octave on OSX.
>>>>
>>>> I need a solution that doesn't require a third party package manager like
>>>> Fink or Macports at either compile or runtime. I don't mind installing
>>>> compile-time dependencies on one machine, but once I compile it I'd like
>>>> to be able to package it up and run it on other Macs (like the existing
>>>> Octave.app). Can Octave.app be built easily once Octave builds?
>>>>
>>>> I've seen mention of a Readme.MacOS file on this board. Neither the
>>>> current stable or testing source distributions from
>>>> http://www.gnu.org/software/octave/download.html have this file included
>>>> in them although I found the one at
>>>> http://hg.savannah.gnu.org/hgweb/octave/file/e0e50f48df37/README.MacOS and
>>>> it still says "TODO - add instructions" under "Building without a package
>>>> manager".
>>>>
>>>> I would very much like to be able to address variables larger than 2 GB on
>>>> my machine with >>2 GB of RAM, so at a bare minimum I'd like to be able to
>>>> compile Octave for myself with --enable-64.
>>>>
>>>> Some nitpicks about what I've seen so far in trying to compile Octave from
>>>> source:
>>>> - Why shouldn't the included versions of autoconf, automake, readline, sed
>>>> &c. be sufficient for compiling Octave?
>>>> - I don't want Aquaterm to be the default, as X11 does just fine and is
>>>> installed by default on all new Macs, and Aquaterm at first glance hasn't
>>>> been maintained in about 5 years.
>>>> - The recommended Fortran compiler, which I already use for other things,
>>>> gives the first 'configure' error when I try to build Octave from source.
>>>> It's a different error wither or not I try --enable-64, but they're both
>>>> about integer size.
>>>>
>>>> R Campbell
>>>
>>>
>>> Welcome to the list.
>>>
>>> I've been working on the README.MacOS file, and would greatly appreciate
>>> help in completing the TODO's. I hope to update the current version soon.
>>> Unfortunately, the update will not include instructions on how to build
>>> Octave *without* Fink or Macports.
>>>
>>> In the past, Thomas Trieichl had volunteered his time and effort to provide
>>> binary releases for MacOS. I've cc'd him in the event he would like to
>>> comment.
>>>
>>> It's a bit dated, but in 2007 Thomas provided some documentation for how he
>>> built the app for MacOS.
>>>
>>>
>>> https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2007-May/006648.html
>>>
>>> Today things will be more difficult as MacOS 10.6 runs both 32 and 64 bit
>>> apps. This requires some special attention to ensure that the proper
>>> libraries are linked to. As a result, Thomas' instructions will not likely
>>> be sufficient, but should provide a good starting point.
>>>
>>> Michael Godfrey offered some additional information back in January.
>>>
>>>
>>> https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2010-January/018352.html
>>>
>>> In the last few days Jarno Rajahalme also added some advice for building
>>> for 64bit.
>>>
>>>
>>> https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2011-January/022393.html
>>>
>>> Regarding your questions,
>>>
>>>> - Why shouldn't the included versions of autoconf, automake, readline, sed
>>>> &c. be sufficient for compiling Octave?
>>>
>>> The simple answer, is that the versions of the tools bundled with
>>> MacOS/Xcode are dated and do not include the functionality needed to build
>>> Octave. However, I'm not sure about sed, as I don't know what version is
>>> needed. It is possible that a inspired volunteer could modify the build
>>> process so that the tools provided by Apple are sufficient, but as these
>>> tools are only needed to build Octave, and are readily available, I don't
>>> see sufficient motivation for this change.
>>>
>>>> - I don't want Aquaterm to be the default, as X11 does just fine and is
>>>> installed by default on all new Macs, and Aquaterm at first glance hasn't
>>>> been maintained in about 5 years.
>>>
>>> The default terminal used by Gnuplot is easily modified by setting the
>>> environment variable "GNUTERM". If you place the following in ~/.octaverc
>>> then x11 will be used instead of aqua.
>>>
>>> setenv ("GNUTERM", "x11")
>>>
>>>> - The recommended Fortran compiler, which I already use for other things,
>>>> gives the first 'configure' error when I try to build Octave from source.
>>>> It's a different error wither or not I try --enable-64, but they're both
>>>> about integer size.
>>>
>>> I assume you are not using Fink or Macports, but have installed Xcode.
>>> Since Xcode does not include a fortran compiler, one must be installed. You
>>> can install a fortran compiler, which is compatible with Apple's version of
>>> gcc (bundled with Xcode), from the link below.
>>>
>>> http://r.research.att.com/tools/
>>>
>>> Ben
>>
>> The Fortran compiler from r.research.att.com is the one I'm using. I'm
>> attempting to build octave-3.3.54 with it and I'm getting the following
>> errors in configure, with and without --enable-64 respectively:
>>
>> configure: error: in order to build octave with 64-bit indexing support your
>> Fortran compiler must have an option for setting the default integer size to
>> 8 bytes. See the file INSTALL for more information.
>> configure: error: your Fortran compiler must have an option to make integers
>> the same size as octave_idx_type (int). See the file INSTALL for more
>> information.
>>
>> I've had some success with building universal binaries with configure
>> scripts on 64-bit Macs in the past, so I expect that I can eventually get it
>> to work. It's also possible that a 64-bit-only version might be necessary.
>> Does the --enable-64 function for indexing integer size require that the
>> binary itself be 64-bit, though?
>>
>> I have been using the GNUTERM variable to revert to X11. I seem to recall
>> that it used to be the default, but was switched to Aquaterm years ago. In
>> my opinion X11 should be the default again, to avoid dependencies on third
>> party projects and projects which may be unmaintained.
>>
>> I'll look through the other links and see if I can resolve the other
>> dependencies.
>
> I haven't attempted a 64bit build. Hopefully someone with some experience
> will comment.
>
> Regarding the default gnuplot terminal, using Aqua appears to be preferred by
> most Mac users.
>
> The next version of Octave will include a native graphics backend. Meaning
> gnuplot will not be needed to display graphics.
>
> Ben
>
> p.s. pls respond below so that those arriving late may easily follow along.
I am getting the errors even if I attempt a 32-bit build of octave-3.3.54. The
error is during the running of ./configure.
I get further with octave-3.2.4. After installing gnu readline and sed (with
--prefix=/usr) I get through the configure stage and can proceed to make. I
eventually get the following error:
gcc -c -I/usr/X11/include/freetype2 -I/usr/X11/include -fPIC -I. -I../..
-I../../liboctave -I../../src -I../../libcruft/misc -DHAVE_CONFIG_H -mieee-fp
-Wall -W -Wshadow -Wformat -g -O2 -D_THREAD_SAFE f77-fcn.c -o pic/f77-fcn.o
In file included from f77-fcn.c:31:
f77-fcn.h:224: error: ‘F77_FUNC’ declared as function returning a function
f77-fcn.h:224: warning: parameter names (without types) in function declaration
f77-fcn.c:50: error: ‘F77_FUNC’ declared as function returning a function
f77-fcn.c: In function ‘F77_FUNC’:
f77-fcn.c:50: warning: type of ‘xstopx’ defaults to ‘int’
f77-fcn.c:50: warning: type of ‘XSTOPX’ defaults to ‘int’
f77-fcn.c:59: error: ‘s’ undeclared (first use in this function)
f77-fcn.c:59: error: (Each undeclared identifier is reported only once
f77-fcn.c:59: error: for each function it appears in.)
f77-fcn.c:59: error: ‘slen’ undeclared (first use in this function)
f77-fcn.c:64: warning: function declared ‘noreturn’ has a ‘return’ statement
f77-fcn.c:50: warning: unused parameter ‘xstopx’
f77-fcn.c:50: warning: unused parameter ‘XSTOPX’
make[3]: *** [pic/f77-fcn.o] Error 1
At this point I installed gnu autoconf and automake, which did not change the
error. I also attempted using "F77=gfortran -ff2c" with configure, and the
error still did not change.
I am using gfortran-4.2.3 from r.research.att.com which I installed on this
machine earlier today.
- Building on OSX without package managers, Richard Campbell, 2011/01/24
- Re: Building on OSX without package managers, Ben Abbott, 2011/01/24
- Re: Building on OSX without package managers, Richard Campbell, 2011/01/24
- Re: Building on OSX without package managers, Ben Abbott, 2011/01/24
- Re: Building on OSX without package managers,
Richard Campbell <=
- Re: Building on OSX without package managers, John W. Eaton, 2011/01/24
- Re: Building on OSX without package managers, Richard Campbell, 2011/01/24
- Re: Building on OSX without package managers, John W. Eaton, 2011/01/25
- Re: Building on OSX without package managers, Richard Campbell, 2011/01/25
- Re: Building on OSX without package managers, Richard Campbell, 2011/01/25
- Re: Building on OSX without package managers, John W. Eaton, 2011/01/25
- Re: Building on OSX without package managers, Richard Campbell, 2011/01/25
- Re: Building on OSX without package managers, Ben Abbott, 2011/01/25
- Re: Building on OSX without package managers, John W. Eaton, 2011/01/25
- Re: Building on OSX without package managers, Richard Campbell, 2011/01/25