Sto cercando di crearmi un pacchetto precompilato di R-2.4.0 tramite SlackBuild.
Una volta installato il pacchetto e lanciato il programma mi restituisce un errore che mi fa capire che c'è un qualche path sballato che non ho dato correttamente allo SlackBuild o qualcosa che non quadra nel ./configure.
L'errore si verifica lanciando R:
Codice: Seleziona tutto
/usr/bin/R: line 164: /tmp/package-R/usr/lib/R/etc/ldpaths: No such file or directory
Per avere un'idea delle opzioni passabili al configure (e quelle predefinite):
Codice: Seleziona tutto
./configure --help
`configure' configures R 2.4.0 to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data [PREFIX/share]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--infodir=DIR info documentation [PREFIX/info]
--mandir=DIR man documentation [PREFIX/man]
R installation directories:
--libdir=DIR R files to R_HOME=DIR/R [EPREFIX/$LIBnn]
rdocdir=DIR R doc files to DIR [R_HOME/doc]
rincludedir=DIR R include files to DIR [R_HOME/include]
rsharedir=DIR R share files to DIR [R_HOME/share]
X features:
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-R-profiling attempt to compile support for Rprof() [yes]
--enable-memory-profiling
attempt to compile support for Rmemprof(),
tracemem() [yes]
--enable-R-framework[=DIR]
MacOS X only: build R framework (if possible), and
specify its installation prefix [yes,
/Library/Frameworks]
--enable-R-shlib build the shared/dynamic library 'libR' [no]
--enable-BLAS-shlib build BLAS into a shared library [perhaps]
--enable-maintainer-mode
enable make rules and dependencies not useful (and
maybe confusing) to the casual installer [no]
--enable-strict-barrier provoke compile error on write barrier violation
[no]
--enable-mbcs enable support for UTF-8 and other MBCS locales
[yes]
--enable-static[=PKGS]
libtool: build static libraries [default=no]
--enable-shared[=PKGS]
libtool: build shared libraries [default=yes]
--enable-fast-install[=PKGS]
libtool: optimize for fast installation
[default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-largefile omit support for large files
--disable-nls do not use Native Language Support
--disable-rpath do not hardcode runtime library paths
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-blas use BLAS library, or specify it [no]
--with-lapack use LAPACK library, or specify it [no]
--with-readline use readline library (if available) [yes]
--with-aqua MacOS X only: use Aqua (if available) [yes]
--with-tcltk use Tcl/Tk, or specify its library dir [yes]
--with-tcl-config=TCL_CONFIG
specify location of tclConfig.sh []
--with-tk-config=TK_CONFIG
specify location of tkConfig.sh []
--with-libpng use libpng library (if available) [yes]
--with-jpeglib use jpeglib library (if available) [yes]
--with-system-zlib use system zlib library (if available) [no]
--with-system-bzlib use system bzlib library (if available) [no]
--with-system-pcre use system PCRE library (if available) [no]
--with-valgrind-instrumentation
Level of additional instrumentation for Valgrind
(0/1/2) [0]
--with-recommended-packages
use/install recommended R packages (if available)
[yes]
--with-gnu-ld libtool: assume the C compiler uses GNU ld
[default=no]
--with-pic libtool: try to use only PIC/non-PIC objects
[default=use both]
--with-tags[=TAGS]
libtool: include additional configurations
[automatic]
--with-x use the X Window System
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
--without-libiconv-prefix don't search for libiconv in includedir and libdir
--with-included-gettext use the GNU gettext library included here
--with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
--without-libintl-prefix don't search for libintl in includedir and libdir
Some influential environment variables:
R_PRINTCMD command used to spool PostScript files to the printer
R_PAPERSIZE paper size for the local (PostScript) printer
R_BATCHSAVE set default behavior of R when ending a session
MAIN_CFLAGS additional CFLAGS used when compiling the main binary
SHLIB_CFLAGS
additional CFLAGS used when building shared libraries
MAIN_FFLAGS additional FFLAGS used when compiling the main binary
SHLIB_FFLAGS
additional FFLAGS used when building shared libraries
MAIN_LD command used to link the main binary
MAIN_LDFLAGS
flags which are necessary for loading a main program which will
load shared library modules (DLLs) at runtime
CPICFLAGS special flags for compiling C code to be turned into a shared
library.
FPICFLAGS special flags for compiling Fortran code to be turned into a
shared library.
FCPICFLAGS special flags for compiling Fortran 95 code to be turned into a
shared library.
SHLIB_LD command for linking shared libraries which contain object files
from a C or Fortran compiler only
SHLIB_LDFLAGS
special flags used by SHLIB_LD
DYLIB_LD command for linking dynamic libraries which contain object files
from a C or Fortran compiler only
DYLIB_LDFLAGS
special flags used for make a dynamic library
CXXPICFLAGS special flags for compiling C++ code to be turned into a shared
library
SHLIB_CXXLD command for linking shared libraries which contain object files
from a C++ compiler
SHLIB_CXXLDFLAGS
special flags used by SHLIB_CXXLD
SHLIB_FCD command for linking shared libraries which contain object files
from the Fortran 95 compiler
SHLIB_FCLDFLAGS
special flags used by SHLIB_FCLD
TCLTK_LIBS flags needed for linking against the Tcl and Tk libraries
TCLTK_CPPFLAGS
flags needed for finding the tcl.h and tk.h headers
MAKE Make command
R_BROWSER default browser
BLAS_LIBS flags needed for linking against external BLAS libraries
LAPACK_LIBS flags needed for linking against external LAPACK libraries
LIBnn 'lib' or 'lib64' for dynamic libraries
SAFE_FFLAGS Safe Fortran 77 compiler flags for e.g. dlamc.f
r_arch Use architecture-dependent subdirs with this name
DEFS C defines for use when compiling R
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
headers in a nonstandard directory <include dir>
CPP C preprocessor
F77 Fortran 77 compiler command
FFLAGS Fortran 77 compiler flags
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CXXCPP C++ preprocessor
FC Fortran compiler command
FCFLAGS Fortran compiler flags
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Codice: Seleziona tutto
#!/bin/sh
CWD=`pwd`
if [ "$TMP" = "" ]; then
TMP=/tmp
fi
PKG=$TMP/package-R
NAME=R
VERSION=2.4.0
ARCH=i486
BUILD=2gb
if [ ! -d $TMP ]; then
mkdir -p $TMP
fi
if [ ! -d $PKG ]; then
mkdir -p $PKG
fi
echo "+===================================+"
echo "| Start Slackbuild $NAME-$VERSION |"
echo "+===================================+"
cd $TMP
tar zxvf $CWD/$NAME-$VERSION.tar.gz
cd $NAME-$VERSION
chown -R root:root .
find . -perm 777 -exec chmod 755 {} \;
CFLAGS="-O2 -march=i486 -mtune=i686" ./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var
make
make info
make prefix=$PKG/usr install
make check
make install prefix=$TMP/usr
make install-info
mkdir -p $PKG/usr/doc/$NAME-$VERSION
cp -a \
COPYING ChangeLog INSTALL NEWS ONEWS OONEWS README SVN-REVISION VERSION \
$PKG/usr/doc/$NAME-$VERSION
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . -type f -name "*.a" | xargs file | grep archive | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
gzip -9 $PKG/usr/man/*/*
gzip -9 $PKG/usr/info/*
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
makepkg -l y -c n $TMP/$NAME-$VERSION-$ARCH-$BUILD.tgz
if [ "$1" = "--cleanup" ]; then
rm -rf \$TMP/\$NAME-\$VERSION
rm -rf \$PKG
fi

