[asterisk-dev] Segmentation fault error?

2014-05-15 Thread Mohammed Essaid Mezerreg
hello,

I am trying to lanch asterisk in opnerisc 1200 processor in his simulator
or1ksim,

- Cross-compile  install glibc   [*]
- Cross-compile  install zlib[*]
- Cross-compile  install ncurses 5.9 [*]
- Cross-compile  install openssl [*]
- Cross-compile  install asterisk[*]
- Configure linux + asterisk on it [*]
- Running asterisk [X]

when I tried to run asterisk as asterik -cvvv or with c option only I get
a
Segmentation faul error
with c and g option Segmentation faul (core dump) error.

I don't get it?
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] problem in cross compiling asterisk

2014-04-28 Thread Mohammed Essaid Mezerreg
no, I am not using FreeBSD, I am using CentOS 6.5, and I tried to omit the
-lresolv but it didn't work but lot of errors keep showing off because of
this changement. I am using the uClibc toolchains from opencores to achieve
this coss compiling process and before this error I encountred lot of some
other errors like this one which prove that asterisk don't support uclibc
yet:

I had some error in compiling ael_lex the errors comes from the ael.flex in
this line:

   [CC] ael/ael_lex.c - ael/ael_lex.o
ael.flex: In function ‘ael_yylex’:
ael.flex:601:43: error: ‘GLOB_BRACE’ undeclared (first use in this function)
ael.flex:601:43: note: each undeclared identifier is reported only once for
each function it appears in
make[1]: *** [ael/ael_lex.o] Error 1
make: *** [res] Error 2

and when I looked in the ael.flex I find this:

#ifdef SOLARIS
glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, globbuf);
#else
glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL,
globbuf);
#endif

and the else block is the place where the compilation stack and when I went
to the configuration result I found that the checking action fro
GLOB_NOMAGIC and GLOB_BRACE is a no.

after that I went to the glob.h header in my toolchain to find this line:

#if 1 /* uClibc gnu glob does not support these */
# define GLOB_ALTDIRFUNC (1  9)/* Use gl_opendir et al functions.  */
# define GLOB_BRACE (1  10)/* Expand {a,b} to a b.  */
# define GLOB_NOMAGIC (1  11)/* If no magic chars, return the
pattern.  */
# define GLOB_TILDE (1  12)/* Expand ~user and ~ to home directories.
*/
# define GLOB_ONLYDIR (1  13)/* Match only directories.  */
# define GLOB_TILDE_CHECK (1  14)/* Like GLOB_TILDE but return an error
  if the user name is not available.  */

so these constant are not supported by uClibc which mean that asterisk
didn't treat uclibc cases or in another way asterisk still don't support
uclibc.

I solved this problem anyway but still the problem in linking the asterisk
object in the end of the process
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

[asterisk-dev] problem in cross compiling asterisk

2014-04-26 Thread Mohammed Essaid Mezerreg
hello,
while cross-compling asterisk to run on openrisc 1200 I recieved this errors

[LD] abstract_jb.o acl.o adsi.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/libdb1.a  - asterisk
/opt/or1k-toolchain/lib/gcc/or1k-linux-uclibc/4.9.0/../../../../or1k-linux-uclibc/bin/ld:
cannot find -lresolv
utils.o: In function `ast_gethostbyname':
/home/mohessaid/asterisk-1.8.19.0/main/utils.c:228: warning:
gethostbyname_r is obsolescent, use getnameinfo() instead.
collect2: error: ld returned 1 exit status
make[1]: *** [asterisk] Error 1
make: *** [main] Error 2

can anyone please help with a solution
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

[asterisk-dev] cross compile asterisk for openrisc 1200

2014-04-14 Thread Mohammed Essaid Mezerreg
hello,
I want to cross compile asterisk to work on embedded linux running on the
openrisc 1200 cpu from opencores.org. I found the cpu is recognized and his
name is listed in the cases in configure.sub but after trying to cross
compile him in encountered these problems:

the configure file stops in ncurses (so I cross compile ncurses and
mentioned the directory by using --with-ncurses).
after that the configuration stopped in libxml ( so I disabled this feature
explicitly using --disable-xmldoc), after this change the configure file
complete with success.
but after trying to execute make stopped by ascanary.c - ascanary.o and
says : utime.h no such file or directory) so I followed the way of a blind
and went to this file changed the utime.h by utime.h but the problem
still.

so after looking deeply and make some test I figure out the problem but I
don't know how to fix it:

I found that the toolchain after compilation split this manner:
the root file or the top directory of the toolchain in my case
/opt/openrisc/
under this directory there is a bin, include, lib and the commons
directories in all toolchains, but also there are an or32-elf and
or32-linux directories.
the problems is here:
these two directories contain the bin, include, lib and all the directories
in the parent one and after comparing between the include of or32-linux and
the include of the parent I found that the first one contain most of the
headers and files that asterisk use.

after changing the ascanary.c by replacing include utime.h by include
/opt/openrisc/or32-linux/include/linux/utime.h the make continue but
stopped in undeclared function first use in this file and this function is
one of sys/types and time.h some other files included in ascanary.c

so the conclusion I have made from all this that make and configure can't
find these headers and to be aware the checking action for utime.h in
configure gives the result no and the same thing with some other one
 which are not in the include of the parent directory but they are in
or32-linux's include.
I wonder if someone can help me out from this problem.

I used this to configure:
./configure --host=or32-linux CC=or32-linux-gcc CXX=or32-linux-g++
AR=or32-linux-ar AS=or32-linux-as --with-ncurses=/home/ncursess
--disable-xmldoc

and I tried to used CLAGS='-I /opt/openrisc/or32-linux/include' but no
progress.

and something else the difference the utils from or32-elf are used to
compile bare metal applications for the processor and or32-linux to compile
applications for embedded linux. you can find all the information in
opencores.org

hope you can help me.
thank you
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev