[Freeswitch-users] Freeswitch 1.4.21 from source and Speex
Sharath Kumar
shakumarsoftware at gmail.com
Wed Sep 2 20:11:56 MSD 2015
Sure, let me do this on the master and let you know exactly what I had to
do.I will contribute back with documentation.
My goal is to cross compile for x86_64 and arm targets.
Have a great day!
Shaks
On Wed, Sep 2, 2015 at 10:01 AM, Michael Jerris <mike at jerris.com> wrote:
> My goal is for this to be very simple, so give me some feedback on what
> you need to manually do and we can see what all can be automated or fixed
> with patches.
>
> On Sep 2, 2015, at 11:53 AM, Sharath Kumar <shakumarsoftware at gmail.com>
> wrote:
>
> Mike,
>
> That is very helpful. I will build the cross on the master and see how
> that goes.
> Shaks
>
> On Wed, Sep 2, 2015 at 9:46 AM, Michael Jerris <mike at jerris.com> wrote:
>
>>
>> On Sep 2, 2015, at 11:11 AM, Sharath Kumar <shakumarsoftware at gmail.com>
>> wrote:
>>
>> I am not building my own apr-util. If I try to build FS with
>> --without-ldap option, the main FS configure script fails with this message
>> "
>> The configure of apr-util does not have ldap disabled either.
>>
>>
>> Fails with what message?
>>
>> Platform: standard x86_64-linux but with a custom kernel.
>>
>> Trying to cross-compile on a Ubuntu 14.4 host.
>>
>> 1. I'm running bootstrap.sh [ I'm not sure whether I should run this it
>> seems like it is for Debian]
>>
>>
>> Thats correct, you should be running this.
>>
>> 2. A makefile that basically calls the top-level configure script and
>> calls make.
>>
>> PHONY : $(X86_64_ARCH)/freeswitch
>> $(X86_64_ARCH)/freeswitch: $(freeswitch_loc)/configure
>> cd $(TOP)
>> mkdir -p $@
>> cd $@ && \
>> export PKG_CONFIG_PATH=$(X86_64_INSTALL)/usr/lib/pkgconfig && \
>> export ac_cv_func_malloc_0_nonnull=yes && \
>> export ac_cv_func_realloc_0_nonnull=yes && \
>> export apr_cv_mutex_recursive=yes && \
>> export ac_cv_file__dev_urandom=yes && \
>> export ac_cv_file__dev_ptmx=yes && \
>> export ac_cv_file__dev_zero=yes && \
>> export ac_cv_func_setpgrp_void=yes && \
>> export apr_cv_process_shared_works=yes && \
>> export apr_cv_mutex_robust_shared=no && \
>> export apr_cv_tcp_nodelay_with_cork=yes && \
>> export ac_cv_sizeof_struct_iovec=8 && \
>> export apr_cv_mutex_recursive=yes && \
>> export ac_cv_file_dbd_apr_dbd_mysql_c=no && \
>> $(freeswitch_loc)/bootstrap.sh && \
>> $(freeswitch_loc)/configure \
>> --build=`uname -m` \
>> --host=$(X86_64_ARCH) \
>> --exec-prefix=/usr \
>> --prefix=/var/lib/freeswitch \
>> --libexecdir=/usr/lib \
>> --libdir=/usr/lib \
>> --sysconfdir=/etc/freeswitch \
>> --datarootdir=/usr/share \
>> --includedir=/usr/include/freeswitch \
>> --with-modinstdir=/usr/lib/freeswitch/mod \
>> --localstatedir=/var \
>> --with-rundir=/var/run \
>> --disable-core-libedit-support \
>>
>>
>> --enable-static \
>>
>> why --enable-static ?
>>
>> --disable-debug \
>> --disable-core-odbc-support \
>> --disable-system-xmlrpc-c \
>> --without-erlang \
>> --without-python \
>> --with-sysroot=$(X86_64_INSTALL) \
>>
>>
>> this looks mostly good
>>
>>
>>
>> 64,1-8 38%
>> CPPFLAGS="-I$(freeswitch_loc)/src/include -D_GNU_SOURCE" \
>>
>>
>> Why are you adding -D_GNU_SOURCE? Is this line actually needed?
>>
>> CFLAGS="-Wno-error=strict-aliasing \
>> -Wno-error=unused-value"
>>
>>
>> sed -e 's/^DEFAULT_INCLUDES = -I./DEFAULT_INCLUDES =
>> -I$$(abs_builddir)/g' \
>> -i $@/libs/tiff-4.0.2/libtiff/Makefile
>>
>> What is this for?
>>
>> sed -e '/DTHREADSAFE/ a TCC += $$(CPPFLAGS) $$(LDFLAGS)' \
>> -i $@/libs/sqlite/Makefile
>>
>>
>> What is this for? (note on master, we use system sqlite)
>>
>> sed -e 's%-DSWITCH_DECLARE_CLASS%-I$(freeswitch_loc)/src/include
>> -I$(X86_64_BUILD)/freeswitch/src/include -DSWITCH_DECLARE_CLASS%g' \
>> -i $@/Makefile
>>
>>
>> What is this for? That symbol doesn't even exist in the core Makefile,
>> so this line is actually doing nothing at all. I don't think you actually
>> need to add the -I$(X86_64_BUILD)/freeswitch/src/include explicitly here,
>> it will likely get added where it needs to be from stuff from pkg-config
>> (at least on master)
>>
>> $(MAKE) -C $@ $(X86_64_BUILD)/freeswitch/modules.conf
>>
>>
>> What does this do?
>>
>> $(MAKE) -j $(SIMUL) -C $@ DESTDIR=$(X86_64_INSTALL) \
>> CPPFLAGS="-I$(freeswitch_loc)/src/include -D_GNU_SOURCE
>> -DHAVE_UINT64_T" \
>>
>>
>> What is this CPPFLAGS for?
>>
>> install
>>
>>
>> I also ran autoconf --reconf to generate Makefile.in from the Makefile.am
>> file.
>>
>>
>> you shouldn't have to do that
>>
>> I will definitely migrate to the master but I wanted to try and see if
>> 1.4 builds.
>>
>>
>> I have done quite a lot in the master build system that moves quite a few
>> libraries (although not apr-utils) out of our build system. This will
>> require you to repackage seperately a few more libs for your cross
>> toolchain, but should greatly simplify the cross of freeswitch itself. I
>> have also done quite a bit of work fixing srcdir and cross builds in master
>> that is not in the 1.4 branch. It is likely much easier for you to
>> accomplish this on master (although I do have working cross builds on 1.4,
>> its a lot more painful to make work right)
>>
>>
>> Am I doing something obviously wrong here ?
>>
>> Mike, Thank you so much!
>>
>> Shaks
>>
>>
>>
>> On Tue, Sep 1, 2015 at 7:06 PM, Michael Jerris <mike at jerris.com> wrote:
>>
>>> those are out of apr-util but we don't use them, and I thought that in
>>> our configure we pass to that we disable those. What steps exactly are you
>>> going through trying to build this? You shouldn't need to be building your
>>> own apr libs, those should build as part of our build proces, and in my
>>> experience they should cross easily. can you reply with some details of
>>> the platform your trying to cross to and why your build scripts look like
>>> so far? Also, we are getting ready to release 1.6 very soon. If you are
>>> already making a huge version jump I would reccomend you working off master
>>> which will become 1.6 instead of 1.4.
>>>
>>> On Tuesday, September 1, 2015, Sharath Kumar <shakumarsoftware at gmail.com>
>>> wrote:
>>>
>>>> Mike,
>>>> That is great! I ran it through autoconf and It compiles now but I have
>>>> strange linking errors in libfreeswitch <http://libfreeswitch.la/>.so
>>>> :(. Does FS require LDAP lib or is it the apr-util that is not being
>>>> linked not sure? I searched for these symbols in the older FS and it is
>>>> nowhere to be found in the .so. The sources also don't have them! Any help
>>>> would be great!
>>>>
>>>> thank you,
>>>> Shaks
>>>>
>>>>
>>>> ./.libs/libfreeswitch.so: undefined reference to `ber_free'
>>>> ./.libs/libfreeswitch.so: undefined reference to `ldap_err2string'
>>>> ./.libs/libfreeswitch.so: undefined reference to `ldap_get_dn_ber'
>>>> ./.libs/libfreeswitch.so: undefined reference to `ldap_get_option'
>>>> ./.libs/libfreeswitch.so: undefined reference to `ldap_sasl_bind'
>>>> ./.libs/libfreeswitch.so: undefined reference to `ldap_search_ext'
>>>> ./.libs/libfreeswitch.so: undefined reference to `ldap_memfree'
>>>> ./.libs/libfreeswitch.so: undefined reference to `ldap_msgfree'
>>>> ./.libs/libfreeswitch.so: undefined reference to `ldap_first_message'
>>>> ./.libs/libfreeswitch.so: undefined reference to `ldap_unbind_ext'
>>>> ./.libs/libfreeswitch.so: undefined reference to
>>>> `ldap_get_attribute_ber'
>>>> ./.libs/libfreeswitch.so: undefined reference to `ber_memfree'
>>>> ./.libs/libfreeswitch.so: undefined reference to `ldap_next_message'
>>>> ./.libs/libfreeswitch.so: undefined reference to
>>>> `ldap_pvt_url_scheme2proto'
>>>>
>>>>
>>>> On Tue, Sep 1, 2015 at 1:50 PM, Michael Jerris <mike at jerris.com> wrote:
>>>>
>>>>> Recent code uses automake. The rules are in there:
>>>>>
>>>>> :grep lib_LTLIBRARIES Makefile.am
>>>>> lib_LTLIBRARIES = libfreeswitch.la
>>>>>
>>>>> On Sep 1, 2015, at 3:39 PM, Sharath Kumar <shakumarsoftware at gmail.com>
>>>>> wrote:
>>>>>
>>>>> Mike,
>>>>> Thank you! I was migrating from FS 1.0.6 to 1.4.21 and the old one
>>>>> *had* the speex in the lib. I guess the latest doesn't use it. thanks for
>>>>> the clarification. I guess I will have to manually build speex for my
>>>>> embedded target and install it as a package.
>>>>> I am also confused about building the FS library i.e "libfreeswitch.la".
>>>>> In the older FS, there is a Makefile.in that had rules to make the
>>>>> libfreeswitch.la. I may not have looked hard enough but the newer one
>>>>> (Makefile.in) doesn't seem to have any rules to build libfreeswitch.la.
>>>>> Am I completely mistaken ?
>>>>>
>>>>> thank you,
>>>>> Shaks
>>>>>
>>>>> On Tue, Sep 1, 2015 at 10:38 AM, Michael Jerris <mike at jerris.com>
>>>>> wrote:
>>>>>
>>>>>> There is no without-speex, as we use some speex functionality in the
>>>>>> core. We use system packages for the speex library, as detected using
>>>>>> pkg-config. I'm not sure how you could get an error building freeswitch
>>>>>> that is attempting to build speex, as we do not build speex.
>>>>>>
>>>>>>
>>>>>> > On Aug 31, 2015, at 4:52 PM, Sharath Kumar <
>>>>>> shakumarsoftware at gmail.com> wrote:
>>>>>> >
>>>>>> > Hi,
>>>>>> >
>>>>>> > I'm trying to cross-compile for an embedded target and building the
>>>>>> latest production build from source but it fails trying to build speex.
>>>>>> >
>>>>>> > I also noticed in the libs directory there is no speex folder, so I
>>>>>> had to copy it from some other place.
>>>>>> >
>>>>>> > How do I disable speex from compiling ? is it with --without-speex
>>>>>> in the configure script ?
>>>>>> >
>>>>>> > thanks,
>>>>>> > Shaks
>>>>>> >
>>>>>> _________________________________________________________________________
>>>>>>
>>>>>>
>>>>>>
>>>>>> _________________________________________________________________________
>>>>>> Professional FreeSWITCH Consulting Services:
>>>>>> consulting at freeswitch.org
>>>>>> http://www.freeswitchsolutions.com
>>>>>>
>>>>>> Official FreeSWITCH Sites
>>>>>> http://www.freeswitch.org
>>>>>> http://confluence.freeswitch.org
>>>>>> http://www.cluecon.com
>>>>>>
>>>>>> FreeSWITCH-users mailing list
>>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>>> UNSUBSCRIBE:
>>>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>>>> http://www.freeswitch.org
>>>>>>
>>>>>
>>>>>
>>>>> _________________________________________________________________________
>>>>> Professional FreeSWITCH Consulting Services:
>>>>> consulting at freeswitch.org
>>>>> http://www.freeswitchsolutions.com
>>>>>
>>>>> Official FreeSWITCH Sites
>>>>> http://www.freeswitch.org
>>>>> http://confluence.freeswitch.org
>>>>> http://www.cluecon.com
>>>>>
>>>>> FreeSWITCH-users mailing list
>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>> UNSUBSCRIBE:
>>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>>> http://www.freeswitch.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _________________________________________________________________________
>>>>> Professional FreeSWITCH Consulting Services:
>>>>> consulting at freeswitch.org
>>>>> http://www.freeswitchsolutions.com
>>>>>
>>>>> Official FreeSWITCH Sites
>>>>> http://www.freeswitch.org
>>>>> http://confluence.freeswitch.org
>>>>> http://www.cluecon.com
>>>>>
>>>>> FreeSWITCH-users mailing list
>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>> UNSUBSCRIBE:
>>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>>> http://www.freeswitch.org
>>>>>
>>>>
>>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://confluence.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150902/b3b17a21/attachment-0001.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list