[asterisk-dev] problem in cross compiling asterisk

Mark Michelson mmichelson at digium.com
Mon Apr 28 07:40:12 CDT 2014

I did a Google search and a common result of "cannot find -lresolv" is the
use of FreeBSD. Are you compiling on a FreeBSD system? My understanding of
FreeBSD is that this linker flag simply is not needed, so you may be safe
to just remove the flag from the Makefile. If that does not work for you,
then the only other workaround I can think of at the moment is to compile
on Linux instead. The core Asterisk developers use a variety of Linux
distros, so you should be fine to use whichever you are most comfortable

On Sat, Apr 26, 2014 at 4:12 PM, Mohammed Essaid Mezerreg <
moh.essaid at gmail.com> wrote:

> 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- 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140428/205b3417/attachment-0001.html>

More information about the asterisk-dev mailing list