Building CefSimple failing on Linux 64-bit

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Building CefSimple failing on Linux 64-bit

Postby Mayhew » Tue Sep 09, 2014 3:33 pm

I'm seeing the following errors when issuing ./build.sh Debug for the Cef 3.2062.1815+ CEF downloads from CEFBuilds.com

CXX(target) out/Debug/obj.target/cefsimple/cefsimple/simple_handler.o
CXX(target) out/Debug/obj.target/cefsimple/cefsimple/cefsimple_linux.o
CXX(target) out/Debug/obj.target/cefsimple/cefsimple/simple_handler_linux.o
In file included from ./include/base/cef_ref_counted.h:54:0,
from ./include/internal/cef_ptr.h:35,
from ./include/cef_base.h:40,
from ./include/cef_client.h:41,
from ./cefsimple/simple_handler.h:8,
from cefsimple/simple_handler_linux.cpp:5:
./include/base/cef_logging.h: In function ‘std::string* cef::logging::CheckNEImpl(const t1&, const t2&, const char*) [with t1 = long unsigned int, t2 = int, std::string = std::basic_string<char>]’:
cefsimple/simple_handler_linux.cpp:25:3: instantiated from here
./include/base/cef_logging.h:401:1: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
LINK(target) out/Debug/cefclient
cc1plus: all warnings being treated as errors
make: *** [out/Debug/obj.target/cefsimple/cefsimple/simple_handler_linux.o] Error 1
make: *** Waiting for unfinished jobs....
LINK(target) out/Debug/cefclient: Finished

I also tried 1821 and see the same thing. This is true for Debug and Release targets. I am building on Ubuntu 12.04.

John
Mayhew
Expert
 
Posts: 303
Joined: Mon Apr 18, 2011 8:02 pm

Re: Building CefSimple failing on Linux 64-bit

Postby magreenblatt » Tue Sep 09, 2014 3:43 pm

The fix is below. Added in 2062 branch revision 1824.
Code: Select all
Index: simple_handler_linux.cpp
===================================================================
--- simple_handler_linux.cpp   (revision 1815)
+++ simple_handler_linux.cpp   (revision 1816)
@@ -22,7 +22,7 @@
 
   // Retrieve the X11 window handle for the browser.
   ::Window window = browser->GetHost()->GetWindowHandle();
-  DCHECK_NE(window, kNullWindowHandle);
+  DCHECK(window != kNullWindowHandle);
 
   // Retrieve the atoms required by the below XChangeProperty call.
   const char* kAtoms[] = {
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Building CefSimple failing on Linux 64-bit

Postby Mayhew » Tue Sep 09, 2014 4:39 pm

While you are in there

cefclient.target.mk:113: warning: ignoring old commands for target `out/Debug/libpdf.so'
CXX(target) out/Debug/obj.target/cefclient/cefclient/cefclient_gtk.o
CXX(target) out/Debug/obj.target/cefsimple/cefsimple/simple_handler_linux.o
LINK(target) out/Debug/cefsimple
In file included from cefclient/cefclient_gtk.cpp:12:0:
./include/cef_urlrequest.h:58:35: error: multiple types in one declaration
./include/cef_urlrequest.h:58:35: error: declaration does not declare anything [-fpermissive]
make: *** [out/Debug/obj.target/cefclient/cefclient/cefclient_gtk.o] Error 1

cefclient_gtk.cpp needs
#undef Status // Definition conflicts with cef_urlrequest.h
at line 7
Mayhew
Expert
 
Posts: 303
Joined: Mon Apr 18, 2011 8:02 pm

Re: Building CefSimple failing on Linux 64-bit

Postby magreenblatt » Tue Sep 09, 2014 4:54 pm

Mayhew wrote:cefclient_gtk.cpp needs
#undef Status // Definition conflicts with cef_urlrequest.h
at line 7

Thanks, fixed in trunk revision 1825 and 2062 branch revision 1826.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 51 guests