anmar7889 / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
0 stars 1 forks source link

Linux: 2171: cmake binary distrib build fails on Ubuntu 14.04 32 and 64 bit #1430

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to cefbuilds.com and download branch 2171 for Linux 32 or 64
2. Follow instructions at the top of CMakeLists.txt for Linux and generate 
either "Unix Makefiles" or "Ninja"
3. Run "make cefsimple cefclient" or "ninja cefsimple cefclient"
4. Please see thread link at the bottom for exact linking error.

What is the expected output? What do you see instead?
Expected to be able to compile without errors by following the instructions in 
CMakeLists.txt. Instead, both cefsimple and cefclient failed to link correctly

What version of the product are you using? On what operating system?
Branch 2171 on Ubuntu 14.04 either 32 or 64 bit 

Please provide any additional information below.
Forum post with errors and workaround 
http://magpcss.org/ceforum/viewtopic.php?f=6&t=12319

Original issue reported on code.google.com by theonlyo...@gmail.com on 12 Nov 2014 at 5:22

GoogleCodeExporter commented 9 years ago
Paraphrasing the forum post:

Error:

Linking CXX executable Debug/cefclient
/usr/bin/ld: CMakeFiles/cefclient.dir/client_handler_gtk.cpp.o: undefined 
reference to symbol 'g_object_set_data'
/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/libgobject-2.0.so: 
error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Resolution:

It seems that libcef.so needs to be included before the standard libraries on 
the linker command line. The problem doesn't reproduce for me when I build both 
libcef and cefclient on the same system so maybe it's only a problem when 
libcef and cefclient are built on different Linux distros/versions.

We can potentially change the FIND_LINUX_LIBRARIES macro in macros.cmake to add 
libraries to the CEF_STANDARD_LIBS variable instead of CMAKE_EXE_*_FLAGS. 
They'd then be added to the target_link_libraries line in 
cefclient/CMakeLists.txt after libcef_dll_wrapper.

Original comment by magreenb...@gmail.com on 12 Nov 2014 at 5:42

GoogleCodeExporter commented 9 years ago

Original comment by magreenb...@gmail.com on 17 Nov 2014 at 5:04

GoogleCodeExporter commented 9 years ago
This problem seems to only occur when using the GNU linker (ld.bfd) which is 
the default on Ubuntu 14.04. Changing /usr/bin/ld to point at the Gold linker 
(ld.gold) fixes the problem.

Original comment by magreenb...@gmail.com on 25 Nov 2014 at 10:27

GoogleCodeExporter commented 9 years ago
CMake configuration fixed in trunk revision 1933 and 2171 branch revision 1934.

Original comment by magreenb...@gmail.com on 25 Nov 2014 at 10:36