[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: README.MacOS & 64bit buids [was: Clang!]
From: |
Richard Campbell |
Subject: |
Re: README.MacOS & 64bit buids [was: Clang!] |
Date: |
Thu, 3 Feb 2011 09:09:33 -0500 |
On Feb 3, 2011, at 9:03 AM, Ben Abbott wrote:
> On Feb 1, 2011, at 12:36 PM, Richard Campbell wrote:
>
>> octave:2> octave_config_info.CC
>> ans = clang
>> octave:3> octave_config_info.CXX
>> ans = llvm-g++
>> octave:4> octave_config_info.FC
>> ans = gfortran
>> octave:5> octave_config_info.config_opts
>> ans = '--disable-docs' '--with-blas=-lBLASWRAP' 'CC=clang' 'CFLAGS=-arch
>> x86_64' 'LDFLAGS=-arch x86_64' 'CPPFLAGS=-arch x86_64 -D_REENTRANT'
>> 'CXX=llvm-g++' 'FFLAGS=-arch x86_64'
>>
>> It works! I also tried it with CXX="clang" but it gave a bunch of warnings
>> and then hung during the build. From what I gather, c++ support from Clang
>> is still highly experimental, although six months ago it was completely
>> nonexistent. LLVM is working beautifully though. I might try with
>> llvm-gfortran as well.
>>
>> Campbell
>
> Richard,
>
> I noticed the manual build instructions include a description for 64bit
> dependencies and instructions for building 32 bit Octave.
>
> I'd like to split the instructions into sections for both 32bit and 64bit.
>
> I assume that for a 32bit fftw I just need to change ...
>
> export CFLAGS="-arch i686 -arch x86_64"
>
> ... to ...
>
> export CFLAGS="-m32"
>
> For a 64bit build of Octave is it sufficient to ...
>
> export CC="clang"
> export CXX="llvm-g++"
> export FC="/usr/bin/gfortran"
> export CFLAGS="-arch x86_64"
> export FFLAGS="$CFLAGS"
> export CPPFLAGS="-arch x86_64 -D_REENTRANT -D__LISTS__"
> export LDFLAGS="-arch x86_64"
> ./configure --disable-readline --disable-docs
>
> The "-D__LISTS__" option is needed to avoid the FLTK problem mention on the
> list below.
>
>
> https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2011-February/022708.html
>
> I'f this looks ok to you, I'll modify README.MacOS.
>
> Ben
No, don't change the dependencies line. "-arch i686 -arch x86_64" builds the
dependency as a 32- and 64-bit universal binary, not just as 64-bit. It works
for linking to either types of code. If "-arch i686" appeared by itself, this
would be equivalent to "-m32". Any dependencies which CAN compile as universal
binaries SHOULD be, in order to avoid having to recompile them in the future
when you install other code beside Octave. In particular I use FFTW for Octave
(32 bit) as well as my C code (64 bit only). If the FFTW library were 32 or 64
bit only I'd have to recompile it all the time.
Campbell
- Clang!, Richard Campbell, 2011/02/01