Make: *** [install] error 127

Utilizzo di applicazioni in ambito professionale.
Scrivi risposta
madamada
Prode Principiante
Messaggi: 77
Iscrizione: sabato 9 maggio 2009, 0:04

Make: *** [install] error 127

Messaggio da madamada »

Sto installando un programma chiamato CNSsolve.
La procedura mi chiede di scompattare il pacchetto ed inserire la cartella in una apposita directory. nel mio caso la riverso in /home/danilo/Programmi. così il percorso completo è /home/danilo/Programmi/cns_solve_1.21.

All'interno trovo un file chiamato cns_solve_env che i produttori del programma mi chiedono di modificare. In particolare le istruzioni chiedono di modificare  con il nome del percorso di CNSsolve dopo " setenv CNS_SOLVE 'percorso di CNSsolve' "

Codice: Seleziona tutto

#!/bin/csh -f
#
# This file sets up the appropriate environmental variables and paths
# for CNSsolve. In the case of the same machines with different versions
# of the OS, backward compatibility is assumed - ie. a later version will
# be setup for a previous version of the OS if nothing else is available.
#
#   written by: Paul Adams
#
#   copyright Yale University
#
# ==========================================================================
#
# >>>>>> Important: define the location of the CNSsolve directory <<<<<<
#
# CHANGE THE NEXT LINE TO POINT TO THE LOCATION OF THE CNSsolve DIRECTORY

	    setenv CNS_SOLVE '/usr/home/danilo/Programmi/cns_solve_1.21'
	
#
# ==========================================================================
#
# full expansion of the CNS_SOLVE variable prior to use.
#
setenv CNS_SOLVE $CNS_SOLVE
#
# ==========================================================================
#
# set the number of threads for SGI multiprocessors
# if this causes a problem on other systems it can be commented out
#
setenv MP_SET_NUMTHREADS 1
#
# ==========================================================================
#
# get the machine architecture
#
if ( -d $CNS_SOLVE ) then
  if ( ! $?CNS_ARCH ) setenv CNS_ARCH `$CNS_SOLVE/bin/getarch`
else
  setenv CNS_ARCH 'unknown'
endif
#
# system variables (this is needed for openmp)
#
limit stacksize unlimited
# ==========================================================================
#
# general environmental variables
#
setenv CNS_LIB $CNS_SOLVE/libraries
setenv CNS_MODULE $CNS_SOLVE/modules
setenv CNS_TOPPAR $CNS_LIB/toppar
setenv CNS_CONFDB $CNS_LIB/confdb
setenv CNS_XTALLIB $CNS_LIB/xtal
setenv CNS_NMRLIB $CNS_LIB/nmr
setenv CNS_XRAYLIB $CNS_LIB/xray
setenv CNS_XTALMODULE $CNS_MODULE/xtal
setenv CNS_NMRMODULE $CNS_MODULE/nmr
setenv CNS_HELPLIB $CNS_SOLVE/helplib
#
# general user aliases
#
alias cns_web $CNS_SOLVE/bin/cns_web
alias cns_header $CNS_SOLVE/bin/cns_header
alias cns_info 'cat $CNS_SOLVE/bin/cns_info'
alias cns_transfer $CNS_SOLVE/bin/cns_transfer
if ( -x $CNS_SOLVE/bin/cns_edit_local ) then
  alias cns_edit $CNS_SOLVE/bin/cns_edit_local
else
  alias cns_edit $CNS_SOLVE/bin/cns_edit
endif
alias run_tutorial 'csh -f tutorial.csh'
#
# g77 compilation and use
#
alias g77on "setenv CNS_G77; source $CNS_SOLVE/cns_solve_env"
alias g77off "unsetenv CNS_G77; source $CNS_SOLVE/cns_solve_env"
#
# developer aliases
#
alias run_tests $CNS_SOLVE/bin/run_tests
alias run_diffs $CNS_SOLVE/bin/run_diffs
alias maketar $CNS_SOLVE/bin/maketar
alias create_patch $CNS_SOLVE/bin/create_patch
#
# ==========================================================================
#
# re-alias make on Linux (stops directory printing)
#
if ( $CNS_ARCH =~ *linux* ) then
  alias make 'make --no-print-directory'
endif
# 
# to do expansions - unset noglob just in case user has it otherwise
#
unset noglob
#
# try to set up appropriate path
#
# first strip off any trailing information (eg. _g77)
#
setenv CNS_ARCH `echo ${CNS_ARCH} | sed -e 's/_g77//g'`
#
set cns_vendor=`echo $CNS_ARCH | awk 'BEGIN{FS="-"}{print $1}'`
set cns_cpu=`echo $CNS_ARCH | awk 'BEGIN{FS="-"}{print $2}'`
set cns_os=`echo $CNS_ARCH | awk 'BEGIN{FS="-"}{print $3}'`
set cns_major=`echo $CNS_ARCH | awk 'BEGIN{FS="-"}{print $4}'`
set cns_minor=`echo $cns_major | sed -e 's/\./ /g'`
#
# if we are looking for a specific type of setup then limit search
#
if ( ! $?CNS_G77 ) then
  set cns_dirs=`/bin/ls -d $CNS_SOLVE/$cns_vendor-* | & awk '{if (($2 != "No") && ($3 != "No"))print}' | awk 'BEGIN{FS="/"}{print $NF}' | sort -t\- -n -r -k 3 -k 4`
else
  setenv CNS_ARCH ${CNS_ARCH}_g77
  set cns_dirs=`/bin/ls -d $CNS_SOLVE/$cns_vendor-*_g77 | & awk '{if (($2 != "No") && ($3 != "No"))print}' | awk 'BEGIN{FS="/"}{print $NF}' | sort -t\- -n -r -k 3 -k 4`
endif
#
# first look for an exact match (with os version)
#
set cns_found=0
if ( $#cns_dirs > 0 ) then
  foreach cns_dir ( $cns_dirs )  
    set cns_tmp_major=`echo $cns_dir | awk 'BEGIN{FS="-"}{print $4}'`
    if ( -d $CNS_SOLVE/$cns_dir/bin ) then
      if ( $cns_dir == ${cns_vendor}-${cns_cpu}-${cns_os}-${cns_major} || \
           $cns_dir == ${cns_vendor}-${cns_cpu}-${cns_os}-${cns_major}_g77 ) then
        set cns_archenv=$cns_dir
        set cns_found=1
      endif
    endif
  end
#
# now look for an exact match (without os version)
#
  if ( ! $cns_found ) then
    foreach cns_dir ( $cns_dirs )  
      if ( -d $CNS_SOLVE/$cns_dir/bin ) then
        if ( $cns_dir == ${cns_vendor}-${cns_cpu}-${cns_os} || \
             $cns_dir == ${cns_vendor}-${cns_cpu}-${cns_os}_g77 ) then
          set cns_archenv=$cns_dir
          set cns_found=1
        endif
      endif
    end
  endif
#
# now look for a backwards compatible match (with os version major/minor)
#
  if ( ! $cns_found ) then
    foreach cns_dir ( $cns_dirs )  
      if ( ! $cns_found ) then
        set cns_tmp_major=`echo $cns_dir | awk 'BEGIN{FS="-"}{print $4}' | sed 's/_g77//g'`
        if ( -d $CNS_SOLVE/$cns_dir/bin ) then
          if ( $cns_dir =~ ${cns_vendor}-${cns_cpu}-${cns_os}-* ) then
	    set osv_test=`echo $cns_major $cns_tmp_major | awk '{if ($1 > $2) print 1}'`
            if ( $osv_test ) then
              set cns_archenv=$cns_dir
	      set cns_found=1
            endif
          endif
        endif
      endif
    end
  endif
#
# now look for a wildcard match on cpu
#
  if ( ! $cns_found ) then
    set cpu_cpu=`echo $cns_cpu | sed 's/[0-9]*\.*[0-9]*$//'`
    set cpu_ver=`echo $cns_cpu | sed 's/[A-Za-z]*//'`
    foreach cns_dir ( $cns_dirs )  
      if ( ! $cns_found ) then
        set cns_tmp_cpu=`echo $cns_dir | awk 'BEGIN{FS="-"}{print $2}' | sed 's/[0-9]*\.*[0-9]*$//'`
        set cns_tmp_ver=`echo $cns_dir | awk 'BEGIN{FS="-"}{print $2}' | sed 's/[A-Za-z]*//'`
        if ( -d $CNS_SOLVE/$cns_dir/bin ) then
          if ( $cns_dir =~ ${cns_vendor}-${cpu_cpu}*-${cns_os}-${cns_major} || \
               $cns_dir =~ ${cns_vendor}-${cpu_cpu}*-${cns_os}-${cns_major}_g77 ) then
	    set cpu_test=`echo $cpu_ver $cns_tmp_ver | awk '{if ($1 > $2) print 1}'`
            if ( $cpu_test ) then
              set cns_archenv=$cns_dir
	      set cns_found=1
            endif
          endif
        endif
      endif
    end
  endif
endif
#
# if found set environment
#
if ( $cns_found ) then
  #
  # set installation and source directory
  #
  setenv CNS_INST $CNS_SOLVE/$cns_archenv
  setenv CNS_SOURCE $CNS_INST/source
  #
  # path for CNSsolve utility programs
  #
  if ( -d $CNS_SOLVE/$cns_archenv/utils ) then
    set path=(`$CNS_SOLVE/bin/modify_path $CNS_SOLVE/$cns_archenv/utils`)
  endif
  #
  # path for CNSsolve executable if installed
  #
  if ( -d $CNS_SOLVE/$cns_archenv/bin ) then
    set path=(`$CNS_SOLVE/bin/modify_path $CNS_SOLVE/$cns_archenv/bin`)
  endif
endif
#
unset cns_vendor cns_cpu cns_os cns_major cns_minor cns_tmp_major cns_tmp_minor
unset cns_dir cns_dirs cns_found cns_archenv cns_diff cns_count cns_same
unset cpu_cpu cpu_ver cns_tmp_cpu cns_tmp_ver cpu_test osv_test
#
eseguita la modifica come mostrato sopra eseguo il "make install" (come da istruzioni) ed ottengo

Codice: Seleziona tutto

make: /bin/csh: Command not found
make: *** [install] Error 127
cosa devo fare?
GRAZIE
Avatar utente
icetux
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 589
Iscrizione: domenica 18 febbraio 2007, 17:08

Re: Make: *** [install] error 127

Messaggio da icetux »

Non c'è un "usr" di troppo qua?

Codice: Seleziona tutto

setenv CNS_SOLVE '/usr/home/danilo/Programmi/cns_solve_1.21'
Don't think what you can do, think what you could do...
madamada
Prode Principiante
Messaggi: 77
Iscrizione: sabato 9 maggio 2009, 0:04

Re: Make: *** [install] error 127

Messaggio da madamada »

c'ho provato anche senza...il risultato è identico.
Avatar utente
Guiodic
Accecante Asceta
Accecante Asceta
Messaggi: 28474
Iscrizione: martedì 24 aprile 2007, 15:28
Località: Roma
Contatti:

Re: Make: *** [install] error 127

Messaggio da Guiodic »

bin/csh

Su Ubuntu non è installato csh. C shell è una shell utilizzata soprattutto nei sistemi bsd. Puoi comunque installarla da synaptic.
madamada
Prode Principiante
Messaggi: 77
Iscrizione: sabato 9 maggio 2009, 0:04

Re: Make: *** [install] error 127

Messaggio da madamada »

Fatto! installato csh, ma ora dopo make install sembrano esserci dei problemi sul compilatore fortran.

Codice: Seleziona tutto

danilo@danilo-laptop:~/Programmi/cns_solve_1.21$ make install
Installation directory: /home/danilo/Programmi/cns_solve_1.21/intel-i686-linux
copying files in instlib directory linux to intel-i686-linux
0read.me
Makefile.header.1.ifort
Makefile.header.2.gfortran
Makefile.header.3.pgf95
Makefile.header.4.ifort_mp
arch_env
machine_c.c
machine_f.f
Using Makefile template for compiler: gfortran
making source directory in intel-i686-linux
making bin directory in intel-i686-linux
making utils directory in intel-i686-linux
making test directory in intel-i686-linux
linking source files to intel-i686-linux/source
linking machine_f.f to source directory
linking machine_c.c to source directory
linking generic fft file to source directory
making Makefile in source directory
making compiler-test directory in intel-i686-linux
testing Fortran and C compilers
compiling: gcc -O -DCNS_ARCH_TYPE_LINUX 
C compiler passes test
compiling: gfortran -w -O3 -malign-double -funroll-loops -ffast-math  
linking: gfortran -w 
Segmentation fault
***** ERROR: problem with Fortran compiler *****
make[3]: *** [fortran-test] Error 2
make[2]: *** [compiler-test] Error 2
make[1]: *** [compiler-test] Error 2
compiler problems - stopping installation
please check compilers before retrying installation
make: *** [install] Error 1
Che fare?
Avatar utente
Guiodic
Accecante Asceta
Accecante Asceta
Messaggi: 28474
Iscrizione: martedì 24 aprile 2007, 15:28
Località: Roma
Contatti:

Re: Make: *** [install] error 127

Messaggio da Guiodic »

compiling: gfortran -w -O3 -malign-double -funroll-loops -ffast-math 
linking: gfortran -w
Segmentation fault

mmm... accidenti.
Ovviamente gfortran è installato, giusto?
madamada
Prode Principiante
Messaggi: 77
Iscrizione: sabato 9 maggio 2009, 0:04

Re: Make: *** [install] error 127

Messaggio da madamada »

Sembra di si. sul Synaptic compare sembra essere installata sia la versione gfortran 4:4.3.1-1ubuntu2 che la 4:4.2-1ubuntu12. potrebbe essere un problema l'averle entrambe?
madamada
Prode Principiante
Messaggi: 77
Iscrizione: sabato 9 maggio 2009, 0:04

Re: Make: *** [install] error 127

Messaggio da madamada »

Nessun aiuto! >:(
Avatar utente
Guiodic
Accecante Asceta
Accecante Asceta
Messaggi: 28474
Iscrizione: martedì 24 aprile 2007, 15:28
Località: Roma
Contatti:

Re: Make: *** [install] error 127

Messaggio da Guiodic »

da terminale dai semplicemente

gfortran

copia cosa esce.
madamada
Prode Principiante
Messaggi: 77
Iscrizione: sabato 9 maggio 2009, 0:04

Re: Make: *** [install] error 127

Messaggio da madamada »

ecco cosa ottengo:

Codice: Seleziona tutto

danilo@danilo-laptop:~$ gfortran
gfortran: no input files
Avatar utente
Guiodic
Accecante Asceta
Accecante Asceta
Messaggi: 28474
Iscrizione: martedì 24 aprile 2007, 15:28
Località: Roma
Contatti:

Re: Make: *** [install] error 127

Messaggio da Guiodic »

ok, ce l'hai.
Avatar utente
Devnull
Rampante Reduce
Rampante Reduce
Messaggi: 8158
Iscrizione: lunedì 21 novembre 2005, 15:56
Località: Ancona

Re: Make: *** [install] error 127

Messaggio da Devnull »

Sulwiki ufficiale,consigliano di ricompilare le librerie f2c.
Linux

    * Problems with the fort77 compiler are reported when compiling under RedHat Linux version 6.0 using the latest f2c RPM installation:

      testing Fortran and C compilers
      compiling: cc -O -ffast-math -DCNS_ARCH_TYPE_LINUX
      C compiler passes test
      compiling: fort77 -w -Nn2000 -O3 -malign-double -funroll-loops -ffast-math
        MAIN hello:
      linking: fort77
      ***** ERROR: problem with Fortran compiler *****
      make[3]: *** [fortran-test] Error 2
      make[2]: *** [compiler-test] Error 2
      make[1]: *** [compiler-test] Error 2
      compiler problems - stopping installation
      please check compilers before retrying installation
      make: *** [install] Error 1                             

      The f2c libraries need to be recompiled (otherwise any code linked with them will produce a segmentation fault when run). We suggest obtaining the latest version of f2c from NETLIB and compiling the libraries from scratch.
Da regolamento (Sez. I punto 15) è vietato inviare messaggi privati per richieste di supporto tecnico, si prega di aprire una discussione nella giusta sezione.
Hai domande sul forum? Leggi le FAQ e il Regolamento.
→ → → → Partecipa alla documentazione ← ← ← ←
madamada
Prode Principiante
Messaggi: 77
Iscrizione: sabato 9 maggio 2009, 0:04

Re: Make: *** [install] error 127

Messaggio da madamada »

Nessun cambiamento! In realtà non era installata la libreria f2C. L'ho installata e reinstallato gfortran...ma nulla.

Qualche altra idea?
Avatar utente
Devnull
Rampante Reduce
Rampante Reduce
Messaggi: 8158
Iscrizione: lunedì 21 novembre 2005, 15:56
Località: Ancona

Re: Make: *** [install] error 127

Messaggio da Devnull »

madamada ha scritto: Nessun cambiamento! In realtà non era installata la libreria f2C. L'ho installata e reinstallato gfortran...ma nulla.

Qualche altra idea?
La build-essential è installata?
Da regolamento (Sez. I punto 15) è vietato inviare messaggi privati per richieste di supporto tecnico, si prega di aprire una discussione nella giusta sezione.
Hai domande sul forum? Leggi le FAQ e il Regolamento.
→ → → → Partecipa alla documentazione ← ← ← ←
madamada
Prode Principiante
Messaggi: 77
Iscrizione: sabato 9 maggio 2009, 0:04

Re: Make: *** [install] error 127

Messaggio da madamada »

L'ho installata ora ma risultato identico.
Cosa tentare? :-\
Avatar utente
pierba
Tenace Tecnocrate
Tenace Tecnocrate
Messaggi: 14532
Iscrizione: sabato 26 febbraio 2005, 19:10

Re: Make: *** [install] error 127

Messaggio da pierba »

Immagino che questa pagina tu l'abbia vista.

Mi sembra un software un po' datato; proverei a ricompilare con una vecchia versione di gcc, tipo 3.4.

La installi e da terminale gli dici di usare quella versione:

Codice: Seleziona tutto

export CC=gcc-3.4
e riparti con la compilazione dall'inizio.

ciao
Pietro pagina personale - Avete domande sul forum? Leggendo le FAQ: potreste trovare la risposta.
La conoscenza deve essere collettiva, quindi, come da regolamento (Sez. II punto 15) i messaggi personali contententi richieste di assistenza tecnica verranno ignorati.
madamada
Prode Principiante
Messaggi: 77
Iscrizione: sabato 9 maggio 2009, 0:04

Re: Make: *** [install] error 127

Messaggio da madamada »

Stesso errore: Magari faccio un re-type dell'output così rinfresco un po' la memoria.

Codice: Seleziona tutto

danilo@danilo-laptop:~$ export CC=gcc-3.4
danilo@danilo-laptop:~$ cd Programmi/
danilo@danilo-laptop:~/Programmi$ cd cns
bash: cd: cns: Nessun file o directory
danilo@danilo-laptop:~/Programmi$ cd cns_solve_1.21/
danilo@danilo-laptop:~/Programmi/cns_solve_1.21$ make install
Installation directory: /home/danilo/Programmi/cns_solve_1.21/intel-i686-linux
copying files in instlib directory linux to intel-i686-linux
0read.me
Makefile.header.1.ifort
Makefile.header.2.gfortran
Makefile.header.3.pgf95
Makefile.header.4.ifort_mp
arch_env
machine_c.c
machine_f.f
Using Makefile template for compiler: gfortran
removing old source files
linking source files to intel-i686-linux/source
linking machine_f.f to source directory
linking machine_c.c to source directory
linking generic fft file to source directory
making Makefile in source directory
testing Fortran and C compilers
compiling: gcc -O -DCNS_ARCH_TYPE_LINUX 
C compiler passes test
compiling: gfortran -w -O3 -malign-double -funroll-loops -ffast-math  
linking: gfortran -w 
Segmentation fault
***** ERROR: problem with Fortran compiler *****
make[3]: *** [fortran-test] Error 2
make[2]: *** [compiler-test] Error 2
make[1]: *** [compiler-test] Error 2
compiler problems - stopping installation
please check compilers before retrying installation
make: *** [install] Error 1
Altro?
Avatar utente
pierba
Tenace Tecnocrate
Tenace Tecnocrate
Messaggi: 14532
Iscrizione: sabato 26 febbraio 2005, 19:10

Re: Make: *** [install] error 127

Messaggio da pierba »

madamada ha scritto:

Codice: Seleziona tutto

danilo@danilo-laptop:~/Programmi/cns_solve_1.21$ make install
Forse non hai i permessi, a quanto mi  sembra cerchi di installare da utente normale.
In questo caso non riesce ad accedere alle cartelle di sistema.

Prova con

Codice: Seleziona tutto

sudo make install
ciao
Pietro pagina personale - Avete domande sul forum? Leggendo le FAQ: potreste trovare la risposta.
La conoscenza deve essere collettiva, quindi, come da regolamento (Sez. II punto 15) i messaggi personali contententi richieste di assistenza tecnica verranno ignorati.
madamada
Prode Principiante
Messaggi: 77
Iscrizione: sabato 9 maggio 2009, 0:04

Re: Make: *** [install] error 127

Messaggio da madamada »

la situazione non muta!
Scrivi risposta

Ritorna a “Applicazioni professionali”

Chi c’è in linea

Visualizzano questa sezione: 0 utenti iscritti e 3 ospiti