Modify

Opened 7 years ago

Closed 7 years ago

#8936 closed defect (wontfix)

Impossible compiling chan_datacard for asterisk-1.6.2.14 --- Broadcom BCM63XX platform

Reported by: fpaliuc@… Owned by: developers
Priority: normal Milestone: Backfire 10.03.1
Component: packages Version: Backfire 10.03.1 RC4
Keywords: Cc:

Description

Hello!

I'm trying to compile chan_datacard for asterisk-1.6.2.14 (Backfire, latest trunk, for Broadcom BCM63XX paltform).

I saw the latest trunk versin contains only asterisk 1.8.x but the makefile of chan_datacard that was tested and reported as working is ment for asterisk-1.6.2.14

After fixing some iconv.h and popt problems, I get this error (could remain others too):

{{{ /home/felix/Desktop/openwrt-backfire/staging_dir/toolchain-mips_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/gcc/mips-openwrt-linux-uclibc/4.3.3/../../../../mips-openwrt-linux-uclibc/bin/ld: app.o: relocation R_MIPS_HI16 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

app.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[3]: * [chan_datacard.so] Error 1
make[3]: Leaving directory `/home/felix/Desktop/openwrt-backfire/build_dir/target-mips_uClibc-0.9.30.1/chan_datacard-1.0.r286'
make[2]:
* /home/felix/Desktop/openwrt-backfire/build_dir/target-mips_uClibc-0.9.30.1/chan_datacard-1.0.r286/.built Error 2
make[2]: Leaving directory `/home/felix/Desktop/openwrt-backfire/package/chan_datacard'
make[1]: * [package/chan_datacard/compile] Error 2
make[1]: Leaving directory `/home/felix/Desktop/openwrt-backfire'
make:
* [package/chan_datacard-compile] Error 2

}}}

The Makefile from chan_datacard that I'm using to compile is:

#
# Copyright (C) 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:=asterisk16-chan-datacard
PKG_REV:=286
PKG_VERSION:=1.0.r$(PKG_REV)
PKG_RELEASE:=170

#PKG_SOURCE_URL:=http://datacard.googlecode.com/svn/trunk/
#PKG_SOURCE_VERSION:=$(PKG_RELEASE)
#PKG_SOURCE_PROTO:=svn
# or
PKG_SOURCE:=chan_datacard-$(PKG_VERSION).tgz
PKG_SOURCE_URL=http://datacard.googlecode.com/files/
PKG_MD5SUM:=6697fece15734f061834cd84182b46d1

PKG_SOURCE_SUBDIR:=chan_datacard-$(PKG_VERSION)
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)

WITH_ASTERISK=asterisk-1.6.2.14

include $(INCLUDE_DIR)/package.mk

define Package/asterisk16-chan-datacard

SUBMENU:=asterisk16 (Complete Open Source PBX), v1.6.x
SECTION:=net
CATEGORY:=Network
URL:=http://www.asterisk.org/
MAINTAINER:=Hans Zandbelt <hans.zandbelt@…>
DEPENDS:= +asterisk16 +libiconv
TITLE:=Huawei UMTS 3G datacards support

endef

define Package/asterisk16-chan-datacard/description

Asterisk channel driver for Huawei UMTS 3G datacards

endef

MAKE_ARGS:= \

CC="$(TARGET_CC)" \
LD="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS) -DLOW_MEMORY -D_GNU_SOURCE $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libiconv/include -I$(BUILD_DIR)/$(WITH_ASTERISK)/include -DHAVE_CONFIG_H -I." \
LDFLAGS="$(TARGET_LDFLAGS)" \
DESTDIR="$(PKG_INSTALL_DIR)/usr/lib/asterisk/modules"

# for svn
# (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
# autoconf \
# );
# $(call Build/Configure/Default)

define Build/Configure

$(call Build/Configure/Default, \

--with-asterisk=$(BUILD_DIR)/$(WITH_ASTERISK)/include \
$(MAKE_ARGS) \

)

endef

define Build/Compile

mkdir -p $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules
$(MAKE) -C "$(PKG_BUILD_DIR)" $(MAKE_ARGS) all install

endef

define Package/asterisk16-chan-datacard/conffiles
/etc/asterisk/datacard.conf
endef

define Package/asterisk16-chan-datacard/install

$(INSTALL_DIR) $(1)/etc/asterisk
$(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/datacard.conf $(1)/etc/asterisk/
$(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_datacard.so $(1)/usr/lib/asterisk/modules/

endef

$(eval $(call BuildPackage,asterisk16-chan-datacard))

Attachments (1)

Makefile (2.3 KB) - added by anonymous 7 years ago.

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by anonymous

comment:1 Changed 7 years ago by zandbelt

  • Resolution set to wontfix
  • Status changed from new to closed

asterisk 1.6.x was removed from the trunk and replaced by asterisk 1.8; follow up in #8935 that has a patch for 1.8

comment:2 Changed 7 years ago by zandbelt

BTW: chan-datacard should work for 1.8; see also http://wiki.e1550.mobi/doku.php?id=installation

comment:3 Changed 7 years ago by fpaliuc@…

  • Resolution wontfix deleted
  • Status changed from closed to reopened

I'm using the patch provided but I get this error:

32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float -fpic -c -o popt.lo test -f 'popt.c' || echo './'popt.c
./libtool: 323: s,.*/g: not found
./libtool: 323: s,
.*/g: not found
./libtool: 859: -e: not found
* Warning: inferring the mode of operation is deprecated.
* Future versions of Libtool will require --mode=MODE be specified.
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
./libtool: 6991: -e: not found
: compile: cannot determine name of library object from `'
make[5]: * [popt.lo] Error 1
make[5]: Leaving directory `/home/felix/Desktop/backfire/build_dir/target-mips_uClibc-0.9.30.1/popt-1.7'
make[4]:
* [all-recursive] Error 1
make[4]: Leaving directory `/home/felix/Desktop/backfire/build_dir/target-mips_uClibc-0.9.30.1/popt-1.7'
make[3]: * [all] Error 2
make[3]: Leaving directory `/home/felix/Desktop/backfire/build_dir/target-mips_uClibc-0.9.30.1/popt-1.7'
make[2]:
* /home/felix/Desktop/backfire/build_dir/target-mips_uClibc-0.9.30.1/popt-1.7/.built Error 2
make[2]: Leaving directory `/home/felix/Desktop/backfire/feeds/packages/libs/popt'
make[1]: * [package/feeds/packages/popt/compile] Error 2
make[1]: Leaving directory `/home/felix/Desktop/backfire'
make:
* [package/chan_datacard-compile] Error 2

comment:4 Changed 7 years ago by fpaliuc@…

After copying a different makefile from an old version of popt-1.7 the compiling goes ahead but then stops with another error:

In file included from helpers.c:18:
/home/felix/Desktop/backfire/staging_dir/target-mips_uClibc-0.9.30.1/usr/include/asterisk-1.8/include/asterisk/lock.h:137: error: expected specifier-qualifier-list before 'pthread_rwlock_t'
make[3]: * [helpers.o] Error 1
make[3]: Leaving directory `/home/felix/Desktop/backfire/build_dir/target-mips_uClibc-0.9.30.1/chan_datacard-1.0.r286'
make[2]:
* /home/felix/Desktop/backfire/build_dir/target-mips_uClibc-0.9.30.1/chan_datacard-1.0.r286/.built Error 2
make[2]: Leaving directory `/home/felix/Desktop/backfire/package/chan_datacard'
make[1]: * [package/chan_datacard/compile] Error 2
make[1]: Leaving directory `/home/felix/Desktop/backfire'
make:
* [package/chan_datacard-compile] Error 2

comment:5 Changed 7 years ago by Crunch

I have the same errors ...

comment:6 Changed 7 years ago by anonymous

Update to latest trunk and be sure to make clean your old stuff first (uclibc should be v0.9.2)

comment:7 Changed 7 years ago by anonymous

Also: take this up in the appropriate 1.8 ticket...

comment:8 Changed 7 years ago by fpaliuc@…

OK, I've moved to the 1.8 ticket. I've downloaded again the entire trunk (latest) and tried to recompile. I get the same error:

In file included from helpers.c:18: /home/felix/Desktop/backfire/staging_dir/target-mips_uClibc-0.9.30.1/usr/include/asterisk-1.8/include/asterisk/lock.h:137: error: expected specifier-qualifier-list before 'pthread_rwlock_t' make[3]: * [helpers.o] Error 1 make[3]: Leaving directory /home/felix/Desktop/backfire/build_dir/target-mips_uClibc-0.9.30.1/chan_datacard-1.0.r286' make[2]: *** /home/felix/Desktop/backfire/build_dir/target-mips_uClibc-0.9.30.1/chan_datacard-1.0.r286/.built Error 2 make[2]: Leaving directory /home/felix/Desktop/backfire/package/chan_datacard' make[1]: * [package/chan_datacard/compile] Error 2 make[1]: Leaving directory `/home/felix/Desktop/backfire' make: * [package/chan_datacard-compile] Error 2

I don't know how to change uclibc from v0.9.30.1 -> v0.9.2 as u stated. The version I have it's downloaded when downloading the trunk.

Thanks

comment:9 Changed 7 years ago by zandbelt

  • Resolution set to wontfix
  • Status changed from reopened to closed

obsolete: see #8935

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.