[Asterisk-Users] Compiling * on OpenBSD 3.5

andrewg at felinemenace.org andrewg at felinemenace.org
Fri Jul 30 19:02:35 MST 2004


On Fri, Jul 30, 2004 at 06:33:14PM -0700, mpwspam-digiumlist at yahoo.com wrote:
> Hi,
>  
> Has anyone had any success?  After a clean install of OpenBSD, I do the following:-
> 
> pkg_add ftp://rt.fm/pub/OpenBSD/3.5/packages/i386/gmake-3.80.tgz
> 
> pkg_add ftp://rt.fm/pub/OpenBSD/3.5/packages/i386/bison-1.35p1.tgz
> 
> pkg_add ftp://rt.fm/pub/OpenBSD/3.5/packages/i386/ruby-ncurses-0.8.tgz
> 
> Then, I get (via CVS) the asterisk source..
> 
>  
> 
> cd /usr/src/asterisk
> 
> /usr/local/bin/gmake clean
> 
> /usr/local/bin/gmake install
> 
>  
> 
> This fails at :-
> 
> gcc -g  -o asterisk -Wl,-E  io.o sched.o logger.o frame.o loader.o config.o channel.o translate.o file.o say.o pbx.o cli.o md5.o term.o ulaw.o alaw.o callerid.o fskmodem.o image.o app.o cdr.o tdd.o acl.o rtp.o manager.o asterisk.o ast_expr.o dsp.o chanvars.o indications.o autoservice.o db.o privacy.o astmm.o enum.o srv.o dns.o aescrypt.o aestab.o aeskey.o utils.o  editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a -lncurses -lm -lssl
> 
> 
> with lots of errors like:-
> 
> sched.o: In function `ast_sched_add':
> /usr/src/asterisk/asterisk/sched.c:244: undefined reference to `pthread_mutex_lock'
> /usr/src/asterisk/asterisk/sched.c:259: undefined reference to `pthread_mutex_unlock'
> sched.o: In function `ast_sched_runq':
> /usr/src/asterisk/asterisk/sched.c:351: undefined reference to `pthread_mutex_lock'
> /usr/src/asterisk/asterisk/sched.c:378: undefined reference to `pthread_mutex_unlock'
> /usr/src/asterisk/asterisk/sched.c:380: undefined reference to `pthread_mutex_lock'
> /usr/src/asterisk/asterisk/sched.c:399: undefined reference to `pthread_mutex_unlock'
> sched.o: In function `sched_context_create':
> /usr/src/asterisk/asterisk/include/asterisk/lock.h:299: undefined reference to `pthread_mutexattr_init'
> /usr/src/asterisk/asterisk/include/asterisk/lock.h:300: undefined reference to `pthread_mutexattr_settype'
> /usr/src/asterisk/asterisk/include/asterisk/lock.h:301: undefined reference to `pthread_mutex_init'
> sched.o: In function `sched_context_destroy':
> 

Modify the above Makefile (or CFLAGS) to include -pthread for gcc (or possibly,
-lpthread, but I think in general for BSD's its -pthread).

> 
>  
> 
>  
> 
> and
> 
>  
> 
>  
> 
> /usr/lib/libssl.so.8.0: undefined reference to `BN_clear_free'
> /usr/lib/libssl.so.8.0: undefined reference to `X509_PURPOSE_set'
> /usr/lib/libssl.so.8.0: undefined reference to `d2i_X509_NAME'
> /usr/lib/libssl.so.8.0: undefined reference to `RSA_flags'
> /usr/lib/libssl.so.8.0: undefined reference to `d2i_X509'
> /usr/lib/libssl.so.8.0: undefined reference to `asn1_GetSequence'
> /usr/lib/libssl.so.8.0: undefined reference to `RSA_size'
> /usr/lib/libssl.so.8.0: undefined reference to `RAND_pseudo_bytes'
> /usr/lib/libssl.so.8.0: undefined reference to `BIO_s_connect'
> /usr/lib/libssl.so.8.0: undefined reference to `EVP_PKEY_free'
> /usr/lib/libssl.so.8.0: undefined reference to `X509_TRUST_set'
> /usr/lib/libssl.so.8.0: undefined reference to `HMAC_Update'
> /usr/lib/libssl.so.8.0: undefined reference to `X509_STORE_CTX_set_verify_cb'
> /usr/lib/libssl.so.8.0: undefined reference to `ERR_load_strings'
> /usr/lib/libssl.so.8.0: undefined reference to `EVP_md2'
> /usr/lib/libssl.so.8.0: undefined reference to `HMAC_CTX_init'
> /usr/lib/libssl.so.8.0: undefined reference to `EVP_get_digestbyname'
> collect2: ld returned 1 exit status
> gmake: *** [asterisk] Error 1
> 
> 
>  

Try adding -lcrypto to the above Makefile entry (and/or CFLAGS) as well.


> 
>  
> 
> Does anyone have any ideas?  I'm pretty sure I'm missing something simple...  possibly OpenSSL related...
> 
>  
> 
> Many thanks!
> 
>  
> 
> Michael.
> 



More information about the asterisk-users mailing list