On 20/09/15 09:16, Stuart Longland wrote:
>> RC=0 stuartl@vk4msl-mb ~/hamradio/projects/fdmdv/freedv-build $ pkg-config 
>> --libs hamlib
>> -L/usr/lib64/hamlib -lhamlib -lm 
> 
> It seems the cmake files could use a little help finding where hamlib
> has been put.  AFAIK there is a cmake module that can make use of
> pkg-config, as I was using it some time back to locate Qt libraries in a
> project at work.
> 

cmake doesn't like being told what to do either:
> RC=0 stuartl@vk4msl-mb ~/hamradio/projects/fdmdv/freedv-build $ cmake -D 
> HAMLIB_LIBRARY=/usr/lib64/hamlib -D USE_STATIC_CODEC2=false  ../freedv-1.0.1
> -- FreeDV version: 1.0.1
> -- Build type not specified, defaulting to Release
> -- Threads library flags: -lpthread
> -- Looking for codec2...
> --   codec2 library: /usr/local/lib64/libcodec2.so
> --   codec2 headers: /usr/local/include/codec2
> -- Looking for portaudio...
> --   portaudio library: portaudio;asound;m;pthread
> --   portaudio headers: 
> -- Looking for hamlib...
> -- Hamlib library: /usr/lib64/hamlib
> -- Hamlib headers: /usr/include
> -- Hamlib library found.
> -- Looking for samplerate...
> --   samplerate library: /usr/lib64/libsamplerate.so
> --   samplerate headers: /usr/include
> -- Looking for sox...
> --   sox library: /usr/lib64/libsox.so
> --   sox headers: /usr/include
> -- Looking for sndfile...
> --   sndfile library: /usr/lib64/libsndfile.so
> --   sndfile headers: /usr/include
> -- Looking for wxWidgets...
> -- wxWidgets version: 3.0.0
> -- Will attempt static build of speex.
> -- Build type will be: Release
> -- Configuring done
> WARNING: Target "freedv" requests linking to directory "/usr/lib64/hamlib".  
> Targets may link only to libraries.  CMake is dropping the item.
…
> [100%] Building C object src/CMakeFiles/freedv.dir/sox_biquad.c.o             
>                                                                            
> Linking CXX executable freedv                                                 
>                                                                            
> CMakeFiles/freedv.dir/hamlib.cpp.o: In function `Hamlib::Hamlib()':           
>                                                                            
> hamlib.cpp:(.text+0x888): undefined reference to `rig_set_debug'
> hamlib.cpp:(.text+0x88d): undefined reference to `rig_load_all_backends'
> hamlib.cpp:(.text+0x89d): undefined reference to `rig_list_foreach'
> hamlib.cpp:(.text+0x983): undefined reference to `rig_set_debug'
> CMakeFiles/freedv.dir/hamlib.cpp.o: In function `Hamlib::~Hamlib()':
> hamlib.cpp:(.text+0xa15): undefined reference to `rig_close'
> hamlib.cpp:(.text+0xa1d): undefined reference to `rig_cleanup'
> CMakeFiles/freedv.dir/hamlib.cpp.o: In function `Hamlib::connect(unsigned 
> int, char const*)':
> hamlib.cpp:(.text+0xb38): undefined reference to `rig_close'
> hamlib.cpp:(.text+0xb40): undefined reference to `rig_cleanup'
> hamlib.cpp:(.text+0xb56): undefined reference to `rig_init'
> hamlib.cpp:(.text+0xb71): undefined reference to `rig_token_lookup'
> hamlib.cpp:(.text+0xb7f): undefined reference to `rig_set_conf'
> hamlib.cpp:(.text+0xb8f): undefined reference to `rig_open'
> CMakeFiles/freedv.dir/hamlib.cpp.o: In function `Hamlib::ptt(bool)':
> hamlib.cpp:(.text+0xbe8): undefined reference to `rig_set_ptt'
> CMakeFiles/freedv.dir/hamlib.cpp.o: In function `Hamlib::close()':
> hamlib.cpp:(.text+0xc53): undefined reference to `rig_close'
> hamlib.cpp:(.text+0xc5b): undefined reference to `rig_cleanup'
> collect2: error: ld returned 1 exit status
> src/CMakeFiles/freedv.dir/build.make:418: recipe for target 'src/freedv' 
> failed
> make[2]: *** [src/freedv] Error 1
> CMakeFiles/Makefile2:113: recipe for target 'src/CMakeFiles/freedv.dir/all' 
> failed
> make[1]: *** [src/CMakeFiles/freedv.dir/all] Error 2
> Makefile:116: recipe for target 'all' failed
> make: *** [all] Error 2

I'll see if I can cook up a patch that uses pkg-config.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

------------------------------------------------------------------------------
_______________________________________________
Freetel-codec2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freetel-codec2

Reply via email to