|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Nov 2002
Messaggi: 6636
|
[C] Cambio directory in makefile
Ciao a tutti,
devo installare un programma che fa uso di Python. Ora, in questo sistema, Python non è installato nella directory di default, ma da un'altra parte. Avendo in mano il configure file, come faccio a cambiare la directory in cui cercare Python e tutti i suoi moduli? Infatti se lo lancio così a dritto non trova delle cose. SU questo sistema infatti, non sono root, quindi sto cercando di usare una versione di Python installata nella mia cartella locale. E più in generale, se un qualsiasi programma richiesto non è nella directory di default, come si fa a cambiarle nel configure file? Non sempre c'è il flag apposito. Grazie. Ultima modifica di Unrue : 15-06-2008 alle 15:31. |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Jun 2002
Città: Dublin
Messaggi: 5989
|
Prova ad aggiungere la cartella in cui risiede Python alla tua variabile d'ambiente PATH. Se usi BASH, fai in modo simile:
Codice:
export PATH=$PATH:/home/unrue/bin/python P.S.: questo dalla shell, fuori dal Makefile.
__________________
C'ho certi cazzi Mafa' che manco tu che sei pratica li hai visti mai! |
|
|
|
|
|
#3 | |
|
Senior Member
Iscritto dal: Nov 2002
Messaggi: 6636
|
Quote:
Trallaltro, lui cerca un path con librerie a 64 bit di Python, che non ci sono. Ho installato tutto il pacchetto, ma non le vedo: Codice:
checking for python script directory... ${prefix}/lib/python2.4/site-packages
checking for python extension module directory... ${exec_prefix}/lib64/python2.4/site-packages
Trallaltro, la versione locale che ho installato è la 2.5, ma lui continua a vedermi quella globale. Ultima modifica di Unrue : 15-06-2008 alle 19:44. |
|
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: Jun 2002
Città: Dublin
Messaggi: 5989
|
Ohibò.... allora, probabilmente le librerie per le architetture a 64 bit che cerca sono solo estensioni, quindi forse è ok anche se non le hai. Per il resto, magari il Makefile se ne infischia del PATH o delle variabili globali, prova a dargliele forzare usando make VARIABILE=valore <target>.
Se hai un configure, forse ti conviene dare un ./configure --help per scoprire se ti fa personalizzare le posizioni dei singoli programmi. Dovesse andar male, dai un ./configure --prefix=~/bin (ammesso che la cartella in cui hai installato la struttura di delle cartelle di Python sia nella tua home e si chiami bin), che ti installerà tutto nella home, ma se non altro dovrebbe funzionare. Fammi sapere se non va.
__________________
C'ho certi cazzi Mafa' che manco tu che sei pratica li hai visti mai! |
|
|
|
|
|
#5 | ||
|
Senior Member
Iscritto dal: Nov 2002
Messaggi: 6636
|
Quote:
Quote:
Ultima modifica di Unrue : 15-06-2008 alle 20:52. |
||
|
|
|
|
|
#6 | |
|
Senior Member
Iscritto dal: Jun 2002
Città: Dublin
Messaggi: 5989
|
Quote:
![]() Allora, se puoi passami l'output di ./configure --help, magari lancia configure in modo simile a come ti avevo detto per make prima: Codice:
./configure PATH=$PATH:~/bin ciao
__________________
C'ho certi cazzi Mafa' che manco tu che sei pratica li hai visti mai! |
|
|
|
|
|
|
#7 |
|
Senior Member
Iscritto dal: Nov 2002
Messaggi: 6636
|
Ecco l'output di configure --help, con evidenziato il nome del programma:
Codice:
`configure' configures hephaestus 1.0.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]
Program names:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
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]
--disable-mpi-compilers do not use MPI compilers (default is to use MPI
compilers)
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-shared[=PKGS]
build shared libraries [default=no]
--enable-static[=PKGS]
build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--with-docs build documentation
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-mpi specify absolute MPI location,
--with-mpi=/directory/, MPI is required
--with-hdf5 specify absolute HDF5 location,
--with-hdf5=/directory/
--with-hdf5_hl specify absolute HDF5 high level API location,
--with-hdf5_hl=/directory/
--with-grass specify GRASS distribution directory,
--with-grass=/directory/
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-tags[=TAGS]
include additional configurations [automatic]
Some influential environment variables:
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>
CXX C++ compiler command
CXXFLAGS C++ compiler flags
F77 Fortran 77 compiler command
FFLAGS Fortran 77 compiler flags
CPP C preprocessor
CXXCPP C++ preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Questo è l'errore che mi segnala: Codice:
checking for a Python interpreter with version >= 1.5... python
checking for python... /usr/bin/python
checking for python version... 2.4
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.4/site-packages
checking for python extension module directory... ${exec_prefix}/lib64/python2.4/site-packages
Traceback (most recent call last):
File "<string>", line 1, in ?
ImportError: No module named Tkinter
configure: error: Unable to continue: Python module Tkinter is required
See `config.log' for more details.
Come ultima spiaggia lasciamo quel comando che mi hai postato. Vorrei prima capire perché configure mi ignora Ultima modifica di Unrue : 15-06-2008 alle 21:10. |
|
|
|
|
|
#8 |
|
Senior Member
Iscritto dal: Nov 2002
Messaggi: 6636
|
Allora, almeno ho risolto il problema dei path. Il path che voglio, va messo prima di quello globale nelal variabile d'ambiente, in quanto lui, al primo percorso in cui trova Python, usa poi sempre quello
Adesso i percorsi sono corretti. Continua però a segnalarmi: Codice:
import _tkinter # If this fails your Python may not be configured for Tk ImportError: No module named _tkinter configure: error: Unable to continue: Python module Tkinter is required See `config.log' for more details. |
|
|
|
|
|
#9 | |
|
Senior Member
Iscritto dal: Jun 2002
Città: Dublin
Messaggi: 5989
|
Quote:
__________________
C'ho certi cazzi Mafa' che manco tu che sei pratica li hai visti mai! |
|
|
|
|
|
|
#10 |
|
Senior Member
Iscritto dal: Nov 2002
Messaggi: 6636
|
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 22:27.





















