Apartamento En Familia

Apartamento En Familia
Apartamento de playa para vacaciones. http://www.apartamentoenfamilia.es. Número registro HUTT-005768

sábado, 3 de abril de 2010

Instalar Octave 3.2.4 en Ubuntu 9.10 desde las fuentes

Si queremos instalar Octave 3.2.4 desde las fuentes deberemos descargar el archivo tar del sitio oficial  o bien de mi repositorio y luego compilar estas fuentes.

En principio, la instalación no tiene porqué dar ningún problema, pero si que puede ser que no tengamos las librerias necesarias para compilar las fuentes satisfactoriamente. En este tutorial se va a intentar solventar algunos problemas que nos podemos encontrar si deseamos instalar octave desde el código fuente:

Una vez descargado el código y descomprimido procederemos a hacer el ya conocido ./configure :



configure: WARNING: I couldn't find -ltermcap, -lterminfo, -lncurses, -lcurses, or -ltermlib!
checking for rl_set_keyboard_input_timeout in -lreadline... no
configure: WARNING: I need GNU Readline 4.2 or later
configure: error: this is fatal unless you specify --disable-readline
Asi que instalamos este paquete:
apt-get install octave3.2-headers
De acuerdo, ahora nos lo configura, si bien pueden salir aun ADVERTENCIAS como estas:
configure: WARNING: I didn't find gperf, but it's only a problem if you need to reconstruct oct-gperf.h
configure: WARNING: I didn't find flex, but it's only a problem if you need to reconstruct lex.cc
configure: WARNING: I didn't find bison, but it's only a problem if you need to reconstruct parse.cc
configure: WARNING: UMFPACK not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: qrupdate not found. The QR & Cholesky updating functions will be slow.
configure: WARNING: AMD not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: COLAMD not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: CCOLAMD not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: CHOLMOD not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: CXSparse not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: arpack not found. This will result in a lack of the eigs function.
configure: WARNING: GLPK library not found. The glpk function for solving linear programs will be disabled.
configure: WARNING: GraphicsMagick++ config script not found. Assuming GraphicsMagic++ library and header files are missing, so imread will not be fully functional
configure: WARNING: PCRE library not found. This will result in some loss of functionality for the regular expression matching functions.
configure: WARNING: Qhull library not found --- This will result in loss of functionality of some geometry functions.
configure: WARNING: "FLTK config script not found. Native graphics will be disabled."
configure: WARNING:
configure: WARNING: I didn't find the necessary libraries to compile native
configure: WARNING: graphics. It isn't necessary to have native graphics
configure: WARNING: but you will have to use gnuplot or you won't be able
configure: WARNING: to use any of Octave's plotting commands
configure: WARNING:
configure:
Si estamos de acuerdo con estas advertencias (sino tenemos que  instalar lo que nos dice), podemos empezar a compilar, pero antes  deberemos instalar otro paquete si queremos evitar estos problemas: 
display.cc:34:22: error: X11/Xlib.h: No existe el fichero ó directorio
display.cc: In member function ‘void display_info::init(bool)’:
display.cc:98: error: ‘Display’ was not declared in this scope
display.cc:98: error: ‘display’ was not declared in this scope
display.cc:98: error: ‘XOpenDisplay’ was not declared in this scope
display.cc:102: error: ‘Screen’ was not declared in this scope
display.cc:102: error: ‘screen’ was not declared in this scope
display.cc:102: error: ‘DefaultScreenOfDisplay’ was not declared in this scope
display.cc:106: error: ‘DefaultDepthOfScreen’ was not declared in this scope
display.cc:108: error: ‘HeightOfScreen’ was not declared in this scope
display.cc:109: error: ‘WidthOfScreen’ was not declared in this scope
display.cc:111: error: ‘XScreenNumberOfScreen’ was not declared in this scope
display.cc:113: error: ‘DisplayHeightMM’ was not declared in this scope
display.cc:114: error: ‘DisplayWidthMM’ was not declared in this scope
make[2]: *** [pic/display.o] Error 1
make[2]: se sale del directorio `/home/ediaz/Escritorio/octave-3.2.4/src'
make[1]: *** [src] Error 2
make[1]: se sale del directorio `/home/ediaz/Escritorio/octave-3.2.4'
make: *** [all] Error 2
Asi que instalamos :
sudo apt-get install libx11-dev
sudo apt-get install libgraphicsmagick++1-dev
sudo apt-get install ftgl-dev
sudo apt-get install libfltk1.1-dev
O en una sola línea:
sudo apt-get install libx11-dev libgraphicsmagick++1-dev ftgl-dev libfltk1.1-dev

También recordemos que podemos instalar la aplicación especificandole un directorio destino mediante ./configure --prefix=$HOME/octave-3.2.4 (por ejemplo). Y ahora si que compilamos: 
make clean
make
make check
make install

That u don't know what you've got 'til it's gone