Hello there list, Sorry to ask for help on such a n00bish problem, but I am trying to compile my first package for kamikaze, and I am having a hard time doing it. I have tried to find a solution for this, but my linux/gcc knowleadge seens to be too limited. Can anyone have a look at it? It seens that it expects for something on the build directory that is not there.
Sorry for the long message, but I would like to add enought information :-) Ok, I am trying to compile a simple helloworld program, and mostly have used info of this tutorial: http://www.gargoyle-router.com/wiki/doku.php?id=openwrt_coding#part_ia_simple_program_in_c_--_8_23_2007 I have also found this wiki page: http://oldwiki.openwrt.org/BuildingPackagesHowTo.html#head-2518083795a24014316929f7c50a435de9679336 And this forum post: https://forum.openwrt.org/viewtopic.php?pid=31794 First, here is my error message: make[1]: Entering directory `/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686' make[2]: Entering directory `/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686' make[3]: Entering directory `/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/package/helloworld' mkdir -p /home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/build_dir/mipsel/helloworld cp -fpR ./src/* /home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/build_dir/mipsel/helloworld/ touch /home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/build_dir/mipsel/helloworld/.prepared_04e751243d8111b24177add43b7bf13f (cd /home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/build_dir/mipsel/helloworld/./; if [ -x ./configure ]; then /home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/host/bin/find /home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/build_dir/mipsel/helloworld/ -name config.guess | xargs -r chmod u+w; /home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/host/bin/find /home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/build_dir/mipsel/helloworld/ -name config.guess | xargs -r -n1 cp /home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/scripts/config.guess; /home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/host/bin/find /home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/build_dir/mipsel/helloworld/ -name config.sub | xargs -r chmod u+w; /home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/host/bin/find /home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/build_dir/mipsel/helloworld/ -name config.sub | xargs -r -n1 cp /home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/scripts/config.sub; AR=mipsel-linux-uclibc-ar AS="mipsel-linux-uclibc-gcc -c -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts" LD=mipsel-linux-uclibc-ld NM=mipsel-linux-uclibc-nm CC="mipsel-linux-uclibc-gcc" GCC="mipsel-linux-uclibc-gcc" CXX="mipsel-linux-uclibc-g++" RANLIB=mipsel-linux-uclibc-ranlib STRIP=mipsel-linux-uclibc-strip OBJCOPY=mipsel-linux-uclibc-objcopy OBJDUMP=mipsel-linux-uclibc-objdump SIZE=mipsel-linux-uclibc-size CFLAGS="-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts " CXXFLAGS="-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts " CPPFLAGS="-I/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/mipsel/usr/include -I/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/mipsel/include " LDFLAGS="-L/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/toolchain-mipsel_gcc3.4.6/lib -L/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/mipsel/usr/lib -L/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/mipsel/lib " PKG_CONFIG_PATH="/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/mipsel/usr/lib/pkgconfig:/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/host/usr/lib/pkgconfig" PKG_CONFIG_LIBDIR="/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/mipsel/usr/lib/pkgconfig" ./configure --target=mipsel-linux --host=mipsel-linux --build=i486-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls ; fi; ) touch /home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/build_dir/mipsel/helloworld/.configured CFLAGS="-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -I/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/mipsel/usr/include -I/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/mipsel/include " CXXFLAGS="-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -I/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/mipsel/usr/include -I/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/mipsel/include " LDFLAGS="-L/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/toolchain-mipsel_gcc3.4.6/lib -L/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/mipsel/usr/lib -L/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/mipsel/lib " make -C /home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/build_dir/mipsel/helloworld/. AR=mipsel-linux-uclibc-ar AS="mipsel-linux-uclibc-gcc -c -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts" LD=mipsel-linux-uclibc-ld NM=mipsel-linux-uclibc-nm CC="mipsel-linux-uclibc-gcc" GCC="mipsel-linux-uclibc-gcc" CXX="mipsel-linux-uclibc-g++" RANLIB=mipsel-linux-uclibc-ranlib STRIP=mipsel-linux-uclibc-strip OBJCOPY=mipsel-linux-uclibc-objcopy OBJDUMP=mipsel-linux-uclibc-objdump SIZE=mipsel-linux-uclibc-size CROSS="mipsel-linux-uclibc-" ARCH="mipsel" ; make[4]: Entering directory `/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/build_dir/mipsel/helloworld' make[4]: *** No targets specified and no makefile found. Stop. make[4]: Leaving directory `/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/build_dir/mipsel/helloworld' make[3]: *** [/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/build_dir/mipsel/helloworld/.built] Error 2 make[3]: Leaving directory `/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/package/helloworld' make[2]: *** [package/helloworld/compile] Error 2 make[2]: Leaving directory `/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686' make[1]: *** [/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686/staging_dir/mipsel/stamp/.package_compile] Error 2 make[1]: Leaving directory `/home/uderman/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686' make: *** [world] Error 2 I have this helloworld folder on the package directory. The scr dir contains my helloworld.c: uder...@uderman:~/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686$ ls ./package/helloworld/ Makefile src Here is my makefile. It is almost a copy from the first tutorial I posted above: uder...@uderman:~/OpenWRT/OpenWrt-SDK-brcm-2.4-for-Linux-i686$ cat ./package/helloworld/Makefile ############################################## # OpenWrt Makefile for helloworld program # # # Most of the variables used here are defined in # the include directives below. We just need to # specify a basic description of the package, # where to build our program, where to find # the source files, and where to install the # compiled program on the router. # # Be very careful of spacing in this file. # Indents should be tabs, not spaces, and # there should be no trailing whitespace in # lines that are not commented. # ############################################## include $(TOPDIR)/rules.mk # Name and release number of this package PKG_NAME:=helloworld PKG_RELEASE:=1 # This specifies the directory where we're going to build the program. # The root build directory, $(BUILD_DIR), is by default the build_mipsel # directory in your OpenWrt SDK directory PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) include $(INCLUDE_DIR)/package.mk # Specify package information for this program. # The variables defined here should be self explanatory. # If you are running Kamikaze, delete the DESCRIPTION # variable below and uncomment the Kamikaze define # directive for the description below define Package/helloworld SECTION:=utils CATEGORY:=Utilities TITLE:=Helloworld -- prints a snarky message endef # Uncomment portion below for Kamikaze and delete DESCRIPTION variable above define Package/helloworld/description If you can't figure out what this program does, you're probably brain-dead and need immediate medical attention. endef # Specify what needs to be done to prepare for building the package. # In our case, we need to copy the source files to the build directory. # This is NOT the default. The default uses the PKG_SOURCE_URL and the # PKG_SOURCE which is not defined here to download the source from the web. # In order to just build a simple program that we have just written, it is # much easier to do it this way. define Build/Prepare mkdir -p $(PKG_BUILD_DIR) $(CP) ./src/* $(PKG_BUILD_DIR)/ endef # We do not need to define Build/Configure or Build/Compile directives # The defaults are appropriate for compiling a simple program such as this one # Specify where and how to install the program. Since we only have one file, # the helloworld executable, install it by copying it to the /bin directory on # the router. The $(1) variable represents the root directory on the router running # OpenWrt. The $(INSTALL_DIR) variable contains a command to prepare the install # directory if it does not already exist. Likewise $(INSTALL_BIN) contains the # command to copy the binary file from its current location (in our case the build # directory) to the install directory. define Package/helloworld/install $(INSTALL_DIR) $(1)/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/helloworld $(1)/bin/ endef # This line executes the necessary commands to compile our program. # The above define directives specify all the information needed, but this # line calls BuildPackage which in turn actually uses this information to # build a package. $(eval $(call BuildPackage,helloworld)) Thank you! []´s, - Uderman http://www.temadigital.com.br/
_______________________________________________ openwrt-users mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-users
