Hi,
I am trying to build and run a project using protobuf-lite, my library (libMaster.so) links to another library (libpulsar.so).
Scenario 1 - both libraries use protobuf classes.
libpulsar.so includes static library libprotobuf-lite.a but is built with -fvisibility=hidden hence libMaster.so also needs to statically include libprotobuf-lite.a
Project is built but during run time I get an error
protobuf::internal::GetEmptyStringAlreadyInited(): Assertion `empty_string_ != __null' failed
Scenario 2 -
I pushed all protobuf related code to libpulsar.so, hence only this library includes static library libprotobuf-lite.a, libMaster.so doesn't include libprotobuf-lite.a. code runs fine during run time.
I don't understand why Scenario 1 fails but Scenario 2 passes. Is there some restriction that the static library can't be included twice.
Regards,
Jai
PS: I am restricted to use libprotobuf-lite.a and can't use the shared library.