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

I can't reload my new *.so static link protobuf on archlinux. #3782

Closed
pass86 opened this issue Oct 22, 2017 · 2 comments
Closed

I can't reload my new *.so static link protobuf on archlinux. #3782

pass86 opened this issue Oct 22, 2017 · 2 comments

Comments

@pass86
Copy link

pass86 commented Oct 22, 2017

main load warp.so
warp.so load core.so
make some change build new core.so
replace core.so
warp.so reload core.so
my change hasn't loaded
and maybe crash

main is always running
if I remove the *.pb.cc change is reloaded

I have done dlopen, dlsym, dlclose
I comment code and found ::google::protobuf::DescriptorPool::InternalAddGeneratedFile in AddDescriptorsImpl is the key
I think protobuf make core.so can't unload

protobuf-3.4.1
./configure CXXFLAGS=-fPIC

core.so
add_definitions("-std=c++11")
set(Protobuf_USE_STATIC_LIBS ON)
find_package(Protobuf)
set(inc_list ${Protobuf_INCLUDE_DIRS})
set(lib_list ${Protobuf_LIBRARIES})
include_directories(${inc_list})
add_library(core SHARED src/proto/core.pb.cc ${src_list})
target_link_libraries(core ${lib_list})

gcc 7.2.0

SOS

@acozzette
Copy link
Member

@xfxyjwf may have more info on this, but I believe we don't support dynamically loading protos, or especially reloading the same proto multiple times. This might be related to #1489.

@pass86
Copy link
Author

pass86 commented Oct 26, 2017

windows and macos reload my change.

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

2 participants