How to compile lp:compiz

Asked by MC Return on 2012-06-10

I want to help with Compiz development, so I figured it would be good to use actual HEAD and cloned lp:compiz.

"cmake .." finishes, but with warnings:

-- Could NOT find gcovr (missing: GCOVR_EXECUTABLE)
-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_MAIN_LIBRARY)

-- package 'xig-0' not found
CMake Warning at tests/integration/xig/CMakeLists.txt:30 (message):
  Xig not found, you will not be able to run X Server integration tests

"make" then throws this error:

[ 25%] Built target compiz_plugin
Linking CXX executable compiz_loader_test
/home/mcr2010/Documents/compiz/src/plugin.cpp:223: error: undefined reference to 'dlclose'
/home/mcr2010/Documents/compiz/src/plugin.cpp:162: error: undefined reference to 'dlopen'
/home/mcr2010/Documents/compiz/src/plugin.cpp:171: error: undefined reference to 'dlerror'
/home/mcr2010/Documents/compiz/src/plugin.cpp:174: error: undefined reference to 'dlsym'
/home/mcr2010/Documents/compiz/src/plugin.cpp:176: error: undefined reference to 'dlerror'
/home/mcr2010/Documents/compiz/src/plugin.cpp:210: error: undefined reference to 'dlclose'
/home/mcr2010/Documents/compiz/src/plugin.cpp:206: error: undefined reference to 'dlerror'
collect2: ld returned 1 exit status
make[2]: *** [src/plugin/tests/compiz_loader_test] Error 1
make[1]: *** [src/plugin/tests/CMakeFiles/compiz_loader_test.dir/all] Error 2
make: *** [all] Error 2

What is wrong, what is missing, how can I follow the bleeding edge ;) ?

Question information

Language:
English Edit question
Status:
Solved
For:
Compiz Edit question
Assignee:
No assignee Edit question
Solved by:
Daniel van Vugt
Solved:
2012-06-26
Last query:
2012-06-26
Last reply:
2012-06-17
Best Daniel van Vugt (vanvugt) said : #1

That error means the linker has not been told to link to the "dl" library. It needs to be given the flag "-ldl".

But don't worry about fixing the error. The offending code "compiz_loader_test" was deleted completely on 11 June. Just pull the latest source and that error should be gone.

MC Return (mc-return) said : #2

Unfortunately I get the same error after pulling the latest source.
Somehow the output reminds me of the error I get when trying to compile Emerald 0.9.5 on Precise, while others do not seem to have this problem, see bug 968112.
Any idea how to fix the undefined references errors ?

MC Return (mc-return) said : #3

After adding the linker flag "-ldl" lp:compiz finally compiles :)
Daniel, thanks a lot for the tip. 8)

I used cmake-gui to comfortably change compiling options (highly recommended).

MC Return (mc-return) said : #4

Thanks Daniel van Vugt, that solved my question.