help-octave
[Top][All Lists]
Advanced

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

Successful build of Octave 3.6.1 on OSX Lion (sans FINK)


From: Clarkman
Subject: Successful build of Octave 3.6.1 on OSX Lion (sans FINK)
Date: Wed, 14 Mar 2012 14:43:42 -0700 (PDT)

# This wasn't that bad, and I am very happy to get it working!  BUT I caution
# you though, I may be long-time Matlab user & C++ developer, but I am
totally
# newbie to Octave.  I finally figured out how to get fltk back-end working,
so
# thanks for all the helpful posts here!
#
# I'm on OSX 10.7.3, had a previously installed binary for octave-3.2.3
# The code snippet below for src/display.cc (CGDisplayBitsPerPixel) might be
useful?

# This will take a long while ...
sudo port install octave-devel

# Install gfortran for OSX Lion (twisted tale here!  This looks)
http://gcc.gnu.org/wiki/GFortranBinaries#MacOS

# Copy PCRE header, a total hack.
sudo cp /opt/local/include/pcre.h /usr/include/

# Get, build, and install readline-6.2
# (May be retrieved from ftp.cwru.edu.)
# In readline-6.2 dir:
./configure
# I got an error during 'make' that requires we use -dynamiclib rather than
-dynamic
# Researched and found: "You need to go into the sub folder
readline-6.2/shlib folder in the ReadLine source folder and edit Makefile,
search -dynamic and change it to -dynamiclib.  This worked, but again it's a
total hack!
# Then this will work for readline, puts in /usr/local:
sudo make install

# Then we must convince Octave configure to look for readline > 4.2 at
/usr/local/lib instead of the default:

export LDFLAGS='-L/usr/local/lib -L/opt/local/lib'
export CPPFLAGS='-I/usr/local/include -I/opt/local/include'

# Crude, but it works.  There are probably options to ./configure that
accomplishes same.  ??  Also not sure of the ordering opt/usr or vice-versa


# Next we have a problem with the deprecated "CGDisplayBitsPerPixel"
function
# as called in src/display.cc on line 75.  I found this workaround that
seems
# to work fine:
#if 1
        CGDisplayModeRef mode = CGDisplayCopyDisplayMode(display);
        CFStringRef pixEnc = CGDisplayModeCopyPixelEncoding(mode);
        if(CFStringCompare(pixEnc, CFSTR(IO32BitDirectPixels),
kCFCompareCaseInsensitive) == kCFCompareEqualTo)
                dp = 32;
        else if(CFStringCompare(pixEnc, CFSTR(IO16BitDirectPixels),
kCFCompareCaseInsensitive) == kCFCompareEqualTo)
                dp = 16;
        else if(CFStringCompare(pixEnc, CFSTR(IO8BitIndexedPixels),
kCFCompareCaseInsensitive) == kCFCompareEqualTo)
                dp = 8;
#else
          dp = CGDisplayBitsPerPixel (display);
#endif


# But you only have the gnuplot side working yet
# Ben suggested this:
sudo port install transfig epstool pstoedit
# here
http://octave.1599824.n4.nabble.com/Compiling-Octave-with-OSX-10-7-td3734547.html
### Woah!!  When I saw OSX Lion building imake, I did a double-take.

# Then you have to install fltk-devel
sudo port install fltk-devel
# Now build Octave and take a coffee break
./configure

# Now gets us this ....

Octave is now configured for x86_64-apple-darwin11.3.0

  Source directory:            .
  Installation prefix:         /usr/local
  C compiler:                  gcc   -Wall -W -Wshadow -Wformat
-Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings
-Wcast-align -Wcast-qual -g -O2 -D_THREAD_SAFE -pthread
  C++ compiler:                g++  -I/opt/local/include
-I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include   
-Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings
-Wcast-align -Wcast-qual -g -O2
  Fortran compiler:            gfortran -O
  Fortran libraries:            -L/usr/local/lib -L/opt/local/lib
-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin11/4.6.2
-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin11/4.6.2/../../..
-lgfortran -lquadmath -lm
  Lex libraries:               
  LIBS:                        -lm  

  AMD CPPFLAGS:                
  AMD LDFLAGS:                 
  AMD libraries:               -lamd
  ARPACK CPPFLAGS:             
  ARPACK LDFLAGS:              
  ARPACK libraries:            
  BLAS libraries:              -lcblas -lf77blas -latlas
  CAMD CPPFLAGS:               
  CAMD LDFLAGS:                
  CAMD libraries:              -lcamd
  CARBON libraries:            -Wl,-framework -Wl,Carbon
  CCOLAMD CPPFLAGS:            
  CCOLAMD LDFLAGS:             
  CCOLAMD libraries:           -lccolamd
  CHOLMOD CPPFLAGS:            
  CHOLMOD LDFLAGS:             
  CHOLMOD libraries:           -lcholmod
  COLAMD CPPFLAGS:             
  COLAMD LDFLAGS:              
  COLAMD libraries:            -lcolamd
  CURL CPPFLAGS:               
  CURL LDFLAGS:                
  CURL libraries:              -lcurl
  CXSPARSE CPPFLAGS:           
  CXSPARSE LDFLAGS:            
  CXSPARSE libraries:          -lcxsparse
  DL libraries:                -ldl
  FFTW3 CPPFLAGS:              
  FFTW3 LDFLAGS:               
  FFTW3 libraries:             -lfftw3
  FFTW3F CPPFLAGS:             
  FFTW3F LDFLAGS:              
  FFTW3F libraries:            -lfftw3f
  fontconfig CFLAGS:           -I/opt/local/include  
  fontconfig LIBS:             -L/opt/local/lib -lfontconfig  
  FT2_CFLAGS:                  -I/opt/local/include/freetype2
-I/opt/local/include
  FT2_LIBS:                    -L/opt/local/lib -lfreetype -lz -lbz2
  GLPK CPPFLAGS:               
  GLPK LDFLAGS:                
  GLPK libraries:              -lglpk
  graphics CFLAGS:             -I/opt/local/include -pipe -O2
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT
  graphics LIBS:               -L/opt/local/lib -arch x86_64 -lfltk_gl
-framework AGL -framework OpenGL -framework ApplicationServices -lfltk
-lpthread -framework Cocoa
  Magick++ CPPFLAGS:           -I/opt/local/include/GraphicsMagick  
  Magick++ LDFLAGS:            -L/opt/local/lib  
  Magick++ libraries:          -lGraphicsMagick++ -lGraphicsMagick  
  HDF5 CPPFLAGS:               
  HDF5 LDFLAGS:                
  HDF5 libraries:              -lhdf5
  LAPACK libraries:            -llapack
  OPENGL libraries:            -L/opt/local/lib -lfontconfig  
-Wl,-framework -Wl,OpenGL
  PTHREAD flags:               -D_THREAD_SAFE -pthread
  PTHREAD libraries:           
  QHULL CPPFLAGS:              
  QHULL LDFLAGS:               
  QHULL libraries:             -lqhull
  QRUPDATE libraries:          -lqrupdate
  READLINE libraries:          -lreadline
  REGEX libraries:             -L/opt/local/lib -lpcre
  TERM libraries:              -lncurses
  UMFPACK libraries:           -lumfpack
  X11 include flags:           /opt/local/include
  X11 libraries:               -L/opt/local/lib -lX11
  Z CPPFLAGS:                  
  Z LDFLAGS:                   
  Z libraries:                 -lz

  Default pager:               less
  gnuplot:                     gnuplot

  Do internal array bounds checking:  false
  Use octave_allocator:               false
  Build static libraries:             false
  Build shared libraries:             true
  Dynamic Linking:                    true (dlopen)
  Include support for GNU readline:   true
  64-bit array dims and indexing:     false


# And then make it all ...
make

# Gets us:
# "Octave successfully built.  Now choose from the following:"

# Then:
make check 

# and we get ...
# src/data.cc ............................................ PASS  797/798 
FAIL 1
# scripts/polynomial/roots.m ............................. PASS    9/10  
FAIL 1
# Summary:
#  PASS  10006
#  FAIL      2
#
# There were 2 expected failures (see fntests.log for details).
#
# Expected failures are known bugs.  Please help improve Octave
# by contributing fixes for them.
#
# There were 357 skipped tests (see fntests.log for details).
# Skipped tests are features that are disabled in this version of Octave
# because the needed libraries were not present when Octave was built.
#
# 243 (of 803) .m files have no tests.
#
# 38 (of 154) .cc files have no tests.

sudo make install


# I tried both back ends per Ben's hints, and they both seem to work:

graphics_toolkit gnuplot
figure(1)
graphics_toolkit fltk
figure(2)
surf (peaks)
figure(1)
surf (peaks)

# I also tried installing the miscellaneous package (because of recent
posts)

# Not too messy ...

octave:2> pkg install miscellaneous-1.0.11.tar
warning: creating installation directory /Users/cdunson/octave
waitbar.cc: In function ‘octave_value_list Fwaitbar(const
octave_value_list&, int)’:
waitbar.cc:126: warning: deprecated conversion from string constant to
‘char*’
waitbar.cc:147: warning: deprecated conversion from string constant to
‘char*’
waitbar.cc:148: warning: deprecated conversion from string constant to
‘char*’
csvconcat.cc: In function ‘octave_value_list Fcsvconcat(const
octave_value_list&, int)’:
csvconcat.cc:85: warning: comparison is always true due to limited range of
data type
warning: function
/Users/cdunson/octave/miscellaneous-1.0.11/x86_64-apple-darwin11.3.0-api-v48+/waitbar.oct
shadows a core library function
warning: function
/Users/cdunson/octave/miscellaneous-1.0.11/x86_64-apple-darwin11.3.0-api-v48+/waitbar.oct
shadows a core library function

What's next?

Thanks

Clark


--
View this message in context: 
http://octave.1599824.n4.nabble.com/Successful-build-of-Octave-3-6-1-on-OSX-Lion-sans-FINK-tp4473219p4473219.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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