Page 1 of 1

re-compile cef as relocatable

PostPosted: Mon Dec 16, 2019 8:30 am
by tgayet
Hi,

I would have liked to know as a CEF compilation so as to make it relocatable?

Indeed when I compile CEF on a computer it works but when I move elsewhere, it does not work anymore and I have a crash.

If I recompile CEF on a second computer it works.

I think there is a way to make CEF relocatable so as to have a binary independent of the target.

Is there a flag, a method to do this?

Thanks in advance

Thierry

Re: re-compile cef as relocatable

PostPosted: Mon Dec 16, 2019 9:04 am
by Czarek
I suggest you take a look at cefsimple / cefclient sample applications. Or do you have issues with these as well?

Re: re-compile cef as relocatable

PostPosted: Mon Dec 16, 2019 9:25 am
by tgayet
Hi again.

It works with cefsimple.

I do not use simplecef nor cefclient but my own binary which links with libcef.so through the wrapper.

Usually it is customary to provide the -fPIC flag to the linker (need with dynamic library) to make it independent from one computer to another.

Do you use specific flags?

Regards

Thierry

Re: re-compile cef as relocatable

PostPosted: Mon Dec 16, 2019 9:30 am
by Czarek
Try adding linker flags: -Wl,-rpath,. -Wl,-rpath,"\$$ORIGIN". You can find these flags are used in cefsimple / cefclient apps.