Discussion:
[Freetel-codec2] freedv-dev build fails to link in Fedora 25
digger vermont
8 years ago
Permalink
Hello everyone!

David suggested this would be a better place to look for help than the digitalvoice group.
I'm attempting to build linux version free-dv and am stalled right near the end with this error.

[ 90%] Building CXX object src/CMakeFiles/freedv.dir/hamlib.cpp.o
[ 93%] Building CXX object src/CMakeFiles/freedv.dir/topFrame.cpp.o
[ 96%] Building C object src/CMakeFiles/freedv.dir/sox_biquad.c.o
[100%] Linking CXX executable freedv
/usr/bin/ld: CMakeFiles/freedv.dir/fdmdv2_main.cpp.o: undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/lib64/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
src/CMakeFiles/freedv.dir/build.make:469: recipe for target 'src/freedv' failed
make[2]: *** [src/freedv] Error 1
CMakeFiles/Makefile2:160: recipe for target 'src/CMakeFiles/freedv.dir/all' failed
make[1]: *** [src/CMakeFiles/freedv.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

src/CMakeFiles/freedv.dir/link.txt has this:

/usr/lib64/ccache/c++ -Wall -pthread -O2 -DNDEBUG CMakeFiles/freedv.dir/dlg_audiooptions.cpp.o CMakeFiles/freedv.dir/dlg_filter.cpp.o CMakeFiles/freedv.dir/dlg_options.cpp.o CMakeFiles/freedv.dir/dlg_ptt.cpp.o CMakeFiles/freedv.dir/dlg_plugin.cpp.o CMakeFiles/freedv.dir/fdmdv2_main.cpp.o CMakeFiles/freedv.dir/fdmdv2_pa_wrapper.cpp.o CMakeFiles/freedv.dir/fdmdv2_plot.cpp.o CMakeFiles/freedv.dir/fdmdv2_plot_scalar.cpp.o CMakeFiles/freedv.dir/fdmdv2_plot_scatter.cpp.o CMakeFiles/freedv.dir/fdmdv2_plot_spectrum.cpp.o CMakeFiles/freedv.dir/fdmdv2_plot_waterfall.cpp.o CMakeFiles/freedv.dir/hamlib.cpp.o CMakeFiles/freedv.dir/topFrame.cpp.o CMakeFiles/freedv.dir/sox_biquad.c.o -o freedv -rdynamic ../codec2-prefix/src/codec2-build/src/libcodec2.a -lportaudio -lasound -lm -lpthread -lasound -lhamlib -lsamplerate -lsox -lsndfile -pthread -lwx_gtk3u_core-3.0 -lwx_baseu-3.0 -lwx_gtk3u_aui-3.0 -lwx_gtk3u_html-3.0 -lwx_baseu_net-3.0 -lwx_gtk3u_adv-3.0 ../external/dist/lib/libspeexdsp.a -lm -lpthread -lhamlib -lsamplerate -lsox -lsndfile -lwx_gtk3u_core-3.0 -lwx_baseu-3.0 -lwx_gtk3u_aui-3.0 -lwx_gtk3u_html-3.0 -lwx_baseu_net-3.0 -lwx_gtk3u_adv-3.0 ../external/dist/lib/libspeexdsp.a

My distro is Fedora 25.
I have the devel files installed from distro rpms, the build_linux directory is clean and I'm using the commands:
cmake ../
make

I'm sure its something simple but have not been able to figure it out.

David Rowe suggested a missing lib in the link command.
A search of the internet comes up with the possibility of the order of the linking in the command
Brady OBrien thinks it may be the GCC 6 compiler.
GCC 6.3.1-1.fc25 is currently installed installed by Fedora 25.

Any other info I can give you? Any ideas?

Thanks for your help,
digger - AB3XU
Steve
8 years ago
Permalink
Is this what you did:

---------------------------------
cd freedv-dev
mkdir mybuild
cd mybuild
cmake -DBOOTSTRAP_WXWIDGETS=TRUE ~/freedv-dev ../
cmake ../
make
sudo ldconfig
cmake -DBOOTSTRAP_WXWIDGETS=TRUE -DUSE_STATIC_CODEC2=TRUE
-DUSE_STATIC_PORTAUDIO=TRUE -DUSE_STATIC_SOX=TRUE ../
make

freedv should now be in src/

sudo ldconfig
sudo make install

finished
--------------
Steve
8 years ago
Permalink
At the final "make" I see this fly by:

---------------------
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
----------------------

It seems to build and run, although I am using Ubuntu 16 64-bit

P.S. I don't see -ldl in your final build command, so maybe it failed
at this point of the make.
Take a look at the output of this make.

Steve
digger vermont
8 years ago
Permalink
Thanks for you reply, Steve.

Between this and the your other reply I have a completed build.
Mostly -ldl needed to be added to the link command which I did by adding it to the command-line in link.txt.
But that doen't answer the question of why "-ldl" is not being included to begin with. My understanding of how cmake works is very limited and can't try to figure it out tonight.
If anyone has some concrete things for me to test I can do that.

Inline i have more details and some questions.



From: ***@gmail.com
To: freetel-***@lists.sourceforge.net

Is this what you did:


No To begin with it was simply:
cmake ../
make
resulting in the linking error

I tried your recipe and it also didn't work for me, but it did help.


---------------------------------
cd freedv-dev
mkdir mybuild
cd mybuild
cmake -DBOOTSTRAP_WXWIDGETS=TRUE ~/freedv-dev ../

What does the ~/freedv-dev do here? I didn't see anything in the make man page to explain it

make should be addded here, shouldn't it?

The result here is errors with building wxWidgets. I have wxWidgets actually installed so I don't need this part.



cmake ../
make
sudo ldconfig

What does the ldconfig do here since it doesn't seem like anything was installed to the system?


cmake -DBOOTSTRAP_WXWIDGETS=TRUE -DUSE_STATIC_CODEC2=TRUE
-DUSE_STATIC_PORTAUDIO=TRUE -DUSE_STATIC_SOX=TRUE ../
make

freedv should now be in src/

sudo ldconfig
sudo make install

finished
--------------

This what worked for me. Basically what you suggested minus anything of the wxWidgets stuff
I a fresh build directory,

cmake -DUSE_STATIC_CODEC2=TRUE -DUSE_STATIC_PORTAUDIO=TRUE -DUSE_STATIC_SOX=TRUE ../
make
cd src
<run the link command line in ./CMakeFiles/freedv.dir/link.txt with "-ldl" added near the beginning>
cd ..
make #just to make sure the build is compled
Alan Beard
8 years ago
Permalink
Hi,

Fedora 23 x86_64 here.
Building FreeDV from
svn co https://svn.code.sf.net/p/freetel/code/freedv-dev
and then the patch: freedv-use-own-biquad-filter.patch
## Fix path in .patch file then
patch 2998freedv/freedv-dev/src/sox_biquad.c freedv-use-own-biquad-filter.patch

All compiles, but in the end, I cannot get audio through to transmit.

I use "sysdefault". In my desktop, Settings => Sound, I see my mic, setup and working.
The bargraph shows my mic is working well.

Before some Fedora upgrades, it used to work???

Any clues?

Alan VK2ZIW
...
Alan

Evil flourishes when good men do nothing.
Consider the Christmas child.
---------------------------------------------------------------------------
Alan Beard               Unix Support Technician from 1984 to today
70 Wedmore Rd.           Sun Solaris, AIX, HP/UX, Linux, SCO, MIPS
Emu Heights N.S.W. 2750  Routers, terminal servers, printers, terminals etc..
+61 2 47353013 (h)       Support Programming, shell scripting, "C", assembler
0414 353013 (mobile)     After uni, electronics tech
Richard Shaw
8 years ago
Permalink
Guys,

Since I'm one of the main Fedora people and a "developer" on the freetel
group (I use the term loosely, I don't code c, just the build system and
windows builds) I do plan on addressing these issues but I just haven't had
the time yet.

I'll let everyone know when I've committed fixes worth testing.

Thanks,
Richard
KF5OIM
Richard Shaw
8 years ago
Permalink
The latest SVN should build now, at least it did for me on Fedora 25
without issue. Pulling the needed stuff from sox broke the windows builds
but I'll see what I can do about that.

Thanks,
Richard
KF5OIM
digger vermont
8 years ago
Permalink
Yes! with the last svn update I can build on Fedora 25 with a simple
cmake ../
make

digger, AB3XU


Sent from [ProtonMail](https://protonmail.ch), encrypted email based in Switzerland.



-------- Original Message --------
Subject: Re: [Freetel-codec2] freedv-dev build fails to link in Fedora 25
Local Time: January 29, 2017 8:14 AM
UTC Time: January 29, 2017 1:14 PM
From: ***@gmail.com
To: freetel-***@lists.sourceforge.net <freetel-***@lists.sourceforge.net>


The latest SVN should build now, at least it did for me on Fedora 25 without issue. Pulling the needed stuff from sox broke the windows builds but I'll see what I can do about that.

Thanks,
Richard
KF5OIM

Brian Morrison
8 years ago
Permalink
On Mon, 23 Jan 2017 19:04:17 -0500
Post by digger vermont
Any other info I can give you? Any ideas?
FYI downloading freedv-1.1-6.fc24.x86_64.srpm from Fedora koji allows me
to install and build on Fedora 25 without any problems using the
supplied .spec file and rpmbuild.
--
Brian Morrison
Loading...