[asterisk-dev] beta2 compile failure

Matthew Jordan mjordan at digium.com
Tue Sep 23 10:24:59 CDT 2014


On Tue, Sep 23, 2014 at 10:11 AM, Paul Albrecht <palbrecht at glccom.com>
wrote:

>
> On Sep 23, 2014, at 9:25 AM, Joshua Colp <jcolp at digium.com> wrote:
>
> > Paul Albrecht wrote:
> >>
> >> On Sep 22, 2014, at 3:47 PM, Joshua Colp <jcolp at digium.com
> >> <mailto:jcolp at digium.com>> wrote:
> >>
> >>> Paul Albrecht wrote:
> >>>>
> >>>> Asterisk 13 beta2 compile fails:
> >>>>
> >>>> .
> >>>> .
> >>>> .
> >>>> [CC] chan_pjsip.c -> chan_pjsip.o
> >>>> [CC] pjsip/dialplan_functions.c -> pjsip/dialplan_functions.o
> >>>> [LD] chan_pjsip.o pjsip/dialplan_functions.o -> chan_pjsip.so
> >>>>
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld:
> >>>>
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../lib64/libpjsip-ua-x86_64-pc-linux-gnu.a(sip_inv.o):
> >>>> relocation R_X86_64_32S against `.rodata' can not be used when making
> a
> >>>> shared object; recompile with -fPIC
> >>>>
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../lib64/libpjsip-ua-x86_64-pc-linux-gnu.a:
> >>>> could not read symbols: Bad value
> >>>> collect2: ld returned 1 exit status
> >>>> make[1]: *** [chan_pjsip.so] Error 1
> >>>> make: *** [channels] Error 2
> >>>
> >>> Your environment does not seem have a suitable pjproject. It should not
> >>> be trying to link in any static. Did you follow the wiki to build
> >>> pjproject? Do you have an old install as well as a new?
> >>
> >> Oops, my bad, I didn’t setup pjproject. However, the configure script
> >> didn’t complain so I assumed I was good to go and proceeded to make
> >> asterisk. Shouldn’t the configure script catch this and not allow
> >> someone to proceed to make? Thought that was a function of the configure
> >> script, that is, it verifies software dependancies before the build
> step.
> >
> > The configure script checks for pjproject but it is not currently
> > specific enough to look for only shared. (Not sure off the top of my
> > head how we could make it)
>
> So your response is that you agree the configure script should check for
> the pjproject  dependency, but you don’t know how to do that? Really?
>
>
Josh was trying to help. If you'd like to provide a patch to the configure
script to make it more robust in detecting the shared object libraries,
that would be appreciated. However, as Asterisk is installed on a wide
variety of platforms, such solutions are often very difficult to craft
correctly.

The configure script currently uses the AST_PKG_CONFIG_CHECK macro to
verify pjproject is installed. That will use the output of pkg-config to
verify whether or not the shared object libraries are installed. If, for
whatever reason, that returns success, then I would expect chan_pjsip to
enabled.

The config.log would illustrate why it returned success in your case.


> >
> >> Another thing … the README int the top level directory doesn’t seem to
> >> have been updated in a while and doesn’t mention pjproject. If there’s
> >> an external requirement like pjproject shouldn’t that go in the README?
> >
> > These days almost everything is documented on the wiki. The README
> > itself only covers the basics to get Asterisk up and going. It could be
> > extended to include dependencies for the various things.
>
> The README no longer "covers the basics" to get asterisk up and running
> because it doesn’t mention pjproject, which is now a required external
> dependency.  If you don’t think the README file is the right place for
> installation instructions, why not add an “INSTALL” file in the top level
> directory like other projects?
>

That isn't what Josh said. pjproject is not a required external dependency.
You can run Asterisk just fine without it.

As for the suggestion of adding an INSTALL file: this is really just the
same as a README. Personally, we've found that the wiki provides a good
place to collect that information. Major items are still listed in the
README; as pjproject is not required for Asterisk, I'm not sure it has to
be there.

Matt

-- 
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140923/7629b5e9/attachment.html>


More information about the asterisk-dev mailing list