Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] linux: invalid conversion from ‘ClientHandler* const’ to ‘int’ [-fpermissive] #4174

Open
core-ai-bot opened this issue Aug 29, 2021 · 12 comments

Comments

@core-ai-bot
Copy link
Member

Issue by dz0ny
Thursday Jul 18, 2013 at 10:58 GMT
Originally opened as adobe/brackets#4505


make: *** [out/Release/obj.target/Brackets/appshell/appshell_extensions.o] Error 1
dz0ny@namizni:~/Namizje/brackets$ make
  CXX(target) out/Release/obj.target/Brackets/appshell/appshell_extensions.o
In file included from appshell/appshell_extensions.h:27:0,
                 from appshell/appshell_extensions.cpp:24:
appshell/client_handler.h:23:44: error: expected class-name before ‘,’ token
                       public CefDragHandler,
                                            ^
appshell/client_handler.h:74:21: error: ‘CefDragHandler’ was not declared in this scope
   virtual CefRefPtr<CefDragHandler> GetDragHandler() OVERRIDE {
                     ^
appshell/client_handler.h:74:35: error: template argument 1 is invalid
   virtual CefRefPtr<CefDragHandler> GetDragHandler() OVERRIDE {
                                   ^
appshell/client_handler.h:109:38: error: ‘CefDragData’ was not declared in this scope
                            CefRefPtr<CefDragData> dragData,
                                      ^
appshell/client_handler.h:109:49: error: template argument 1 is invalid
                            CefRefPtr<CefDragData> dragData,
                                                 ^
appshell/client_handler.h:110:28: error: ‘DragOperationsMask’ has not been declared
                            DragOperationsMask mask) OVERRIDE;
                            ^
appshell/client_handler.h: In member function ‘virtual int ClientHandler::GetDragHandler()’:
appshell/client_handler.h:75:12: error: invalid conversion from ‘ClientHandler* const’ to ‘int’ [-fpermissive]
     return this;
            ^
make: *** [out/Release/obj.target/Brackets/appshell/appshell_extensions.o] Error 1

Linux saucy 3.10.0-2-generic #11-Ubuntu SMP Thu Jul 11 16:07:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Also happens in arch https://aur.archlinux.org/packages/brackets-git/

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Thursday Jul 18, 2013 at 17:38 GMT


Assigned to me.@dz0ny seems like the CEF binaries might be missing. Did you follow the instructions here https://github.com/adobe/brackets/wiki/Linux-Development-for-Contributors?

There might have been an error when downloading the CEF zip file and the script could have skipped the error.

@core-ai-bot
Copy link
Member Author

Comment by jgaines
Thursday Jul 18, 2013 at 20:00 GMT


The problem appears to be that the drag handling support was added to CEF3 in 1543 revision 1274, and the binary the setup script pulls down is 1543 revision 1255 which is missing the drag handling code. Link below is the issue talking about this addition to CEF3:

http://code.google.com/p/chromiumembedded/issues/detail?id=601&q=label%3ACEF3

@core-ai-bot
Copy link
Member Author

Comment by timburgess
Friday Jul 19, 2013 at 01:37 GMT


I can confirm that this error disappears in later CEF builds i.e. it has an API dependency that is not met on CEF3 1543 1255. I've been building the shell against CEF 1543 rev 1301 and this compile error is gone.

@core-ai-bot
Copy link
Member Author

Comment by dz0ny
Friday Jul 19, 2013 at 07:33 GMT


Some progress here. I tried with CEF 3.1545.1306 - Chromium 29.0.1545.0 r207871 from http://cefbuilds.com/#branch_trunk bindings now compile fine, but main linking fails with missing macro PR_ARRAY_SIZE.

  LINK(target) out/Release/Brackets
out/Release/obj.target/libcef_dll_wrapper/libcef_dll/wrapper/libcef_dll_wrapper.o: In function `CefShutdown()':
libcef_dll_wrapper.cc:(.text+0x4d7): undefined reference to `CefCToCpp<CefDragDataCToCpp, CefDragData, _cef_drag_data_t>::DebugObjCt'
libcef_dll_wrapper.cc:(.text+0x4fc): undefined reference to `CefCppToC<CefDragHandlerCppToC, CefDragHandler, _cef_drag_handler_t>::DebugObjCt'
out/Release/obj.target/libcef_dll_wrapper/libcef_dll/cpptoc/client_cpptoc.o: In function `CefCppToC<CefDragHandlerCppToC, CefDragHandler, _cef_drag_handler_t>::Wrap(CefRefPtr<CefDragHandler>)':
client_cpptoc.cc:(.text._ZN9CefCppToCI20CefDragHandlerCppToC14CefDragHandler19_cef_drag_handler_tE4WrapE9CefRefPtrIS1_E[_ZN9CefCppToCI20CefDragHandlerCppToC14CefDragHandler19_cef_drag_handler_tE4WrapE9CefRefPtrIS1_E]+0x4f): undefined reference to `CefDragHandlerCppToC::CefDragHandlerCppToC(CefDragHandler*)'
Release/libcef.so: undefined reference to `PR_ARRAY_SIZE'
collect2: error: ld returned 1 exit status
make: *** [out/Release/Brackets] Error 1

// PR_ARRAY_SIZE should be 
#ifndef PR_ARRAY_SIZE
#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
#endif

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Friday Jul 19, 2013 at 16:17 GMT


Ah, right. Drag and drop was added this sprint and the linux CEF dependency should be updated to match win and mac at 3.1453.1279. Can you try this release and see if it works for you?

@core-ai-bot
Copy link
Member Author

Comment by dz0ny
Friday Jul 19, 2013 at 20:29 GMT


Hurray got it working.

I've also had to symlink libudev.0.so to libudev.1.so more info can be found at https://github.com/rogerwang/node-webkit/wiki/The-solution-of-lacking-libudev.so.0

Build can be found here https://github.com/dz0ny/brackets/releases/tag/sprint-27-linux

@core-ai-bot
Copy link
Member Author

Comment by nogo
Monday Jul 29, 2013 at 11:26 GMT


Hi I got the same problem here. I maintain the Arch package and try to update to the latest version.

  CXX(target) out/Release/obj.target/Brackets/appshell/appshell_extensions.o
  CXX(target) out/Release/obj.target/Brackets/appshell/appshell_node_process.o
  CXX(target) out/Release/obj.target/Brackets/appshell/cefclient.o
  CXX(target) out/Release/obj.target/Brackets/appshell/client_app.o
  CXX(target) out/Release/obj.target/Brackets/appshell/client_app_delegates.o
  CXX(target) out/Release/obj.target/Brackets/appshell/client_handler.o
  CXX(target) out/Release/obj.target/Brackets/appshell/client_switches.o
  CXX(target) out/Release/obj.target/Brackets/appshell/native_menu_model.o
  CXX(target) out/Release/obj.target/Brackets/appshell/string_util.o
  CXX(target) out/Release/obj.target/Brackets/appshell/appshell_extensions_gtk.o
  CXX(target) out/Release/obj.target/Brackets/appshell/appshell_node_process_linux.o
  CXX(target) out/Release/obj.target/Brackets/appshell/client_app_gtk.o
  CXX(target) out/Release/obj.target/Brackets/appshell/cefclient_gtk.o
  CXX(target) out/Release/obj.target/Brackets/appshell/client_handler_gtk.o
  CXX(target) out/Release/obj.target/Brackets/appshell/resource_util_linux.o
  LINK(target) out/Release/Brackets
Release/libcef.so: undefined reference to `PR_ARRAY_SIZE'
collect2: error: ld returned 1 exit status
make: *** [out/Release/Brackets] Error 1

Detail:
64bit Version
cef_binary_3.1547.1337_linux64 without Debug folder

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Monday Jul 29, 2013 at 16:47 GMT


@dz0ny Can you try the updated build scripts in adobe/brackets-shell#288, branch jasonsanjose/linux-sprint-28 ? I was able to build sprint 28 just fine and native drag and drop support is working for me on Ubuntu 32-bit.

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Monday Jul 29, 2013 at 18:17 GMT


@nogo I can reproduce that issue on 64-bit Ubuntu 12.04. I'm not sure what's wrong with the CEF build that we're using. I'll dig in further.

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Monday Jul 29, 2013 at 20:13 GMT


@nogo I'm having trouble getting even the cefclient test app to run. I started a thread on the CEF support forums here http://magpcss.org/ceforum/viewtopic.php?f=6&t=10896.

@core-ai-bot
Copy link
Member Author

Comment by nogo
Tuesday Jul 30, 2013 at 10:30 GMT


@jasonsanjose okay I checked the dependency but they are already installed, so I tried another cef build (3.1453.1337)

this one work without errors, so I will stick to this

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Wednesday Aug 28, 2013 at 16:34 GMT


Closing. Since this bug was last discussed, we've moved to CEF 3.1547.1354.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant