OpenWrt Forum Archive

Topic: Help needed packaging tinysvcmdns (a simple C program)

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

I am trying to package tinysvcmdns, a tiny MDNS responder implementation for publishing services.
Unfortunately the compilation does not succeed, I get:

make[4]: *** No targets specified and no makefile found.  Stop.

I am Using Ubuntu 12.04.2 LTS, Precise Pangolin, and the OpenWrt-SDK-ar71xx-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2 SDK.

Here is what I did:

echo "src-link custom ../myfeed" >> feeds.conf

mkdir -p myfeed/tinysvcmdns/
nano myfeed/tinysvcmdns/Makefile # see below

./scripts/feeds install -p custom
./scripts/feeds update custom -i
./scripts/feeds install 

make clean

make defconfig

# To test the compilation step
make -C myfeed/tinysvcmdns/ compile V=s

make V=s

Here is myfeed/tinysvcmdns/Makefile that I have created and that is likely not entirely correct:

include $(TOPDIR)/rules.mk

PKG_NAME:=tinysvcmdns
PKG_VERSION:=0.1
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=e34b56243b15.zip
PKG_SOURCE_URL:=https://bitbucket.org/geekman/tinysvcmdns/get/
PKG_MD5SUM:=da00465a5e8a18aed98f4dc124dd6a05
PKG_CAT:=unzip

include $(INCLUDE_DIR)/package.mk

define Package/tinysvcmdns
  SECTION:=base
  CATEGORY:=Network
  DEFAULT:=y
  TITLE:=Tiny MDNS responder implementation for publishing services
  URL:=https://bitbucket.org/geekman/tinysvcmdns
endef

define Package/tinysvcmdns/description
  tinysvcmdns is a tiny MDNS responder implementation for publishing services
  This implementation is only concerned with publishing services, 
  without a system-wide daemon like Bonjour or Avahi. 
  Its other goal is to be extremely small, embeddable, 
  and have no external dependencies.
endef

define Package/tinysvcmdns/install
    $(INSTALL_DIR) $(1)/bin
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/testmdnsd $(1)/bin/
endef

$(eval $(call BuildPackage,tinysvcmdns))

Can you help me fix this Makefile?

Compiling manually like this works:

cd build_dir/target-_-/geekman-tinysvcmdns-e34b56243b15/

export PATH=$PATH:/home/user/OpenWrt-SDK-ar71xx-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/bin/

export STAGING_DIR=/home/user/OpenWrt-SDK-ar71xx-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/

make CC=mips-openwrt-linux-uclibc-gcc

mips-openwrt-linux-strip ./testmdnsd

Thanks!

(Last edited by probono on 31 Dec 2013, 02:48)

Now I get

user@ubuntu:~/OpenWrt-SDK-ar71xx-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2$ make -C myfeed/tinysvcmdns/ compile V=s
make: Entering directory `/home/user/OpenWrt-SDK-ar71xx-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2/myfeed/tinysvcmdns'
Makefile:1: /rules.mk: No such file or directory
Makefile:12: /package.mk: No such file or directory
make: *** No rule to make target `/package.mk'.  Stop.

I also see that package/tinysvcmdns does not exist in the OpenWrt-SDK-ar71xx-for-linux-i486-gcc-4.6-linaro_uClibc-0.9.33.2 directory. Also tinysvcmdns is not offered as a choice in "make menuconfig".

I believe this is an error and there should be a package/tinysvcmdns/Makefile containing the Makefile described above!

Please help me.

(Last edited by probono on 31 Dec 2013, 13:33)

Now I have built the SDK from svn.

This time I am using this Makefile which I believe to be (almost?) correct:

include $(TOPDIR)/rules.mk

PKG_NAME:=tinysvcmdns
PKG_VERSION:=0.1
PKG_RELEASE:=1

PKG_SOURCE:=e34b56243b15.tar.gz
PKG_SOURCE_URL:=https://bitbucket.org/geekman/tinysvcmdns/get/
PKG_MD5SUM:=cb00f11a2a096885b1f508d138e50135
PKG_BUILD_DIR:=$(BUILD_DIR)/geekman-tinysvcmdns-e34b56243b15

PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk

TARGET_LDFLAGS += -lpthread -lssp

define Package/tinysvcmdns
  DEPENDS:=+libpthread +libssp
  SUBMENU:=Network
  SECTION:=base
  CATEGORY:=Network
  TITLE:=Tiny MDNS responder implementation for publishing services
  URL:=https://bitbucket.org/geekman/tinysvcmdns
endef

define Package/tinysvcmdns/description
  tinysvcmdns is a tiny MDNS responder implementation for publishing services
  This implementation is only concerned with publishing services, 
  without a system-wide daemon like Bonjour or Avahi. 
  Its other goal is to be extremely small, embeddable, 
  and have no external dependencies.
endef

define Package/tinysvcmdns/install
    $(INSTALL_DIR) $(1)/usr/bin
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/testmdnsd $(1)/usr/bin/
endef

$(eval $(call BuildPackage,tinysvcmdns))

But it fails with

cp -fpR OpenWrt-SDK-ar71xx-for-redhat-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libssp.so.* OpenWrt-SDK-ar71xx-for-redhat-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/build_dir/target-mips_34kc_uClibc-0.9.33.2/toolchain/ipkg-ar71xx/libssp/lib/
cp: cannot stat `OpenWrt-SDK-ar71xx-for-redhat-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libssp.so.*': No such file or directory

This happens after I did:
./scripts/feeds update
./scripts/feeds install libssp

What can I do?

This does NOT work:
svn export svn://svn.openwrt.org/openwrt/packages/libs/libssp package/libssp
There is no libssp package apparently.

(Last edited by probono on 6 Apr 2014, 22:24)

http://lmgtfy.com/?q=openwrt+libssp


  |
  |
  |
  |
  |
  |
  |
  |
  |

Forum search also is no so BAD !

(Last edited by 3zl on 6 Apr 2014, 23:02)

3zl wrote:

Forum search also is no so BAD !

What comes up is the suggestion to add "+libssp to the DEPENDS: section" which is exactly what I did... without success

Trying to compile

https://github.com/mikebrady/shairport-sync-for-openwrt

I am still running into the same problem:

cp: cannot stat `/home/user/projects/openwrt_trunk/OpenWrt-SDK-ar71xx-for-redhat-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/lib/libssp.so.*': No such file or directory

(Last edited by probono on 22 Nov 2014, 13:33)

The discussion might have continued from here.