[protobuf] Issue 188 in protobuf: protobuf fails to link after compiling with LDFLAGS=-Wl,--as-needed because of missing -lpthread
Status: New Owner: ken...@google.com Labels: Type-Defect Priority-Medium New issue 188 by ssuomi...@unk.fi: protobuf fails to link after compiling with LDFLAGS=-Wl,--as-needed because of missing -lpthread http://code.google.com/p/protobuf/issues/detail?id=188 What steps will reproduce the problem? 1. export LDFLAGS=-Wl,--as-needed 2. ./configure 3. make What is the expected output? What do you see instead? Fails to link because of missing -lpthread in linker. Build logs and patch to fix the issue are here: http://bugs.gentoo.org/show_bug.cgi?id=271509 -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Re: Issue 188 in protobuf: protobuf fails to link after compiling with LDFLAGS=-Wl,--as-needed because of missing -lpthread
Comment #1 on issue 188 by xarthisius.kk: protobuf fails to link after compiling with LDFLAGS=-Wl,--as-needed because of missing -lpthread http://code.google.com/p/protobuf/issues/detail?id=188 To be exact: macro in acx_pthread.m4 searches for flags providing threads deps in a following order: ... -pthread ... -lpthread and is satisfied with whatever works first. As a result it settles with -pthread. It's error prone because -pthread is treated as CFLAG, and is not passed during linking phase. Switching order to: ... -lpthread ... -pthread adds -lpthread to LIBS instead, which is properly used during linking. Best regards, Kacper Kowalik -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Deadlock problems with protobuf static initialization in Java
Have anyone experienced deadlock problems related to Java protobuf generated messages static initialization? My multithreaded app seems to be stuck around internalBuildGeneratedFileFrom method. Workaround so far was to move first reference to one of my generated classes to out side of a synchronized block. I'm wondering whether protobuf initialization is deadlock proof/free. -Gatis -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
Re: [protobuf] Deadlock problems with protobuf static initialization in Java
Never seen it before... and the Java code is pretty extensively used. Surely someone would have hit this before. --Chris On May 15, 2010, at 9:03 PM, Igor Gatis igorga...@gmail.com wrote: Have anyone experienced deadlock problems related to Java protobuf generated messages static initialization? My multithreaded app seems to be stuck around internalBuildGeneratedFileFrom method. Workaround so far was to move first reference to one of my generated classes to out side of a synchronized block. I'm wondering whether protobuf initialization is deadlock proof/free. -Gatis -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
Re: [protobuf] Deadlock problems with protobuf static initialization in Java
Agreed. So I guess I need to start looking for the deadlock in my code. Do you know any tool to help me out on that? On Sun, May 16, 2010 at 1:38 AM, Christopher Smith cbsm...@gmail.comwrote: Never seen it before... and the Java code is pretty extensively used. Surely someone would have hit this before. --Chris On May 15, 2010, at 9:03 PM, Igor Gatis igorga...@gmail.com wrote: Have anyone experienced deadlock problems related to Java protobuf generated messages static initialization? My multithreaded app seems to be stuck around internalBuildGeneratedFileFrom method. Workaround so far was to move first reference to one of my generated classes to out side of a synchronized block. I'm wondering whether protobuf initialization is deadlock proof/free. -Gatis -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.comprotobuf%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.