Re: [protobuf] Android Cross Compile
Please also take a look at the config.log file, generated after running ./configure, in the project root directory; search for "checking for pthreads library" "checking whether pthreads work without any flags" There should be a line, after debug info, saying "result: no" or "result: yes" >From your error message, it seems android NDK doesn't require any flags to link pthread... On Thu, Mar 24, 2011 at 8:31 PM, Pherl Liu wrote: > Looks like pthread library is missing. This should have been covered > by the acx_pthread.m4 script. Could you please try to manually run the > linker(the g++ line you pasted in email), by adding extra -pthread > and/or -lpthread parameters? > > On Thu, Mar 10, 2011 at 3:42 AM, Evol wrote: >> Hello, >> >> I am attempting to cross-compile the libprotobuf library so I can use >> it on native android c/c++ code. Due to the ues of bionic as the >> android libc, I am getting the following error when I do a make. >> >> libtool: link: g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno- >> sign-compare -O2 -g -DNDEBUG -o .libs/protoc main.o ./.libs/ >> libprotobuf.so ./.libs/libprotoc.so -lz -Wl,-rpath -Wl,/usr/local/ >> android/lib >> ./.libs/libprotobuf.so: undefined reference to `pthread_once' >> >> I am using the standalone compiler that comes with the NDK. Thanks in >> advance for any help. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Protocol Buffers" group. >> To post to this group, send email to protobuf@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 protobuf@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] Android Cross Compile
Looks like pthread library is missing. This should have been covered by the acx_pthread.m4 script. Could you please try to manually run the linker(the g++ line you pasted in email), by adding extra -pthread and/or -lpthread parameters? On Thu, Mar 10, 2011 at 3:42 AM, Evol wrote: > Hello, > > I am attempting to cross-compile the libprotobuf library so I can use > it on native android c/c++ code. Due to the ues of bionic as the > android libc, I am getting the following error when I do a make. > > libtool: link: g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno- > sign-compare -O2 -g -DNDEBUG -o .libs/protoc main.o ./.libs/ > libprotobuf.so ./.libs/libprotoc.so -lz -Wl,-rpath -Wl,/usr/local/ > android/lib > ./.libs/libprotobuf.so: undefined reference to `pthread_once' > > I am using the standalone compiler that comes with the NDK. Thanks in > advance for any help. > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To post to this group, send email to protobuf@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 protobuf@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] Android Cross Compile
Hello, I am attempting to cross-compile the libprotobuf library so I can use it on native android c/c++ code. Due to the ues of bionic as the android libc, I am getting the following error when I do a make. libtool: link: g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno- sign-compare -O2 -g -DNDEBUG -o .libs/protoc main.o ./.libs/ libprotobuf.so ./.libs/libprotoc.so -lz -Wl,-rpath -Wl,/usr/local/ android/lib ./.libs/libprotobuf.so: undefined reference to `pthread_once' I am using the standalone compiler that comes with the NDK. Thanks in advance for any help. -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@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.