"no rule to make target <whatever> what does this mean?
Can anyone describe what this MEANS, not just how to fix specific problems?

I receive this error periodically while doing nothing more that running and editing the sample SDK code files.

E.g right now I am playing with simpleGL, and, although "make" works fine, "make emu=1" gets the error

*** No rule to make target `obj/emurelease/simpleGL_kernel.cu.o', needed by `../../bin/linux/emurelease/simpleGL'.

THANKS
Can anyone describe what this MEANS, not just how to fix specific problems?



I receive this error periodically while doing nothing more that running and editing the sample SDK code files.



E.g right now I am playing with simpleGL, and, although "make" works fine, "make emu=1" gets the error



*** No rule to make target `obj/emurelease/simpleGL_kernel.cu.o', needed by `../../bin/linux/emurelease/simpleGL'.



THANKS

#1
Posted 09/21/2009 06:12 PM   
You haven't provided any expected result, which makes it more difficult to assist you.

Building the binary ../../bin/linux/emurelease/simpleGL needs the object code that is supposed to be stored in bj/emurelease/simpleGL_kernel.cu.o.
What you are doing causes make to fail to understand how to construct the .cu.o object, and thus the entire compile fails.

I'm not autotools expert in anyway, but I wouldn't expect "emu=1" to work, as I've never seen that syntax. What do you want to happen?
You haven't provided any expected result, which makes it more difficult to assist you.



Building the binary ../../bin/linux/emurelease/simpleGL needs the object code that is supposed to be stored in bj/emurelease/simpleGL_kernel.cu.o.

What you are doing causes make to fail to understand how to construct the .cu.o object, and thus the entire compile fails.



I'm not autotools expert in anyway, but I wouldn't expect "emu=1" to work, as I've never seen that syntax. What do you want to happen?

#2
Posted 09/21/2009 06:41 PM   
[quote name='Letharion' post='590479' date='Sep 21 2009, 09:41 PM']I'm not autotools expert in anyway, but I wouldn't expect "emu=1" to work, as I've never seen that syntax. What do you want to happen?[/quote]

It isn't autotools syntax,it is just plain GNU make, and that syntax just sets the variable emu to 1 inside the make run, which is very useful for conditional compilation. So you could have something like this in a makefile

[code]ifdef emu
NVCCFLAGS := -g -I$(INCDIR) --compiler-options -fno-strict-aliasing -deviceemu
CFLAGS := -g -I$(CUDAHOME)/include -I$(INCDIR)
else
NVCCFLAGS := -I$(INCDIR) -arch sm_11 --compiler-options "-Wall -fno-strict-aliasing"
CFLAGS := -g -O0 -mtune=core2 -fPIC -I$(CUDAHOME)/include -I$(INCDIR)
endif[/code]

which would set flags for compilation depending on whether you want device emulation or not.

As to the original question, that error means make can't work out a rule to make a file which a target you are trying to build requires to compile. Make has a set of built-in rules for automagically deducing how to make dependencies, and the Makefile contains additional rule sets which replace or augment these built-in rules so it can build the target you want. The short, general answer is that the makefile is broken somehow.
[quote name='Letharion' post='590479' date='Sep 21 2009, 09:41 PM']I'm not autotools expert in anyway, but I wouldn't expect "emu=1" to work, as I've never seen that syntax. What do you want to happen?



It isn't autotools syntax,it is just plain GNU make, and that syntax just sets the variable emu to 1 inside the make run, which is very useful for conditional compilation. So you could have something like this in a makefile



ifdef emu

NVCCFLAGS := -g -I$(INCDIR) --compiler-options -fno-strict-aliasing -deviceemu

CFLAGS := -g -I$(CUDAHOME)/include -I$(INCDIR)

else

NVCCFLAGS := -I$(INCDIR) -arch sm_11 --compiler-options "-Wall -fno-strict-aliasing"

CFLAGS := -g -O0 -mtune=core2 -fPIC -I$(CUDAHOME)/include -I$(INCDIR)

endif




which would set flags for compilation depending on whether you want device emulation or not.



As to the original question, that error means make can't work out a rule to make a file which a target you are trying to build requires to compile. Make has a set of built-in rules for automagically deducing how to make dependencies, and the Makefile contains additional rule sets which replace or augment these built-in rules so it can build the target you want. The short, general answer is that the makefile is broken somehow.

#3
Posted 09/22/2009 06:22 AM   
[quote name='avidday' post='590681' date='Sep 22 2009, 08:22 AM']It isn't autotools syntax,it is just plain GNU make, and that syntax just sets the variable emu to 1 inside the make run, which is very useful for conditional compilation.[/quote]

I included make under autotools.
Interesting, I didn't know make supported that.

See, I'm no expert ;)

Anyway, clanz, if you wanna know more, you'll have to show some make rules :)
[quote name='avidday' post='590681' date='Sep 22 2009, 08:22 AM']It isn't autotools syntax,it is just plain GNU make, and that syntax just sets the variable emu to 1 inside the make run, which is very useful for conditional compilation.



I included make under autotools.

Interesting, I didn't know make supported that.



See, I'm no expert ;)



Anyway, clanz, if you wanna know more, you'll have to show some make rules :)

#4
Posted 09/22/2009 07:05 AM   
Scroll To Top