Package: asterisk
Version: 1:1.8.13.1~dfsg-1
Severity: wishlist
Tags: sid patch
User: debian-powerpc...@breakpoint.cc
Usertags: powerpcspe

Hi,

asterisk FTBFS on powerpcspe[1] like this:

[...]
/«PKGBUILDDIR»/build_tools/make_linker_version_script asterisk 
powerpc-linux-gnuspe-gcc  -o asterisk -Wl,--export-dynamic 
-Wl,--version-script,asterisk.exports -Wl,--dynamic-list,asterisk.dynamics  
-Wl,-z,relro   ../res/res_adsi.o abstract_jb.o acl.o alaw.o aoc.o app.o 
ast_expr2.o ast_expr2f.o asterisk.o astfd.o astmm.o astobj2.o audiohook.o 
autochan.o autoservice.o bridging.o callerid.o ccss.o cdr.o cel.o channel.o 
chanvars.o cli.o config.o data.o datastore.o db.o devicestate.o dial.o dns.o 
dnsmgr.o dsp.o enum.o event.o features.o file.o fixedjitterbuf.o frame.o 
framehook.o fskmodem.o global_datastores.o hashtab.o heap.o http.o image.o 
indications.o io.o jitterbuf.o loader.o lock.o logger.o manager.o md5.o 
netsock.o netsock2.o pbx.o plc.o poll.o privacy.o rtp_engine.o say.o sched.o 
security_events.o sha1.o slinfactory.o srv.o ssl.o stdtime/localtime.o 
strcompat.o strings.o stun.o syslog.o taskprocessor.o tcptls.o tdd.o term.o 
test.o threadstorage.o timing.o translate.o udptl.o ulaw.o utils.o version.o 
xml.o xmldoc.o editline/libedit.a db1-ast/l
 ibdb1.a  buildinfo.o -lssl -lcrypto -lc  -L/usr/lib -lxml2  -ltermcap  -lm  
channel.o: In function `__ast_queue_frame':
/«PKGBUILDDIR»/main/channel.c:1511: undefined reference to `pthread_kill'
channel.o: In function `__init_state2str_threadbuf':
/«PKGBUILDDIR»/main/channel.c:99: undefined reference to `pthread_key_create'
channel.o: In function `ast_threadstorage_get':
/«PKGBUILDDIR»/include/asterisk/threadstorage.h:173: undefined reference to 
`pthread_once'
/«PKGBUILDDIR»/include/asterisk/threadstorage.h:173: undefined reference to 
`pthread_getspecific'
/«PKGBUILDDIR»/include/asterisk/threadstorage.h:173: undefined reference to 
`pthread_setspecific'
[...]

This is due to -lpthread missing in the parameters upon linking the asterisk
executable. Which in turn can be traced back to incomplete list of OSARCH
heuristics which determine where to add respective linker options.

The attached patch fixes this.

Thanks in advance,

Roland

[1] http://wiki.debian.org/PowerPCSPEPort


-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.7.0 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash
--- asterisk-1.8.13.1~dfsg/main/Makefile.orig	2013-02-23 19:37:08.772815230 +0000
+++ asterisk-1.8.13.1~dfsg/main/Makefile	2013-02-23 19:37:27.236819819 +0000
@@ -34,7 +34,7 @@
 AST_LIBS += $(BKTR_LIB)
 AST_LIBS += $(LIBXML2_LIB) 
 
-ifneq ($(findstring $(OSARCH), linux-gnu uclinux linux-uclibc linux-gnueabi linux-gnueabihf kfreebsd-gnu),)
+ifneq ($(findstring $(OSARCH), linux-gnu linux-gnuspe uclinux linux-uclibc linux-gnueabi linux-gnueabihf kfreebsd-gnu),)
   ifneq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
   AST_LIBS+=-ldl
   endif

Reply via email to