OpenWrt Forum Archive

Topic: unable to get customfeed build to work

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

Running trunk. I followed the following instructions from:

http://wiki.openwrt.org/doc/devel/feeds





Creating your own feed

   1.
      Create your project dir and get trunk, as above
   2.
      Create your package dir and copy your package into it (e.g. cp packagedir /home/user/openwrt/project/customfeed/), so that your package is under (in this example) /home/user/openwrt/project/customfeed/packagedir

Using the feed

   1.
      Edit your feeds.conf (i.e. /home/user/openwrt/project/openwrt/feeds.conf)
   2.
      Add a new line to access the feed (and in the case of adding to the packages feed comment out the normal packages feed.)
   3.
      e.g.

#srv-svn packages svn://svn.openwrt.org/openwrt/packages src-link customfeed /home/user/openwrt/project/packages

or in the case of the second example:
src-link customfeed /home/user/openwrt/project/customfeed

   1.
      Update the feed: from the <buildroot dir> (e.g. /home/user/openwrt/project/openwrt) do:

      ./scripts/feeds update customfeed

   2.
      And then install it

      ./scripts/feeds install -p customfeed

   3.
      Now your package(s) should be available when you do

      make menuconfig



The package does not appear in menuconfig. Has something changed since this howto was posted? Anybody see what I did wrong?

Thanks,

Perazim

I did a "make dirclean" and then "make" with same results as the first attempt. The build system is just not seeing the customfeed eventhough I added it to the feeds.conf per instructions:

[yossi@maps trunk-8m]$ more feeds.conf
src-svn packages svn://svn.openwrt.org/openwrt/packages
src-svn xwrt http://x-wrt.googlecode.com/svn/trunk/package
src-svn luci http://svn.luci.subsignal.org/luci/trun … ib/package
#src-svn phone svn://svn.openwrt.org/openwrt/feeds/phone
#src-svn efl svn://svn.openwrt.org/openwrt/feeds/efl
#src-svn xorg svn://svn.openwrt.org/openwrt/feeds/xorg
#src-svn desktop svn://svn.openwrt.org/openwrt/feeds/desktop
#src-svn xfce svn://svn.openwrt.org/openwrt/feeds/xfce
#src-svn lxde svn://svn.openwrt.org/openwrt/feeds/lxde
src-link customfeed /home/yossi/router/trunk-8m/customfeed
[yossi@maps trunk-8m]$


./scripts/feeds update customfeed

./scripts/feeds install -p customfeed

make menuconfig

make



[yossi@maps customfeed]$ ls -l
total 4
drwxrwxr-x. 2 yossi yossi 4096 Nov 16 14:49 sipwitch
[yossi@maps customfeed]$



[yossi@maps sipwitch]$ ls -l
total 4
-rw-rw-r--. 1 yossi yossi 1434 Nov 16 15:11 Makefile
[yossi@maps sipwitch]$


Perazim

I use local Luci source as a custom feed and that works well.

I have modified directly feeds.conf.default, not a separate feeds.conf

--- trunk/feeds.conf.default    (revision 34248)
+++ trunk/feeds.conf.default    (working copy)
@@ -1,6 +1,5 @@
 src-svn packages svn://svn.openwrt.org/openwrt/packages
-src-svn xwrt http://x-wrt.googlecode.com/svn/trunk/package
-src-svn luci http://svn.luci.subsignal.org/luci/trunk/contrib/package
+src-link luci /Openwrt/luci/trunk/contrib/package
 #src-svn phone svn://svn.openwrt.org/openwrt/feeds/phone
 #src-svn efl svn://svn.openwrt.org/openwrt/feeds/efl
 #src-svn xorg svn://svn.openwrt.org/openwrt/feeds/xorg

You might need to include -a in the install command to get all the packages installed from that feed. See the example in the wiki article:
./scripts/feeds install -a -p luci

(I am just using "./scripts/feeds install -a " as I have removed the non-used xwrt feed.

What I am doing is:

cd ~
[[ -d $HOME/openwrt ]] || mkdir $HOME/openwrt
svn checkout svn://svn.openwrt.org/openwrt/trunk/ ~/openwrt/trunk
cd ~/openwrt/trunk

cat > ~/openwrt/trunk/feeds.conf <<EOF
src-svn packages svn://svn.openwrt.org/openwrt/packages
src-svn luci http://svn.luci.subsignal.org/luci/trunk
src-link customfeed $HOME/openwrt/myfeed
EOF

cat > ~/openwrt/trunk/.config <<EOF
CONFIG_PACKAGE_luci=y
EOF

./scripts/feeds update -a
./scripts/feeds install -a

make menuconfig
make defconfig

export jobs=$(grep processor /proc/cpuinfo | wc -l)
[[ $jobs -gt 1 ]] && make -j$jobs V=s || make V=s

(Last edited by written_direcon on 19 Nov 2012, 10:59)

Thanks for the responses.

written_direcon: Your script is nearly exactly what I was doing EXCEPT that my customfeed was inside the build directory. I wouldn't suppose that this would cause a problem and not sure it did. After making the change to place it outside, things worked and I can see the package in menuconfig.

FYI: I have had many occasions where I am building, making changes and building again where the build system stopped working with seemingly strange errors. In the end, I had to start from scratch to get things working again.

Perazim

I think the custom feed has to be OUTSIDE of the topdir build directory!!

(Last edited by written_direcon on 19 Nov 2012, 12:38)

Followup question: When I make a change to the Makefile for a package in customfeed, do I just run make again or do I have to update and reinstall the feeds?

Thanks,

Perazim

Just run make, just like you would do for normal packages. It is a package among others.

But if your change to Makefile changes dependencies or other stuff affecting menuconfig and other packages, you should run either make defconfig or makeconfig before the actual make.

Thanks.

This is the output I receive when I make:

[yossi@maps trunk]$ HOST_LIB_PATH_bfd=/lib: make package/sipwitch/compile V=s
Collecting package info: done
make[1]: Entering directory `/home/yossi/openwrt/trunk'
make[2]: Entering directory `/home/yossi/openwrt/trunk/package/toolchain'
if [ -f /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libc" >> /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install
if [ -f /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libgcc" >> /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install
WARNING: skipping libssp -- package not selected
WARNING: skipping libstdcpp -- package not selected
if [ -f /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libpthread" >> /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install
WARNING: skipping libthread-db -- package not selected
WARNING: skipping librt -- package not selected
WARNING: skipping libgfortran -- package not selected
WARNING: skipping ldd -- package not selected
WARNING: skipping ldconfig -- package not selected
make[2]: Leaving directory `/home/yossi/openwrt/trunk/package/toolchain'
make[2]: Entering directory `/home/yossi/openwrt/trunk/feeds/packages/libs/libosip2'
if [ -f /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/libosip2.default.install.clean ]; then rm -f /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/libosip2.default.install /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/libosip2.default.install.clean; fi; echo "libosip2" >> /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/libosip2.default.install
make[2]: Leaving directory `/home/yossi/openwrt/trunk/feeds/packages/libs/libosip2'
make[2]: Entering directory `/home/yossi/openwrt/myfeed/sipwitch'
Makefile:52: *** missing separator (did you mean TAB instead of 8 spaces?).  Stop.
make[2]: Leaving directory `/home/yossi/openwrt/myfeed/sipwitch'
make[1]: *** [package/feeds/custom/sipwitch/compile] Error 2
make[1]: Leaving directory `/home/yossi/openwrt/trunk'
make: *** [package/sipwitch/compile] Error 2
[yossi@maps trunk]$


Line 52 is the end of the Makefile. Then it must be something wrong with my Makefile:

#
# Copyright (C) 2006-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=sipwitch
PKG_VERSION:=1.2.4
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(BUILD_DIR)/sipwitch-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/sipwitch/
PKG_MD5SUM:=6119cecb062ba4d0af18b427b01c41e2
PKG_CAT:=zcat

include $(INCLUDE_DIR)/package.mk

define Package/sipwitch
  SECTION:=net
  CATEGORY:=Network
  SUBMENU:=Telephony
  DEPENDS:=+libosip2
  TITLE:=Sipwitch
  URL:=http://www.gnu.org/software/sipwitch/
endef

define Package/sipwitch/description
    Sipwitch is a simple sip registrar and proxy server.
endef

define Build/Configure
    $(call Build/Configure/Default, \
        --disable-qt \
        --with-libosip-prefix="$(STAGING_DIR)/usr" \
        --with-linux-headers=$(LINUX_DIR)\
    )
endef

define Package/sipwitch/install
        $(INSTALL_DIR) $(1)/usr/sbin
endef

define Package/sipwitch/install
    $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/sipwitch $(1)/usr/sbin/
endef

$(eval $(call BuildPackage,sipwitch))



Perazim

(Last edited by perazim on 19 Nov 2012, 13:21)

perazim wrote:

define Package/sipwitch/install
        $(INSTALL_DIR) $(1)/usr/sbin
endef

define Package/sipwitch/install
    $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/sipwitch $(1)/usr/sbin/
endef

Unless that is a copy-paste error, there are two Package/sipwitch/install sections...

There was. Removed first one. Makefile now:

#
# Copyright (C) 2006-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=sipwitch
PKG_VERSION:=1.2.4
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(BUILD_DIR)/sipwitch-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/sipwitch/
PKG_MD5SUM:=6119cecb062ba4d0af18b427b01c41e2
PKG_CAT:=zcat

include $(INCLUDE_DIR)/package.mk

define Package/sipwitch
  SECTION:=net
  CATEGORY:=Network
  SUBMENU:=Telephony
  DEPENDS:=+libosip2
  TITLE:=Sipwitch
  URL:=http://www.gnu.org/software/sipwitch/
endef

define Package/sipwitch/description
    Sipwitch is a simple sip registrar and proxy server.
endef

define Build/Configure
    $(call Build/Configure/Default, \
        --disable-qt \
        --with-libosip-prefix="$(STAGING_DIR)/usr" \
        --with-linux-headers=$(LINUX_DIR)\
    )
endef

define Package/sipwitch/install
    $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/sipwitch $(1)/usr/sbin/
endef

$(eval $(call BuildPackage,sipwitch))


Same error:

[yossi@maps trunk]$ HOST_LIB_PATH_bfd=/lib: make package/sipwitch/compile V=s
Collecting package info: done
make[1]: Entering directory `/home/yossi/openwrt/trunk'
make[2]: Entering directory `/home/yossi/openwrt/trunk/package/toolchain'
if [ -f /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libc" >> /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install
if [ -f /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libgcc" >> /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install
WARNING: skipping libssp -- package not selected
WARNING: skipping libstdcpp -- package not selected
if [ -f /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libpthread" >> /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/toolchain.default.install
WARNING: skipping libthread-db -- package not selected
WARNING: skipping librt -- package not selected
WARNING: skipping libgfortran -- package not selected
WARNING: skipping ldd -- package not selected
WARNING: skipping ldconfig -- package not selected
make[2]: Leaving directory `/home/yossi/openwrt/trunk/package/toolchain'
make[2]: Entering directory `/home/yossi/openwrt/trunk/feeds/packages/libs/libosip2'
if [ -f /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/libosip2.default.install.clean ]; then rm -f /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/libosip2.default.install /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/libosip2.default.install.clean; fi; echo "libosip2" >> /home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/pkginfo/libosip2.default.install
make[2]: Leaving directory `/home/yossi/openwrt/trunk/feeds/packages/libs/libosip2'
make[2]: Entering directory `/home/yossi/openwrt/myfeed/sipwitch'
Makefile:48: *** missing separator (did you mean TAB instead of 8 spaces?).  Stop.
make[2]: Leaving directory `/home/yossi/openwrt/myfeed/sipwitch'
make[1]: *** [package/feeds/custom/sipwitch/compile] Error 2
make[1]: Leaving directory `/home/yossi/openwrt/trunk'
make: *** [package/sipwitch/compile] Error 2
[yossi@maps trunk]$

This is the howto I am using:

http://wiki.openwrt.org/doc/devel/packages?s[]=howto&s[]=add&s[]=new&s[]=package

Thanks,

Perazim

I have checked the Makefile for unprintable junk characters, replaced all tabs with spaces. Now the reported error changes. Can anybody with openwrt makefile experience have a look at this please:

make[2]: Leaving directory `/home/yossi/openwrt/trunk/feeds/packages/libs/libosip2'
make[2]: Entering directory `/home/yossi/openwrt/myfeed/sipwitch'
Makefile:52: *** missing separator.  Stop.
make[2]: Leaving directory `/home/yossi/openwrt/myfeed/sipwitch'
make[1]: *** [package/feeds/custom/sipwitch/compile] Error 2
make[1]: Leaving directory `/home/yossi/openwrt/trunk'
make: *** [package/sipwitch/compile] Error 2
[yossi@maps trunk]$

Makefile:
#
# Copyright (C) 2006-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=sipwitch
PKG_VERSION:=1.2.4
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(BUILD_DIR)/sipwitch-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/sipwitch/
PKG_MD5SUM:=6119cecb062ba4d0af18b427b01c41e2
PKG_CAT:=zcat

PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk

define Package/sipwitch
  SECTION:=net
  CATEGORY:=Network
  SUBMENU:=Telephony
  DEPENDS:=+libosip2 +libeXosip +libucommon
  TITLE:=Sipwitch
  URL:=http://www.gnu.org/software/sipwitch/
endef

define Package/sipwitch/description
  Sipwitch is a simple sip registrar and proxy server.
endef

define Build/Configure
  $(call Build/Configure/Default, \
    --disable-qt \
    --with-libosip-prefix="$(STAGING_DIR)/usr" \
    --with-linux-headers=$(LINUX_DIR)\
  )
endef

define Package/sipwitch/install
  $(INSTALL_DIR) $(1)/usr/sbin
  $(INSTALL_BIN) $(PKG_BUILD_DIR)/sipwitch $(1)/usr/sbin/
endef

$(eval $(call BuildPackage,sipwitch))





Perazim

(Last edited by perazim on 20 Nov 2012, 12:03)

The commands in the /install define must be indented with tabs.

That fixed that problem thanks.

The next issue I am encountering has to do with the name of the package.

I need to package a library named ucommon.  The package source is named ucommon-5.2.2.tar.gz

The resulting package needs to be libucommon.

When the PACKAGE_NAME is ucommon, it compiles but doesn't install. When the PACKAGE_NAME is libucommon, it doesn't compile saying:

make[2]: Leaving directory `/home/yossi/openwrt/trunk/package/libs/openssl'
make[2]: Entering directory `/home/yossi/openwrt/myfeed/libucommon'
CFLAGS="-Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float  -I/home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include -I/home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/include -I/home/yossi/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/usr/include -I/home/yossi/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/include " CXXFLAGS="-Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float  -I/home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include -I/home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/include -I/home/yossi/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/usr/include -I/home/yossi/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/include " LDFLAGS="-L/home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib -L/home/yossi/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/lib -L/home/yossi/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/usr/lib -L/home/yossi/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib " make -j1 -C /home/yossi/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/libucommon-5.2.2/. AR=mips-openwrt-linux-uclibc-ar AS="mips-openwrt-linux-uclibc-gcc -c -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float" LD=mips-openwrt-linux-uclibc-ld NM=mips-openwrt-linux-uclibc-nm CC="mips-openwrt-linux-uclibc-gcc" GCC="mips-openwrt-linux-uclibc-gcc" CXX="mips-openwrt-linux-uclibc-g++" RANLIB=mips-openwrt-linux-uclibc-ranlib STRIP=mips-openwrt-linux-uclibc-strip OBJCOPY=mips-openwrt-linux-uclibc-objcopy OBJDUMP=mips-openwrt-linux-uclibc-objdump SIZE=mips-openwrt-linux-uclibc-size CROSS="mips-openwrt-linux-uclibc-" ARCH="mips" ;
make[3]: Entering directory `/home/yossi/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/libucommon-5.2.2'
make[3]: *** No targets specified and no makefile found.  Stop.
make[3]: Leaving directory `/home/yossi/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/libucommon-5.2.2'
make[2]: *** [/home/yossi/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/libucommon-5.2.2/.built] Error 2
make[2]: Leaving directory `/home/yossi/openwrt/myfeed/libucommon'
make[1]: *** [package/feeds/custom/libucommon/compile] Error 2
make[1]: Leaving directory `/home/yossi/openwrt/trunk'
make: *** [package/libucommon/compile] Error 2
[yossi@maps trunk]$ cd build_dir/target-mips_r2_uClibc-0.9.33.2/libucommon-5.2.2/
[yossi@maps libucommon-5.2.2]$ ls -l
total 0
[yossi@maps libucommon-5.2.2]$


Makefile:

#
# Copyright (C) 2006-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=libucommon
PKG_VERSION:=5.2.2
PKG_RELEASE:=1

PKG_SOURCE:=ucommon-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/commoncpp/
PKG_MD5SUM:=4739fcd9db006432f1b8e2ea226e414a

PKG_FIXUP:=autoreconf
PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk

define Package/libucommon
  SECTION:=libs
  CATEGORY:=Libraries
  TITLE:=libucommon for sipwitch
  URL:=http://www.gnu.org/software/sipwitch/
  DEPENDS:=+libpthread +librt +libstdcpp +libopenssl +libz
endef

define Package/libucommon/description
libucommon library required for sipwitch
endef

define Build/InstallDev
    mkdir -p $(1)/usr/include
    $(CP) $(PKG_INSTALL_DIR)/usr/include/libucommon $(1)/usr/include/
    mkdir -p $(1)/usr/lib
    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libucommon.{a,so*} $(1)/usr/lib/
endef

define Package/libucommon/install
    $(INSTALL_DIR) $(1)/usr/lib
    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcommoncpp.so.* $(1)/usr/lib/
    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libucommon.so.* $(1)/usr/lib/
    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusecure.so.* $(1)/usr/lib/
endef

$(eval $(call BuildPackage,libucommon))

It seems that I am missing something here too.

Thanks,

Perazim

(Last edited by perazim on 20 Nov 2012, 17:46)

Some more progress:

Was able to get package ucommon to build. Here is the Makefile:


#
# Copyright (C) 2006-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=ucommon
PKG_VERSION:=5.2.2
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/commoncpp/
PKG_MD5SUM:=4739fcd9db006432f1b8e2ea226e414a

PKG_FIXUP:=autoreconf
PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk

define Package/ucommon
  SECTION:=libs
  CATEGORY:=Libraries
  TITLE:=ucommon for sipwitch
  URL:=http://www.gnu.org/software/sipwitch/
  DEPENDS:=+libpthread +librt +libstdcpp +libopenssl +libz
endef

define Package/ucommon/description
ucommon library required for sipwitch
endef

define Build/InstallDev
    $(INSTALL_DIR) $(1)/usr/include
    $(CP) $(PKG_INSTALL_DIR)/usr/include/ucommon $(1)/usr/include/
    $(CP) $(PKG_INSTALL_DIR)/usr/include/commoncpp $(1)/usr/include/
    $(INSTALL_DIR) $(1)/usr/lib
    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libucommon.{a,so*} $(1)/usr/lib/
    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusecure.{a,so*} $(1)/usr/lib/
    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcommoncpp.{a,so*} $(1)/usr/lib/
    $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
    $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/commoncpp.pc $(1)/usr/lib/pkgconfig/
    $(INSTALL_DIR) $(1)/usr/bin
    $(CP) $(PKG_INSTALL_DIR)/usr/bin/ucommon-config $(1)/usr/bin/
    $(CP) $(PKG_INSTALL_DIR)/usr/bin/commoncpp-config $(1)/usr/bin/
endef

define Package/ucommon/install
    $(INSTALL_DIR) $(1)/usr/lib
    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcommoncpp.so.* $(1)/usr/lib/
    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libucommon.so.* $(1)/usr/lib/
    $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusecure.so.* $(1)/usr/lib/
endef

$(eval $(call BuildPackage,ucommon))



Now building sipwitch that depends upon ucommon cannot find file ucommon-config which I verified is there in the build tree. Here is the output:



......
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of mips-openwrt-linux-uclibc-gcc... gcc3
checking dependency style of mips-openwrt-linux-uclibc-g++... gcc3
checking for C/C++ restrict keyword... __restrict
checking for working volatile... yes
checking for inline... inline
checking for pkg-config... /home/yossi/openwrt/trunk/staging_dir/host/bin/pkg-config
checking openssl/openssl.h usability... no
checking openssl/openssl.h presence... no
checking for openssl/openssl.h... no
checking for ucommon-config... none
configure: error: "required ucommon library missing"
make[2]: *** [/home/yossi/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/sipwitch-1.2.4/.configured_] Error 1
make[2]: Leaving directory `/home/yossi/openwrt/myfeed/sipwitch'
make[1]: *** [package/feeds/custom/sipwitch/compile] Error 2
make[1]: Leaving directory `/home/yossi/openwrt/trunk'
make: *** [package/sipwitch/compile] Error 2
[yossi@maps trunk]$



and  the Makefile:



#
# Copyright (C) 2006-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=sipwitch
PKG_VERSION:=1.2.4
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(BUILD_DIR)/sipwitch-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/sipwitch/
PKG_MD5SUM:=6119cecb062ba4d0af18b427b01c41e2
PKG_CAT:=zcat

PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk

define Package/sipwitch
    SECTION:=net
    CATEGORY:=Network
    SUBMENU:=Telephony
    DEPENDS:=+libosip2 +libeXosip +ucommon
    TITLE:=Sipwitch
    URL:=http://www.gnu.org/software/sipwitch/
endef

define Package/sipwitch/description
    Sipwitch is a simple sip registrar and proxy server.
endef

define Build/Configure
    $(call Build/Configure/Default, \
        --disable-qt \
        --with-libosip-prefix="$(STAGING_DIR)/usr" \
        --with-libeXosip-prefix="$(STAGING_DIR)/usr" \
        --with-ucommon-prefix="$(STAGING_DIR)/usr" \
        --with-linux-headers=$(LINUX_DIR)\
    )
endef

define Package/sipwitch/install
    $(INSTALL_DIR) $(1)/usr/sbin
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/sipwitch $(1)/usr/sbin/
endef

$(eval $(call BuildPackage,sipwitch))


I might add that package sipwitch also has other dependencies which have been successfully built. It is just this one, ucommon that is causing me grief.

Thanks for all the help. I think I am almost there.

Perazim

(Last edited by perazim on 21 Nov 2012, 15:02)

sorry for this thread necro. Did anyone manage to get sipwitch running on OpenWRT?

The discussion might have continued from here.