On Tue, May 7, 2013 at 8:22 AM, Joel Stanley <[email protected]> wrote:
> Hello Richard,
>
> On Tue, May 7, 2013 at 3:43 AM, Richard Shaw <[email protected]> wrote:
> > I just submitted some cmake configuration updates and it now pretty much
> > does everything I needed it to do (and more) but not quite everything I'd
> > like it to do.
>
> I have been using the make based build to compile the system on
> various versions of Ubuntu, with success.
>
> I tested the cmake based build. codec2-dev builds fine, good work
> there. I have tried to build freedv, and have had less success. Unlike
> David's makefile, the cmake build does not download nor build any
> dependencies.
>
You'll need to look at the cmake options. It builds against system
libraries by default but can optionally do the dependency builds and
statically link against them. The only exception is wxWidgets which you
really need to use the wx-config to get the right libraries and build
flags. It ends up being a catch 22 because wx-config isn't available until
wxWidgets is built, but all the CMake variables are evaluated at configure
time, not during make.
My long term plan is to find a way to bootstrap the wxWidgets build but I'm
still working out the logic in my head before I try anything. You'd
basically set a bootstrap option, configure, make, then configure and make
again.
I realise that if we are to move towards getting FreeDV packed in
> distros we need to build it against distro packages, but due to codec2
> and wxwidgets not having packages, that's difficult on Ubuntu. I was
> able to use the codelite.org wx2.9 packages, but this still leaves the
> problem of codec2.
>
If you did the make install of codec2 then it should have been found. Cmake
should have looked at both /usr and /usr/local for the library and headers.
I then tried to point the cmake build to the (uninstalled) codec2
> headers and library manually. That failed (I forget the syntax I
> tried; cmake is a lot harder to find solutions than autotools for this
> kind of thing).
>
If you're not going to "make install" codec2 then you're better of using
the USE_STATIC_CODEC2 option which will download, build, and statically
link with codec2.
In writing this email, I notice that in your latest cmake
> configuration I get this output:
>
> -- Looking for codec2...
> -- codec2 library: CODEC2_LIBRARY-NOTFOUND
> -- codec2 headers: CODEC2_INCLUDE_DIR-NOTFOUND
> CMake Error at CMakeLists.txt:276 (message):
> codec2 library not found.
>
> Linux:
>
> Codec2 may not be in your distribution so build yourself or use the cmake
> option to build statically into FreeDV.
>
> Windws:
>
> It's easiest to use the cmake option: USE_STATIC_PORTAUDIO
>
WHOOPS, cut-n-paste error...
> I think that windows message, line 280 of CMakeLists.txt, needs to be
> fixed. The Linux message is a bit cryptic, how do I set the option to
> build codec2 statically? Looking again at CMakeLists.txt we have the
> following logic:
>
> #
> # Find codec2
> #
> if(NOT USE_STATIC_CODEC2)
> ...
> else(NOT USE_STATIC_CODEC2)
> message(STATUS "Will attempt static build of codec2.")
> include(cmake/BuildCodec2.cmake)
> endif(NOT USE_STATIC_CODEC2)
>
> How do I as a user discover this option, without having to read the
> file? I'm after the cmake equivalent of ./configure --help
>
That is the one downside of cmake, it doesn't have a generated configure.
Instead use ccmake (curses gui) or cmake-gui which will allow you to see
all the options and change their values.
I worked out that I wanted to do this:
>
> cmake . -DUSE_STATIC_CODEC=TRUE
>
> It had the following results:
>
> -- Will attempt static build of codec2.
> CMake Error at CMakeLists.txt:285 (include):
> include could not find load file:
>
> cmake/BuildCodec2.cmake
>
That's strange, I definitely haven't had a problem with it finding the file
on my end. What svn revision are you using?
In summary, out of the box the cmake system is much less user friendly
> than the makefile based build. Most of this is due to the reliance on
> the dev branch of wx widgets, but even with this sorted out, the build
> is complex.
>
Well, yes and no. The autotools makefile forced you to download and build
all the dependencies, my cmake config gives you the option al-la-cart. So
yes, it's a bit more complex but it does allow you much more flexibility.
I encourage the work towards making the build system more appropriate
> for packaging. I would suggest that it cannot be the first class build
> system until it works out of the box for the average Linux user.
>
The build system will be made more robust over time but I need a lot of
testing reports which unfortunately have not been frequent. Yours it
actually the first comprehensive test I've gotten.
Thanks,
Richard
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Freetel-codec2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freetel-codec2