Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to build Moses, but when I run make I get the following output:

minakshi@minakshi-Vostro-3500:~/Desktop/working-dir/moses/scripts$ make release
# Compile the parts
make all
make[1]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts'
# Building memscore may fail e.g. if boost is not available.
# We ignore this because traditional scoring will still work and memscore isn't used by default.
cd training/memscore ; \
      ./configure && make \
      || ( echo "WARNING: Building memscore failed."; \
           echo 'training/memscore/memscore' >> ../../release-exclude )
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for boostlib >= 1.31.0... yes
checking for cos in -lm... yes
checking for gzopen in -lz... yes
checking for cblas_dgemm in -lgslcblas... no
checking for gsl_blas_dgemm in -lgsl... no
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking n_gram.h usability... no
checking n_gram.h presence... no
checking for n_gram.h... no
checking for size_t... yes
checking for ptrdiff_t... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'
make  all-am
make[3]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'
make[3]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'
touch release-exclude # No files excluded by default
pwd=`pwd`; \
    for subdir in cmert-0.5 phrase-extract symal mbr lexical-reordering; do \
      make -C training/$subdir || exit 1; \
      echo "### Compiler $subdir"; \
      cd $pwd; \
    done
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/cmert-0.5'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/cmert-0.5'
### Compiler cmert-0.5
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/phrase-extract'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/phrase-extract'
### Compiler phrase-extract
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/symal'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/symal'
### Compiler symal
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/mbr'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/mbr'
### Compiler mbr
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/lexical-reordering'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/lexical-reordering'
### Compiler lexical-reordering
## All files that need compilation were compiled
make[1]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts'
/bin/sh: ./check-dependencies.pl: Permission denied
make: *** [release] Error 126
minakshi@minakshi-Vostro-3500:~/Desktop/working-dir/moses/scripts$ make release
# Compile the parts
make all
make[1]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts'
# Building memscore may fail e.g. if boost is not available.
# We ignore this because traditional scoring will still work and memscore isn't used by default.
cd training/memscore ; \
      ./configure && make \
      || ( echo "WARNING: Building memscore failed."; \
           echo 'training/memscore/memscore' >> ../../release-exclude )
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for boostlib >= 1.31.0... yes
checking for cos in -lm... yes
checking for gzopen in -lz... yes
checking for cblas_dgemm in -lgslcblas... no
checking for gsl_blas_dgemm in -lgsl... no
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking n_gram.h usability... no
checking n_gram.h presence... no
checking for n_gram.h... no
checking for size_t... yes
checking for ptrdiff_t... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'
make  all-am
make[3]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'
make[3]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'
touch release-exclude # No files excluded by default
pwd=`pwd`; \
    for subdir in cmert-0.5 phrase-extract symal mbr lexical-reordering; do \
      make -C training/$subdir || exit 1; \
      echo "### Compiler $subdir"; \
      cd $pwd; \
    done
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/cmert-0.5'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/cmert-0.5'
### Compiler cmert-0.5
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/phrase-extract'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/phrase-extract'
### Compiler phrase-extract
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/symal'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/symal'
### Compiler symal
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/mbr'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/mbr'
### Compiler mbr
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/lexical-reordering'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/lexical-reordering'
### Compiler lexical-reordering
## All files that need compilation were compiled
make[1]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts'
/bin/sh: ./check-dependencies.pl: not found
make: *** [release] Error 127

The error message says ./check-dependencies.pl is "not found", but I see the file present in the scripts folder. So why does this error occur?

share|improve this question
2  
./check-dependencies.pl is a relative path - maybe make is in another directory when trying to access it? It says it's leaving the scripts dir just before, in case the script is located there. –  Herman Torjussen Oct 28 '12 at 12:11
    
Your question has been downvoted and closed because you didn't provide much information, in particular you didn't say what program you're trying to compile or on what system. I voted to close too, though on second thoughts I think I shouldn't have (and I voted to reopen), because I suspect that I've guessed what's going wrong. Really, you should provide more information. (Copy-pasting the whole transcript from the make session was good though.) –  Gilles Oct 29 '12 at 0:41
    
If this is not a private project, you can make a tar ball and let us see the problem –  warl0ck Oct 29 '12 at 1:01

1 Answer 1

The most likely reason for this error is that check-dependencies.pl is not in the directory where the makefile looks for it. However, if the file check-dependencies.pl does exist in /home/minakshi/Desktop/working-dir/moses/scripts, then there's another possibility: maybe its loader doesn't exist.

When the kernel is told to execute a program, it executes the loader program and passes it the executable to load. If the loader is not found, the kernel can only report “not found”, it doesn't have a way to distinguish “directly requested file not found” from “loader not found”. Sometimes the executing shell will make a second check to display a more explicit error message, but sometimes you end up with a strange-looking message that tells you that a script or dynamically-linked executable is not found or not executable, when in fact the file does exist and is executable but the error applies to its loader.

With a .pl extension, check-dependencies.pl is presumably a Perl script. It probably starts with a line like #!/usr/local/bin/perl, which doesn't give the path to the perl interpreter on your system. Edit the script and fix the first line; you'll probably have to replace #!/usr/local/bin/perl by #!/usr/bin/perl or vice versa.

Perl is usually located in /usr/bin on Linux, but in /usr/local/bin on many other unices. There's a way to write the shebang line without knowing the path to the interpreter in advance: #!/usr/bin/env perl. The shebang line requires an absolute path; here the interpreter is env which looks up perl in the $PATH. However this only works if there are no arguments to pass to the interpreter: many systems, including Linux, accept a single argument on the command line, so e.g. #!/usr/bin/perl -T works, and #!/usr/bin/env perl works, but #!/usr/bin/env perl -T fails because it tries to execute a program called perl -T.

share|improve this answer
    
+1 for remark on passing options to shebangs. –  Herman Torjussen Oct 29 '12 at 11:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.