[CMake] Phonon with an older version of CMake

Alexander Solis alex.solis at telcentris.com
Tue Oct 28 18:35:58 EDT 2008


You are correct, for phonon 2.6 works fine, but if I use 2.6 for the  
main project there are other thinks that get broken during compilation  
and we are very close to a deadline with not too much time in our  
hands :(

Here are some of the warnings I get when running the program with  
CMake2.6 (maybe they are easy to fix). The problem is that I tried  
setting the policy but I am kind of loss trying to find the correct  
CMakeLists.txt file that I should modify.

1)
WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig

2)
CMake Warning (dev) at owbuild/owbuild/OWCreateBinary.cmake:53  
(add_library):
   Policy CMP0002 is not set: Logical target names must be globally  
unique.
   Run "cmake --help-policy CMP0002" for policy details.  Use the  
cmake_policy
   command to set the policy and suppress this warning.
Call Stack (most recent call first):
   wifo/phapi/ilbc/CMakeLists.txt:37 (ow_create_binary)
This warning is for project developers.  Use -Wno-dev to suppress it.

3)
CMake Warning (dev) at owbuild/owbuild/OWCreateBinary.cmake:112  
(add_executable):
   Policy CMP0003 should be set before this line.  Add code such as

     if(COMMAND cmake_policy)
       cmake_policy(SET CMP0003 NEW)
     endif(COMMAND cmake_policy)

   as early as possible but after the most recent call to
   cmake_minimum_required or cmake_policy(VERSION).  This warning  
appears
   because target "VoxOx" links to some libraries for which the linker  
must
   search:

     resolv, gnutls

   and other libraries with known full path:

     /Users/telcentrisholdingsa/src/VoxOx/build/libs/owutil/cutil/ 
libowcutil.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/owutil/util/ 
libowutil.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/owutil/ 
serialization/libowserialization.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/owutil/thread/ 
libowthread.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/owutil/settings/ 
libowsettings.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/owutil/system/ 
libowsystem.a
     /usr/lib/libz.dylib
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/3rdparty/curl/ 
libcurl.dylib
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/owutil/http/ 
libowhttp.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/owutil/serializer/ 
libowserializer.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/owutil/socket/ 
libowsocket.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/imwrapper/ 
libowimwrapper.a
     /Users/telcentrisholdingsa/src/VoxOx/libs/3rdparty/ffmpeg/binary- 
lib/macosx/libavutil.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/owpixertool/ 
libowpixertool.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/sipwrapper/ 
libowsipwrapper.a
     /opt/local/lib/libglib-2.0.dylib
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/3rdparty/gaim/ 
libgaim.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/imwrapper/src/ 
gaim/libowgaimwrapper.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/sound/libowsound.a
     /Users/telcentrisholdingsa/src/VoxOx/build/wifo/sVoIP/libsvoip.a
     /Users/telcentrisholdingsa/src/VoxOx/build/wifo/libosip2/libosip2.a
     /Users/telcentrisholdingsa/src/VoxOx/build/wifo/eXosip/libexosip.a
     /Users/telcentrisholdingsa/src/VoxOx/build/wifo/phapi/ 
libphapi.dylib
     /Users/telcentrisholdingsa/src/VoxOx/build/wifo/phapi-util/ 
libphapiutil.dylib
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/sipwrapper/src/ 
phapi/libowphapiwrapper.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/imwrapper/src/ 
multiim/libowmultiimwrapper.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/wenbox/ 
libowwenbox.a
     /Users/telcentrisholdingsa/src/VoxOx/build/wengophone/src/ 
libowphone.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/owwebcam/ 
libowwebcam.dylib
     /Users/telcentrisholdingsa/src/VoxOx/build/wifo/netlib/libnetlib.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/3rdparty/tinyxml/ 
libtinyxml.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/qtutil/ 
libowqtutil.a
     /Users/telcentrisholdingsa/src/VoxOx/build/wengophone/src/buildid/ 
libowbuildid.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/idle/libowidle.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/trayicon/ 
libowtrayicon.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/owbrowser/ 
libowbrowser.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/softupdater/ 
libowsoftupdater.a
     /Users/telcentrisholdingsa/src/VoxOx/build/wifo/srtp/libsrtp.a
     /Users/telcentrisholdingsa/src/VoxOx/build/wifo/phapi/gsm/libgsm.a
     /Users/telcentrisholdingsa/src/VoxOx/build/wifo/phapi/fidlib/ 
libfidlib.a
     /Users/telcentrisholdingsa/src/VoxOx/build/wifo/phapi/speexec/ 
libspeexec.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/timer/libwtimer.a
     /Users/telcentrisholdingsa/src/VoxOx/build/wifo/ortp/libortp.a
     /Users/telcentrisholdingsa/src/VoxOx/build/wifo/phapi/stun/ 
libstun.a
     /Users/telcentrisholdingsa/src/VoxOx/build/libs/owutil/ 
shlibloader/libowshlibloader.a
     /Users/telcentrisholdingsa/src/VoxOx/build/wifo/httptunnel/ 
libhttptunnel.a

   CMake is adding directories in the second list to the linker search  
path in
   case they are needed to find libraries from the first list (for  
backwards
   compatibility with CMake 2.4).  Set policy CMP0003 to OLD or NEW to  
enable
   or disable this behavior explicitly.  Run "cmake --help-policy  
CMP0003" for
   more information.
Call Stack (most recent call first):
   wengophone/src/presentation/qt/CMakeLists.txt:671 (ow_create_binary)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning at owbuild/owbuild/OWCreateBinary.cmake:112  
(add_executable):
   Cannot generate a safe linker search path for target VoxOx because  
files in
   some directories may conflict with libraries in implicit directories:

     link library [libz.dylib] in /usr/lib may be hidden by files in:
       /opt/local/lib
     link library [libiconv.dylib] in /usr/lib may be hidden by files  
in:
       /opt/local/lib
     link library [libcrypto.dylib] in /usr/lib may be hidden by files  
in:
       /opt/local/lib
     link library [libssl.dylib] in /usr/lib may be hidden by files in:
       /opt/local/lib

   Some of these libraries may not be found correctly.
Call Stack (most recent call first):
   wengophone/src/presentation/qt/CMakeLists.txt:671 (ow_create_binary)


After running the program with CMake2.6 I run make and get the  
following error:
Undefined symbols:
   "_inflateEnd", referenced from:
       _decode_frame in libavcodec.a(pngdec.o)
   "_inflateInit_", referenced from:
       _decode_frame in libavcodec.a(pngdec.o)
   "_xvid_plugin_2pass2", referenced from:
       _ff_xvid_rate_control_init in libavcodec.a(libxvid_rc.o)
       _ff_xvid_rate_estimate_qscale in libavcodec.a(libxvid_rc.o)
       _ff_xvid_rate_estimate_qscale in libavcodec.a(libxvid_rc.o)
       _ff_xvid_rate_control_uninit in libavcodec.a(libxvid_rc.o)
   "_inflate", referenced from:
       _decode_frame in libavcodec.a(pngdec.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [libs/owwebcam/libowwebcam.dylib] Error 1
make[1]: *** [libs/owwebcam/CMakeFiles/owwebcam.dir/all] Error 2
make: *** [all] Error 2


= 
= 
= 
========================================================================


Here is the working CMake 2.6 make VERBOSE=1 (the broken 2.4 was sent  
on a previous mail):

/opt/local/bin/cmake -H/Users/telcentrisholdingsa/Desktop/video_cmake - 
B/Users/telcentrisholdingsa/Desktop/video_cmake --check-build-system  
CMakeFiles/Makefile.cmake 0
/opt/local/bin/cmake -E cmake_progress_start /Users/ 
telcentrisholdingsa/Desktop/video_cmake/CMakeFiles /Users/ 
telcentrisholdingsa/Desktop/video_cmake/CMakeFiles/progress.make
make -f CMakeFiles/Makefile2 all
make -f CMakeFiles/video.dir/build.make CMakeFiles/video.dir/depend
/opt/local/bin/cmake -E cmake_progress_report /Users/ 
telcentrisholdingsa/Desktop/video_cmake/CMakeFiles 4
[ 25%] Generating moc_mainwindow.cxx
/usr/local/Trolltech/Qt-4.4.0/bin/moc -I/usr/local/Trolltech/Qt-4.4.0/ 
include -I/usr/local/Trolltech/Qt-4.4.0/include/phonon -I/usr/local/ 
Trolltech/Qt-4.4.0/include/QtGui -I/usr/local/Trolltech/Qt-4.4.0/ 
include/QtCore -DQT_DLL -DQT_PHONON_LIB -DQT_GUI_LIB -DQT_CORE_LIB -o / 
Users/telcentrisholdingsa/Desktop/video_cmake/moc_mainwindow.cxx / 
Users/telcentrisholdingsa/Desktop/video_cmake/mainwindow.h
cd /Users/telcentrisholdingsa/Desktop/video_cmake && /opt/local/bin/ 
cmake -E cmake_depends "Unix Makefiles" /Users/telcentrisholdingsa/ 
Desktop/video_cmake /Users/telcentrisholdingsa/Desktop/video_cmake / 
Users/telcentrisholdingsa/Desktop/video_cmake /Users/ 
telcentrisholdingsa/Desktop/video_cmake /Users/telcentrisholdingsa/ 
Desktop/video_cmake/CMakeFiles/video.dir/DependInfo.cmake --color=
Dependee "/Users/telcentrisholdingsa/Desktop/video_cmake/CMakeFiles/ 
video.dir/DependInfo.cmake" is newer than depender "/Users/ 
telcentrisholdingsa/Desktop/video_cmake/CMakeFiles/video.dir/ 
depend.internal".
Scanning dependencies of target video
make -f CMakeFiles/video.dir/build.make CMakeFiles/video.dir/build
/opt/local/bin/cmake -E cmake_progress_report /Users/ 
telcentrisholdingsa/Desktop/video_cmake/CMakeFiles 1
[ 50%] Building CXX object CMakeFiles/video.dir/mainwindow.o
/usr/bin/c++   -DQT_DLL -DQT_PHONON_LIB -DQT_GUI_LIB -DQT_CORE_LIB - 
DQT_NO_DEBUG -I/usr/local/Trolltech/Qt-4.4.0/include -I/usr/local/ 
Trolltech/Qt-4.4.0/include/phonon -I/usr/local/Trolltech/Qt-4.4.0/ 
include/QtGui -I/usr/local/Trolltech/Qt-4.4.0/include/QtCore   -F/usr/ 
local/Trolltech/Qt-4.4.0/lib  -o CMakeFiles/video.dir/mainwindow.o -c / 
Users/telcentrisholdingsa/Desktop/video_cmake/mainwindow.cpp
/opt/local/bin/cmake -E cmake_progress_report /Users/ 
telcentrisholdingsa/Desktop/video_cmake/CMakeFiles 2
[ 75%] Building CXX object CMakeFiles/video.dir/main.o
/usr/bin/c++   -DQT_DLL -DQT_PHONON_LIB -DQT_GUI_LIB -DQT_CORE_LIB - 
DQT_NO_DEBUG -I/usr/local/Trolltech/Qt-4.4.0/include -I/usr/local/ 
Trolltech/Qt-4.4.0/include/phonon -I/usr/local/Trolltech/Qt-4.4.0/ 
include/QtGui -I/usr/local/Trolltech/Qt-4.4.0/include/QtCore   -F/usr/ 
local/Trolltech/Qt-4.4.0/lib  -o CMakeFiles/video.dir/main.o -c /Users/ 
telcentrisholdingsa/Desktop/video_cmake/main.cpp
/opt/local/bin/cmake -E cmake_progress_report /Users/ 
telcentrisholdingsa/Desktop/video_cmake/CMakeFiles 3
[100%] Building CXX object CMakeFiles/video.dir/moc_mainwindow.o
/usr/bin/c++   -DQT_DLL -DQT_PHONON_LIB -DQT_GUI_LIB -DQT_CORE_LIB - 
DQT_NO_DEBUG -I/usr/local/Trolltech/Qt-4.4.0/include -I/usr/local/ 
Trolltech/Qt-4.4.0/include/phonon -I/usr/local/Trolltech/Qt-4.4.0/ 
include/QtGui -I/usr/local/Trolltech/Qt-4.4.0/include/QtCore   -F/usr/ 
local/Trolltech/Qt-4.4.0/lib  -o CMakeFiles/video.dir/moc_mainwindow.o  
-c /Users/telcentrisholdingsa/Desktop/video_cmake/moc_mainwindow.cxx
Linking CXX executable video
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/video.dir/ 
link.txt --verbose=1
/usr/bin/c++    -Wl,-search_paths_first -headerpad_max_install_names - 
fPIC CMakeFiles/video.dir/mainwindow.o CMakeFiles/video.dir/main.o  
CMakeFiles/video.dir/moc_mainwindow.o  -o video  -F/usr/local/ 
Trolltech/Qt-4.4.0/lib -framework phonon -framework QtGui -framework  
Carbon -framework AppKit -framework QtDBus -framework QtXml -framework  
QtCore /usr/lib/libz.dylib -framework ApplicationServices
/opt/local/bin/cmake -E cmake_progress_report /Users/ 
telcentrisholdingsa/Desktop/video_cmake/CMakeFiles  1 2 3 4
[100%] Built target video
/opt/local/bin/cmake -E cmake_progress_start /Users/ 
telcentrisholdingsa/Desktop/video_cmake/CMakeFiles 0



On Oct 28, 2008, at 4:01 PM, Bill Hoffman wrote:

> Alexander Solis wrote:
>> Sorry about that, you were right, I was missing the link to phonon.  
>> It solved the problem for CMake 2.6 but not for CMake 2.4.
>> *Here is the make VERBOSE=1 using cmake 2.4:*
>> *
>> *
>
> So, can we get a make VERBOSE=1 comparison with the working 2.6 and  
> the broken 2.4?
>
>
> Although if 2.6 works, why can't you use that?   You said you picked  
> 2.4  because 2.6 had errors, seems to be the opposite is true...  :)
>
>
> -Bill
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081028/2e8674a2/attachment-0001.htm>


More information about the CMake mailing list