OpenWrt Forum Archive

Topic: Problem during compilation of "helloworld" using SDK

The content of this topic has been archived on 30 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I got following message while compiling as said in HowToBuildPackages link.

      [root@localhost OpenWrt-SDK-Linux-i686-1]# make compile
       make[1]: Entering directory `/home/kalpesh/OpenWrt-SDK-Linux-i686-1/package/helloworld'
       Makefile:35: *** commands commence before first target.  Stop.
       make[1]: Leaving directory `/home/kalpesh/OpenWrt-SDK-Linux-i686-1/package/helloworld'
       make: *** [helloworld-prepare] Error 2

Line 35 of package/helloworld/Makefile :
        touch $@

   Can you please tell me what can be the error? Also I would like to know what " touch $@ " command will do.

   If i remove the "@" from " touch $@" I can compile.

[root@localhost OpenWrt-SDK-Linux-i686-1]# make clean
make[1]: Entering directory `/home/kalpesh/OpenWrt-SDK-Linux-i686-1/package/helloworld'
rm -rf /home/kalpesh/OpenWrt-SDK-Linux-i686-1/build_mipsel/hello-2.1.1
make[1]: Leaving directory `/home/kalpesh/OpenWrt-SDK-Linux-i686-1/package/helloworld'
rm -rf /home/kalpesh/OpenWrt-SDK-Linux-i686-1/build_mipsel
rm -rf bin
[root@localhost OpenWrt-SDK-Linux-i686-1]# make compile
mkdir -p /home/kalpesh/OpenWrt-SDK-Linux-i686-1/build_mipsel
mkdir -p /home/kalpesh/OpenWrt-SDK-Linux-i686-1/dl
make[1]: Entering directory `/home/kalpesh/OpenWrt-SDK-Linux-i686-1/package/helloworld'
rm -rf /home/kalpesh/OpenWrt-SDK-Linux-i686-1/build_mipsel/hello-2.1.1
mkdir -p /home/kalpesh/OpenWrt-SDK-Linux-i686-1/build_mipsel/hello-2.1.1
zcat /home/kalpesh/OpenWrt-SDK-Linux-i686-1/dl/hello-2.1.1.tar.gz | tar -C /home/kalpesh/OpenWrt-SDK-Linux-i686-1/build_mipsel/hello-2.1.1/.. -xf -
if [ -d ./patches ]; then \
        /home/kalpesh/OpenWrt-SDK-Linux-i686-1/scripts/patch-kernel.sh /home/kalpesh/OpenWrt-SDK-Linux-i686-1/build_mipsel/hello-2.1.1 ./patches ; \
fi
                                                                                                   
Applying ./patches/* using plaintext:
cat: ./patches/*: No such file or directory
touch /home/kalpesh/OpenWrt-SDK-Linux-i686-1/build_mipsel/hello-2.1.1/.prepared
make[1]: Leaving directory `/home/kalpesh/OpenWrt-SDK-Linux-i686-1/package/helloworld'
make[1]: Entering directory `/home/kalpesh/OpenWrt-SDK-Linux-i686-1/package/helloworld'
make[1]: Nothing to be done for `compile'.
make[1]: Leaving directory `/home/kalpesh/OpenWrt-SDK-Linux-i686-1/package/helloworld'


Now after this the "bin/packages" directory is not present and hence I can't get any compiled package. (ie. hello_2.1.1-1_mipsel.ipk)

use tabs, not spaces

actually i copied as and wats given in the HOWTo page and did see that tabs are proper.
But still it stops @ tats line touch $@
Could u pls tell me wat  does touch $@ do coz i have never seen cmd with @

also removing the @ (as mentioned above) makes it compile fiuther but no ipk sad

r00t3r wrote:

actually i copied as and wats given in the HOWTo page and did see that tabs are proper.

Did you noticed chapter 3.3. Creating the required files in the howto? Are you really sure that you're using TABS instead of spaces?

EDIT: Just confirmed that a copy & paste of the example works here on Ubuntu 5.10.

(Last edited by olli on 19 Jan 2006, 15:11)

Well, as I said before, I'm using 'tab's instead of spaces. still the same problem occurs. I'm using Red Hat Linux 9 wih kernel 2.4
The errors are still there and if @ is removed I can compile. But again the problem is the bin directory containing .ipk file is deleted automatically after compilation. Can there be anything else except the 'tab's due to which errors may occur? also what does
#touch $@
command do? what is @ used for?

The discussion might have continued from here.