[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: protobuf*



it looks like protobuf is not properly built, because there are
pthread_* symbols references in its .so, but there's no NEEDED entry for
libpthread. At least when trying to configure protobuf-c, linking fails,
and when trying to link a stupid program (e.g. ˙˙int main(void) { return
0;˙˙) against libprotobuf, one has to use -lpthread -lprotobuf,
-lprotobuf being insufficient. I *think* protobuf is at fault here, but
I'd like some input before reporting the bug there.

It does not look like it is primarily bug of protobuf,
as build log contains:

libtool: link: g++ -shared -nostdlib /usr/lib/gcc/x86_64-kfreebsd-gnu/4.3.3/../../../../lib/crti.o /usr/lib/gcc/x86_64-kfreebsd-gnu/4.3.3/crtbeginS.o .libs/code_generator.o .libs/command_line_interface.o .libs/cpp_enum.o .libs/cpp_enum_field.o .libs/cpp_extension.o .libs/cpp_field.o .libs/cpp_file.o .libs/cpp_generator.o .libs/cpp_helpers.o .libs/cpp_message.o .libs/cpp_message_field.o .libs/cpp_primitive_field.o .libs/cpp_service.o .libs/cpp_string_field.o .libs/java_enum.o .libs/java_enum_field.o .libs/java_extension.o .libs/java_field.o .libs/java_file.o .libs/java_generator.o .libs/java_helpers.o .libs/java_message.o .libs/java_message_field.o .libs/java_primitive_field.o .libs/java_service.o .libs/python_generator.o -Wl,-rpath -Wl,/build/buildd-protobuf_2.1.0-1-kfreebsd-amd64-yPih6J/protobuf-2.1.0/src/.libs ./.libs/libprotobuf.so -lz -L/usr/lib/gcc/x86_64-kfreebsd-gnu/4.3.3 -L/usr/lib/gcc/x86_64-kfreebsd-gnu/4.3.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-kfreebsd-gnu/4.3.3/../../.. -L/usr/lib/x86_64-kfreebsd-gnu -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-kfreebsd-gnu/4.3.3/crtendS.o /usr/lib/gcc/x86_64-kfreebsd-gnu/4.3.3/../../../../lib/crtn.o -pthread -pthread -Wl,-soname -Wl,libprotoc.so.4 -o .libs/libprotoc.so.4.0.0 libtool: link: (cd ".libs" && rm -f "libprotoc.so.4" && ln -s "libprotoc.so.4.0.0" "libprotoc.so.4")


dpkg-shlibdeps: warning: symbol pthread_once used by debian/libprotobuf4/usr/lib/libprotobuf.so.4.0.0 found in none of the libraries.


The libprotobuf.so.4.0.0 should be linked against libpthread.so due to -pthread flag. Maybe bug of libtool or rest of the toolchain.

Petr

Reply to: