Discussion:
[Freetel-codec2] Cross building FreeDV on Ubuntu (32 bit)
Bob Wisdom
8 years ago
Permalink
I'm having problems with the FreeDV cross-build to Windows. Specifically at
the wxWidgets part of the cross build instructions (presented in README.txt
supplied with the FreeDV source). The Linux version builds perfectly.

I just wondered if there was any updated instructions available, or any
insight as to what I might have missed.

I'm using Ubuntu 16.04 32 bit, but have also tried on Ubuntu 14.04 which
gets the same error. After 'cmake' runs successfully. then running 'make'
gives a cross-build error that looks like this-
--------------
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... configure: error: in
`/home/bob/freedv/freedv-dev/build_windows/wxWidgets-prefix/src/wxWidgets':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
CMakeFiles/wxWidgets.dir/build.make:108: recipe for target
'wxWidgets-prefix/src/wxWidgets-stamp/wxWidgets-configure' failed
make[2]: *** [wxWidgets-prefix/src/wxWidgets-stamp/wxWidgets-configure]
Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/wxWidgets.dir/all'
failed
make[1]: *** [CMakeFiles/wxWidgets.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
***@W520:~/freedv/freedv-dev/build_windows$
--------------------------
Thanks, Bob VK4YA
Richard Shaw
8 years ago
Permalink
Bob,

not really enough detail to tell you what happened or what the solution
is...

Since I compile the official windows installers from my Fedora box I know
it works but I actually build and install wxWindows instead of using the
bootstrapping method.

One thing I have to do though, after I install wxWindows is move the dll's
from the lib directory to the bin directory as shared DLL's are considered
runtimes for Windows.

Thanks,
Richard
KF5OIM
Bob Wisdom
8 years ago
Permalink
Thanks Richard for the advice on cross building wxWidgets separately. I
have just attempted the same approach with Ubuntu but not succeeded so far.
I couldn't find a good up-to-date source of cross-build instructions for
wxWidgets on Linux targeting Win32, so my build attempt was probably in
error. I'll try again in due course.
...
David Rowe
8 years ago
Permalink
Hi Bob,

I just tried the instructions in freedv-dev/README.txt "Building for
Windows on Ubuntu Linux (Cross compiling)". I'm using Ubuntu 14.

I started with the freedv build step 3 as I had already installed the C
cross-compiler, patched cmake and built codec2-dev for Windows. I have
a copy of my console below.

I haven't tried it on a freshly installed Ubuntu machine for a while, if
yr still stuck let me know and I'll try it on a new Ubuntu 16 machine I
have kicking around.

I think the Win32 codec2-dev instructions should be copied to the
codec2-dev README, it's a bit unclear on how to build for Win32.

Anyway, just get back to me if your still stuck!

Cheers,

David

-/-

***@penetrator:~/tmp/freedv-dev$ mkdir build_windows
***@penetrator:~/tmp/freedv-dev$ cd build_windows/
***@penetrator:~/tmp/freedv-dev/build_windows$ cmake
-DBOOTSTRAP_WXWIDGETS=TRUE ..
-DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-Ubuntu-mingw32.cmake
-DCMAKE_BUILD_TYPE=Debug
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-g++
-- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- FreeDV version: 1.2 devel
-- Adding wxWidgets build target...
-- wxWidgets install dir:
/home/david/tmp/freedv-dev/build_windows/external/dist
-- Will perform bootstrap build of wxWidgets.
After make step completes, re-run cmake and make again to perform
FreeDV build.
-- Configuring done
-- Generating done
-- Build files have been written to:
/home/david/tmp/freedv-dev/build_windows
***@penetrator:~/tmp/freedv-dev/build_windows$ make
Scanning dependencies of target wxWidgets
[ 12%] Creating directories for 'wxWidgets'
[ 25%] Performing download step (download, verify and extract) for
'wxWidgets'
-- downloading...

src='http://downloads.sourceforge.net/wxwindows/wxWidgets-3.0.2.tar.bz2'

dst='/home/david/tmp/freedv-dev/build_windows/wxWidgets-prefix/src/wxWidgets-3.0.2.tar.bz2'
timeout='none'
-- [download 0% complete]

<after download wxWidgets starts to build>
Richard Shaw
8 years ago
Permalink
I haven't checked it in yet, but I added --disable-gui to the
BuildWxWidgets cmake module which fixed the build problem for me but now
when I re-run cmake so it can pick up the install of wxWidgets it complains
it can't find 'wx/version.h' and list two directories it searched for it,
but it's in the 2nd directory where it should be...

Thanks,
Richard
KF5OIM
glen english
8 years ago
Permalink
my 2c :

I've only successfully installed wx-widgets etc on Windows, never
successfully on Debian linux. failed....
I use it with Codelite IDE (windows/ linux / mac) which has a specific
plug-in.
I have the odd setup where terminal presentation progs are done in
Codelite on Linux, and GUI things are done on Codelite in Windows...

Wxwidgets, highly recommended though... I use it as a replacement for
CBuilder.
Post by Richard Shaw
I haven't checked it in yet, but I added --disable-gui to the
BuildWxWidgets cmake module which fixed the build problem for me but
now when I re-run cmake so it can pick up the install of wxWidgets it
complains it can't find 'wx/version.h' and list two directories it
searched for it, but it's in the 2nd directory where it should be...
Loading...