Jeyaram
Jeyaram

Reputation: 9504

gcc : directory : No such file or directory

I am trying to build the mali driver for linux 3.7 kernel from Here.

There is a separate build script like,

#!/bin/bash
export KDIR=/path/to/kernel/dir/
..
..
gcc -v//Just for testing purpose printing gcc version
make
gcc -v
... 

Actual host machine has 2.6 kernel, but im instructing make to use linux 3.7 kernel. The above make will call the Makefile of mali driver's makefile.

For the above script, gcc version prints properly before and after make command, but when make entered in to kernel directory, gcc is not recognized.

it saying gcc : directory : No such file or directory.

same happens to arm-gcc too. Any Guess??

Edit:(make output)

make ARCH=arm -C /home/work/linux3.7/ M=/home/work/mali/driver/src/devicedrv/mali modules

make[1] : Entering directory `/home/work/linux3.7/`
gcc : directory : No such file or directory
gcc : directory" : No such file or directory 
<command-line>: warning: missing terminating " character
gcc : directory : No such file or directory
gcc : directory" : No such file or directory 
<command-line>: warning: missing terminating " character
gcc : directory : No such file or directory
gcc : directory" : No such file or directory 
<command-line>: warning: missing terminating " character
gcc : directory : No such file or directory
gcc : directory" : No such file or directory 
<command-line>: warning: missing terminating " character
CC [M]  /home/work/mali/driver/src/devicedrv/mali/common/mali_kernel_core.o
.arm-none-linux-gnueabi-gcc: directory:No such file or directory 
.arm-none-linux-gnueabi-gcc: directory":No such file or directory

make[2] : Leaving directory `/home/work/linux3.7/`

Upvotes: 2

Views: 11567

Answers (3)

user3285745
user3285745

Reputation: 56

The problem is in drivers/gpu/vithar/ump/src/devicedrv/Makefile.common. It assumes that the vithar SDK has been pulled from SVN and has a valid SVN revision (it doesn't).

You have 2 options: 1) Edit the file above to skip invocation of svnversion:

- SVN_REV:=$(shell ((svnversion | grep -qv exported && echo -n 'Revision: ' && svnversion) || git svn info | sed -e 's/$$$$/M/' | grep '^Revision: ' || echo ${MALI_RELEASE_NAME}) 2>/dev$
+ SVN_REV=0

2) Add to make command line:

SVN_REV=0

Upvotes: 4

You made a typo; you want

  echo $(gcc -v)

but actually, for that coding

  gcc -v

is enough.

You should be sure that gcc is correctly installed in your $PATH. Check with which gcc

addenda

If you suspect your Makefile is wrong, use remake to debug it. Often, just running remake -x in a terminal could be enough to understand what is happening.

Perhaps you are passing some weird argument to gcc ? Or some wrong #include?

Upvotes: 0

LSerni
LSerni

Reputation: 57453

gcc is recognized, found, and executed. The error "gcc: directory: no such file or directory" is given by gcc itself.

For some reason, gcc is trying to access "directory" (i.e., an object called "directory"), which does not exist.

Maybe a wrong expansion or an unexpected environment variable.

Try checking the appropriate Makefile and your make command.

For example, if you issued a command such as

KDIR="/usr/Linux Kernel directory" CONFIG=pb-virtex5 BUILD=release make

there is a risk that the system misinterpret KDIR, introducing two nonexistent objects "Kernel" and "directory" as well as an extra quotation mark. Such a possibility might explain the symptoms you observe. So, extra spaces in paths are definitely something worth checking.

Upvotes: 3

Related Questions