[Asterisk-Users] Compiling VD_app_conference for x86_64

Ricardo Martins rpoppi77 at gmail.com
Tue Jun 6 07:28:46 MST 2006


Hi Erick. Just for record I could compile the application but could not 
use. It was crashing the asterisk.

Then I downloaded the 0.5 release and used the 64_Makefile to compile. 
Now its working on test environment but until now everything is ok.
(http://optusnet.dl.sourceforge.net/sourceforge/astguiclient/VD_app_conference_0.5.zip)

Thanks for your help and save the list!

Rgds,

Ricardo.


Erick Perez wrote:

> They key point is to disable de x86 CFLAGS and add this one>
>
> CFLAGS += -march=k8 -fPIC
>
> k8 is the machine type for x86_64
>
> On 6/4/06, Erick Perez <eaperezh at gmail.com> wrote:
>
>> This is my makefile, it compiled ok. I will test it tomorrow but if
>> you have somewhere to test today, let me know.
>>
>>
>>
>> # $Id: Makefile,v 1.9 2005/10/27 17:53:35 stevek Exp $
>>
>> #
>> # Makefile, based on the Asterisk Makefile, Coypright (C) 1999, Mark 
>> Spencer
>> #
>> # Copyright (C) 2002,2003 Junghanns.NET GmbH
>> #
>> # Klaus-Peter Junghanns <kapejod at ns1.jnetdns.de>
>> #
>> # This program is free software and may be modified and
>> # distributed under the terms of the GNU Public License.
>> #
>>
>> .EXPORT_ALL_VARIABLES:
>>
>> #
>> # app_conference defines which can be passed on the command-line
>> #
>>
>> INSTALL_PREFIX := /usr
>> INSTALL_MODULES_DIR := $(INSTALL_PREFIX)/lib/asterisk/modules
>>
>> ASTERISK_INCLUDE_DIR := 
>> $(HOME)/sources/asterisk02/asterisk-1.2.8/include
>>
>> # turn app_conference debugging on or off ( 0 == OFF, 1 == ON )
>> APP_CONFERENCE_DEBUG := 1
>>
>> # 0 = OFF 1 = astdsp 2 = speex
>> SILDET := 2
>>
>> #
>> # app_conference objects to build
>> #
>>
>> OBJS = app_conference.o conference.o member.o frame.o cli.o
>> SHAREDOS = app_conference.so
>>
>> #
>> # standard compile settings
>> #
>>
>> PROC = $(shell uname -m)
>> INSTALL = install
>> CC = gcc
>>
>> INCLUDE = -I$(ASTERISK_INCLUDE_DIR)
>> LIBS = -ldl -lpthread -lm
>> DEBUG := -g
>>
>> CFLAGS = -pipe -Wall -Wmissing-prototypes -Wmissing-declarations
>> $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE
>> #CFLAGS += -O2
>> #CFLAGS += -O3 -march=pentium3 -msse -mfpmath=sse,387 -ffast-math
>> # PERF: below is 10% faster than -O2 or -O3 alone.
>> #CFLAGS += -O3 -ffast-math -funroll-loops
>> # below is another 5% faster or so.
>> CFLAGS += -O3 -ffast-math -funroll-all-loops -fprefetch-loop-arrays
>> -fsingle-precision-constant
>>
>> # this is fun for PPC
>> #CFLAGS += -mcpu=7450 -faltivec -mabi=altivec -mdynamic-no-pic
>>
>> # this is fun for x86
>> # The line below was commented by Erick Perez eaperezh at gmail.com
>> #CFLAGS += -march=pentium3 -msse -mfpmath=sse,387
>>
>>
>> # adding -msse -mfpmath=sse has little effect.
>> #CFLAGS += -O3 -msse -mfpmath=sse
>> #CFLAGS += $(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc
>> /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
>> CFLAGS += $(shell if uname -m | grep -q ppc; then echo 
>> "-fsigned-char"; fi)
>> CFLAGS += -DCRYPTO
>> # The line below was added by Erick Perez eaperezh at gmail.com
>> CFLAGS += -march=k8 -fPIC
>>
>> ifeq ($(APP_CONFERENCE_DEBUG), 1)
>> CFLAGS += -DAPP_CONFERENCE_DEBUG
>> endif
>>
>> #
>> # additional flag values for silence detection
>> #
>>
>> ifeq ($(SILDET), 2)
>> OBJS += libspeex/preprocess.o libspeex/misc.o libspeex/smallft.o
>> CFLAGS += -Ilibspeex -DSILDET=2
>> endif
>>
>> ifeq ($(SILDET), 1)
>> CFLAGS += -DSILDET=1
>> endif
>>
>> OSARCH=$(shell uname -s)
>> ifeq (${OSARCH},Darwin)
>> SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
>> else
>> SOLINK=-shared -Xlinker -x
>> endif
>>
>> #
>> # targets
>> #
>>
>> all: $(SHAREDOS)
>>
>> clean:
>>        rm -f *.so *.o $(OBJS)
>>
>> app_conference.so : $(OBJS)
>>        $(CC) -pg -shared -Xlinker -x -o $@ $(OBJS)
>>
>> vad_test: vad_test.o libspeex/preprocess.o libspeex/misc.o 
>> libspeex/smallft.o
>>        $(CC) $(PROFILE) -o $@ $^ -lm
>>
>> install: all
>>        for x in $(SHAREDOS); do $(INSTALL) -m 755 $$x
>> $(INSTALL_MODULES_DIR) ; done
>>        cp -f *.gsm /var/lib/asterisk/sounds
>>        cp -f *.wav /var/lib/asterisk/sounds
>>
>> #       /var/horizon/mojo/lib/horizoncmd restart asterisk
>> # make sure you restart asterisk after make install
>>
>> # config: all
>> #       cp conf.conf /etc/asterisk/
>>
>>
>> *********end of makefile****************
>>
>> On 6/4/06, Ricardo Martins <rpoppi77 at gmail.com> wrote:
>> > Do anybody could compile app_conference on x86_64??? I tryied with two
>> > versions of app_conference and got the same problem on compiling:
>> >
>> > relocation R_X86_64_32 against `a local symbol' can not be used when
>> > making a shared recompile with -fPIC
>> > app_conference.o: could not read symbols: Bad value"
>> >
>> >
>> > ENVIRONMENT:
>> > 
>> ------------------------------------------------------------------------------------------- 
>>
>> > Machine: DELL PE-2850 with two processors Xeon 3.0GHz
>> > Kernel: 2.6.9-34.0.1.ELsmp
>> > Version of app_conference (Both):
>> > "http://www.eflo.net/files/VD_app_conference_0.4.zip" or
>> > "http://www.eflo.net/files/app_conference.tar.gz"
>> > 
>> ------------------------------------------------------------------------------------------- 
>>
>> >
>> > COMPLETE output of compilation:
>> > 
>> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
>>
>> > gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -g
>> > -I/root/local/asterisk/asterisk/include  -D_REENTRAN_SOURCE -O3
>> > -ffast-math -funroll-all-loops -fprefetch-loop-arrays
>> > -fsingle-precision-constant  -DCRYPTO -DAPP_CONFERUG   -c -o
>> > app_conference.o app_conference.c
>> > gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -g
>> > -I/root/local/asterisk/asterisk/include  -D_REENTRAN_SOURCE -O3
>> > -ffast-math -funroll-all-loops -fprefetch-loop-arrays
>> > -fsingle-precision-constant  -DCRYPTO -DAPP_CONFERUG   -c -o
>> > conference.o conference.c
>> > gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -g
>> > -I/root/local/asterisk/asterisk/include  -D_REENTRAN_SOURCE -O3
>> > -ffast-math -funroll-all-loops -fprefetch-loop-arrays
>> > -fsingle-precision-constant  -DCRYPTO -DAPP_CONFERUG   -c -o member.o
>> > member.c
>> > member.c: In function `process_incoming':
>> > member.c:125: warning: implicit declaration of function 
>> `ast_dtmf_stream'
>> > gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -g
>> > -I/root/local/asterisk/asterisk/include  -D_REENTRAN_SOURCE -O3
>> > -ffast-math -funroll-all-loops -fprefetch-loop-arrays
>> > -fsingle-precision-constant  -DCRYPTO -DAPP_CONFERUG   -c -o 
>> frame.o frame.c
>> > gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -g
>> > -I/root/local/asterisk/asterisk/include  -D_REENTRAN_SOURCE -O3
>> > -ffast-math -funroll-all-loops -fprefetch-loop-arrays
>> > -fsingle-precision-constant  -DCRYPTO -DAPP_CONFERUG   -c -o cli.o 
>> cli.c
>> > gcc -pg -shared -Xlinker -x -o app_conference.so app_conference.o
>> > conference.o member.o frame.o cli.o
>> > /usr/bin/ld: app_conference.o: relocation R_X86_64_32 against `a local
>> > symbol' can not be used when making a shared recompile with -fPIC
>> > app_conference.o: could not read symbols: Bad value
>> > collect2: ld returned 1 exit status
>> > make: ** [app_conference.so] Erro 1
>> > 
>> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
>>
>> >
>> > _______________________________________________
>> > --Bandwidth and Colocation provided by Easynews.com --
>> >
>> > Asterisk-Users mailing list
>> > To UNSUBSCRIBE or update options visit:
>> >    http://lists.digium.com/mailman/listinfo/asterisk-users
>> >
>>
>>
>> -- 
>>
>> -------------------------------------------
>> Erick Perez
>> Linux User 376588
>> http://counter.li.org/  (Get counted!!!)
>> Panama, Republic of Panama
>>
>
>




More information about the asterisk-users mailing list