pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: comms/asterisk18 build failure on current/amd64

In article <>,
Sverre Froyen  <> wrote:
>I cannot get comms/asterisk18 to build on a fairly recent current amd64. It 
>fails with:
>   [LD] ../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/libdb1.a  -> asterisk
>ld: asterisk: local symbol `__progname' in /usr/lib/crt0.o is referenced by 
>ld: final link failed: Bad value
>Looks like __progname is defined in  /usr/lib/crt0.o and used by libc.
>$ gcc --version
>gcc (NetBSD nb2 20110806) 4.5.3
>$ ld --version
>GNU ld (NetBSD Binutils nb1) 2.21.1
>Is this something obvious or should I try to dig deeper?

It is NetBSD that is broken here. Unfortunately there are 2 symbols referenced
by libc and defined in crt0: "__progname" and "environ". I meant to move them
to libc, but have been too afraid of the implications.

What's happening here (I am guessing), is that what you are trying to compile
uses a linker map file to hide its symbols and it looks something like:


So what's happening is that "__progname", and "environ" end up becoming local,
and so when they are referenced from libc the fun message above appears.

Until I figure out (or someone else does) how to solve this permanently,
adding the two symbols to the global section of the linker map file should
get you going.


Home | Main Index | Thread Index | Old Index