PDA

View Full Version : Flex - Analizzatore sintattico


macrig
05-12-2007, 16:04
Ciao a tutti,
è la prima volta che cerco di compilare un programma per mac os leopard. Il programma in questione si chiama Flex, analizzatore sintattico. Seguo la guida per compilare, il software è compatibile con tutti i sistemi posix, e faccio in sequenza i seguenti comandi:
./configure
make
make check
make install
a questo punto il messaggio è il seguente
make install-recursive
Making install in .
/bin/sh ./mkinstalldirs /usr/local/bin
/usr/bin/install -c flex /usr/local/bin/flex
install: /usr/local/bin/flex: Permission denied
make[3]: *** [install-binPROGRAMS] Error 1
make[2]: *** [install-am] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2
ho provato anche a fare sudo -s make install e il risutlato è questo:
/usr/bin/make: /usr/bin/make: cannot execute binary file

Potete aiutarmi a capire quale sia il problema e a risolverla.
Grazie di tutto

Giuseppe

Criceto
05-12-2007, 18:57
Hai installato i developer's tools opzionali?

manowar84
05-12-2007, 19:38
ci sta scritto:

install: /usr/local/bin/flex: Permission denied


permesso negato, non hai i permessi. Ti sei scordato il sudo ;)

Di solito basta dare una occhiata all'errore ;)

macrig
05-12-2007, 21:40
Si, l'ho usato il sudo, infatti l'ho scritto pure nel primo messaggio
I developer tools sono installati

manowar84
05-12-2007, 21:50
Si, l'ho usato il sudo, infatti l'ho scritto pure nel primo messaggio
I developer tools sono installati

ops scusami, non ci ho fatto caso pensavo fosse tutto log :p

io lo uso senza -s il sudo cmq dovrebbe essere lo stesso da quanto leggo nel man. La sintassi è giusta, forse non serve il make install se lo script prevede da solo il make install, mi è successo rare volte. Un readme c'è? nel caso che dice? :)

macrig
05-12-2007, 21:59
Questo è quanto riportato nel file INSTALL:

1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.

Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.

2. Type `make' to compile the package.

Ho provato a fare sudo senza l'opzione s, questo è il risultato:
Making install in m4
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.

e termina il processo sembra in modo positivo, ma non so cosa voglia dire questo messaggio.

3. Optionally, type `make check' to run any self-tests that come with
the package.

4. Type `make install' to install the programs and any data files and
documentation.

5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.

Cisto
05-12-2007, 23:09
Flex è presente su MacPorts (in devel ed UB: http://trac.macports.org/projects/macports/browser/trunk/dports/devel/flex/Portfile); tanto vale installarlo in questo modo ;)

macrig
07-12-2007, 00:12
Grazie a tutti ci sono riuscito, bastava togliere dal comando sudo l'opzione -s