Re: [protobuf] Linking Errors Using Sun Studio 12.1 on SPARC

2010-06-03 Thread Monty Taylor
On 06/03/2010 03:14 PM, Kenton Varda wrote:
> 
> 
> On Fri, May 28, 2010 at 11:25 AM, Hering  > wrote:
> 
> Hi,
> 
> I am trying to build versions 2.3.0 and 2.3.0rc2 with Sun Studio 12
> Update 1 compiler on a Solaris SPARC box without success.  The
> compilation goes well but the linking phase fails for both versions:
> 
> $ ( distro="/GAAL/chenher/share/protobuf/distro-sparc-2.3.0rc2-64bit";
> rm -rf ${distro}; sunstudio_home="/GAAL/chenher/share/sunstudio12.1";
> export PATH="/GAAL/chenher/bin:${JAVA_HOME}/bin:${sunstudio_home}/bin:/
> bin:/usr/bin:/usr/ccs/bin:/sbin:/usr/ucb:"; export LD_LIBRARY_PATH="/
> GAAL/chenher/share/sunstudio12.1/lib"; export CFLAGS="-m64 -
> xcode=pic32"; export CXXFLAGS="-m64 -xcode=pic32 -library=stlport4 -
> template=no%extdef"; export LDFLAGS="-m64"; ./configure --prefix=$
> {distro} "CFLAGS=${CFLAGS}" "CXXFLAGS=${CXXFLAGS}" "LDFLAGS=$
> {LDFLAGS}" )
> ...

Have you tried building it without injecting these extra CFLAGS and
CXXFLAGS? We've already got code in protobuf configure which builds with
stlport no%extdef. (We build with Sun Studio on Sparc and link to our
own project as part of the Drizzle project) ... I can't say for sure
_why_ you adding those flags in that way there would break - but if you
wouldn't mind trying it with no CFLAGS, CXXFLAGS or LDFLAGS in your env
and seeing if it works for you, I'd appreciate it - it will help track
down where the problem is for you.

> $ make clean all check install
> ...
> libtool: compile:  CC -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -
> xmemalign=8s -m64 -xcode=pic32 -library=stlport4 -template=no%extdef -
> c google/protobuf/compiler/parser.cc -o parser.o >/dev/null 2>&1
> /bin/bash ../libtool --tag=CXX   --mode=link CC -D_REENTRANT   -
> xmemalign=8s -m64 -xcode=pic32 -library=stlport4 -template=no%extdef -
> version-info 6:0:0 -export-dynamic -no-undefined -m64 -o
> libprotobuf.la  -rpath
> /GAAL/chenher/share/protobuf/distro-
> sparc-2.3.0rc2-64bit/lib/sparcv9 common.lo once.lo hash.lo
> extension_set.lo generated_message_util.lo message_lite.lo
> repeated_field.lo wire_format_lite.lo coded_stream.lo
> zero_copy_stream.lo zero_copy_stream_impl_lite.lo strutil.lo
> substitute.lo structurally_valid.lo descriptor.lo descriptor.pb.lo
> descriptor_database.lo dynamic_message.lo extension_set_heavy.lo
> generated_message_reflection.lo message.lo reflection_ops.lo
> service.lo text_format.lo unknown_field_set.lo wire_format.lo
> gzip_stream.lo printer.lo tokenizer.lo zero_copy_stream_impl.lo
> importer.lo parser.lo -lpthread -lz
> libtool: link: CC -G -zdefs -hlibprotobuf.so.6 -o .libs/libprotobuf.so.
> 6.0.0   .libs/common.o .libs/once.o .libs/hash.o .libs/
> extension_set.o .libs/generated_message_util.o .libs/
> message_lite.o .libs/repeated_field.o .libs/wire_format_lite.o .libs/
> coded_stream.o .libs/zero_copy_stream.o .libs/
> zero_copy_stream_impl_lite.o .libs/strutil.o .libs/substitute.o .libs/
> structurally_valid.o .libs/descriptor.o .libs/descriptor.pb.o .libs/
> descriptor_database.o .libs/dynamic_message.o .libs/
> extension_set_heavy.o .libs/generated_message_reflection.o .libs/
> message.o .libs/reflection_ops.o .libs/service.o .libs/
> text_format.o .libs/unknown_field_set.o .libs/wire_format.o .libs/
> gzip_stream.o .libs/printer.o .libs/tokenizer.o .libs/
> zero_copy_stream_impl.o .libs/importer.o .libs/parser.o   -
> library=stlport4 -lpthread -lz -lc   -m64 -m64
> Undefined   first referenced
>  symbol in file
> void __Crun::pure_error() .libs/common.o  (symbol belongs to
> implicit dependency /nfsdata/taqstore-tr18/chenher/share/sunstudio12.1/
> lib/sparc/64/libCrun.so.1)
> void*__Crun::simple_down_cast(void*,const
> __Crun::static_type_info*,const __Crun::static_type_info*) .libs/
> descriptor.o  (symbol belongs to implicit dependency /nfsdata/taqstore-
> tr18/chenher/share/sunstudio12.1/lib/sparc/64/libCrun.so.1)
> void*operator new(unsigned long,void*)  .libs/
> common.o  (symbol belongs to implicit dependency /nfsdata/taqstore-
> tr18/chenher/share/sunstudio12.1/lib/sparc/64/libCrun.so.1)
> void __Crun::ex_rethrow_q()   .libs/common.o  (symbol belongs to
> implicit dependency /nfsdata/taqstore-tr18/chenher/share/sunstudio12.1/
> lib/sparc/64/libCrun.so.1)
> void __Crun::register_exit_code(void(*)()extern"C") .libs/
> descriptor.o  (symbol belongs to implicit dependency /nfsdata/taqstore-
> tr18/chenher/share/sunstudio12.1/lib/sparc/64/libCrun.so.1)
> bool __Crun::ex_skip().libs/extension_set.o  (symbol
> belongs to implicit dependency /nfsdata/taqstore-tr18/chenher/share/
> sunstudio12.1/l

Re: [protobuf] Linking Errors Using Sun Studio 12.1 on SPARC

2010-06-03 Thread Kenton Varda
On Fri, May 28, 2010 at 11:25 AM, Hering  wrote:

> Hi,
>
> I am trying to build versions 2.3.0 and 2.3.0rc2 with Sun Studio 12
> Update 1 compiler on a Solaris SPARC box without success.  The
> compilation goes well but the linking phase fails for both versions:
>
> $ ( distro="/GAAL/chenher/share/protobuf/distro-sparc-2.3.0rc2-64bit";
> rm -rf ${distro}; sunstudio_home="/GAAL/chenher/share/sunstudio12.1";
> export PATH="/GAAL/chenher/bin:${JAVA_HOME}/bin:${sunstudio_home}/bin:/
> bin:/usr/bin:/usr/ccs/bin:/sbin:/usr/ucb:"; export LD_LIBRARY_PATH="/
> GAAL/chenher/share/sunstudio12.1/lib"; export CFLAGS="-m64 -
> xcode=pic32"; export CXXFLAGS="-m64 -xcode=pic32 -library=stlport4 -
> template=no%extdef"; export LDFLAGS="-m64"; ./configure --prefix=$
> {distro} "CFLAGS=${CFLAGS}" "CXXFLAGS=${CXXFLAGS}" "LDFLAGS=$
> {LDFLAGS}" )
> ...
>
> $ make clean all check install
> ...
> libtool: compile:  CC -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -
> xmemalign=8s -m64 -xcode=pic32 -library=stlport4 -template=no%extdef -
> c google/protobuf/compiler/parser.cc -o parser.o >/dev/null 2>&1
> /bin/bash ../libtool --tag=CXX   --mode=link CC -D_REENTRANT   -
> xmemalign=8s -m64 -xcode=pic32 -library=stlport4 -template=no%extdef -
> version-info 6:0:0 -export-dynamic -no-undefined -m64 -o
> libprotobuf.la -rpath /GAAL/chenher/share/protobuf/distro-
> sparc-2.3.0rc2-64bit/lib/sparcv9 common.lo once.lo hash.lo
> extension_set.lo generated_message_util.lo message_lite.lo
> repeated_field.lo wire_format_lite.lo coded_stream.lo
> zero_copy_stream.lo zero_copy_stream_impl_lite.lo strutil.lo
> substitute.lo structurally_valid.lo descriptor.lo descriptor.pb.lo
> descriptor_database.lo dynamic_message.lo extension_set_heavy.lo
> generated_message_reflection.lo message.lo reflection_ops.lo
> service.lo text_format.lo unknown_field_set.lo wire_format.lo
> gzip_stream.lo printer.lo tokenizer.lo zero_copy_stream_impl.lo
> importer.lo parser.lo -lpthread -lz
> libtool: link: CC -G -zdefs -hlibprotobuf.so.6 -o .libs/libprotobuf.so.
> 6.0.0   .libs/common.o .libs/once.o .libs/hash.o .libs/
> extension_set.o .libs/generated_message_util.o .libs/
> message_lite.o .libs/repeated_field.o .libs/wire_format_lite.o .libs/
> coded_stream.o .libs/zero_copy_stream.o .libs/
> zero_copy_stream_impl_lite.o .libs/strutil.o .libs/substitute.o .libs/
> structurally_valid.o .libs/descriptor.o .libs/descriptor.pb.o .libs/
> descriptor_database.o .libs/dynamic_message.o .libs/
> extension_set_heavy.o .libs/generated_message_reflection.o .libs/
> message.o .libs/reflection_ops.o .libs/service.o .libs/
> text_format.o .libs/unknown_field_set.o .libs/wire_format.o .libs/
> gzip_stream.o .libs/printer.o .libs/tokenizer.o .libs/
> zero_copy_stream_impl.o .libs/importer.o .libs/parser.o   -
> library=stlport4 -lpthread -lz -lc   -m64 -m64
> Undefined   first referenced
>  symbol in file
> void __Crun::pure_error() .libs/common.o  (symbol belongs to
> implicit dependency /nfsdata/taqstore-tr18/chenher/share/sunstudio12.1/
> lib/sparc/64/libCrun.so.1)
> void*__Crun::simple_down_cast(void*,const
> __Crun::static_type_info*,const __Crun::static_type_info*) .libs/
> descriptor.o  (symbol belongs to implicit dependency /nfsdata/taqstore-
> tr18/chenher/share/sunstudio12.1/lib/sparc/64/libCrun.so.1)
> void*operator new(unsigned long,void*)  .libs/
> common.o  (symbol belongs to implicit dependency /nfsdata/taqstore-
> tr18/chenher/share/sunstudio12.1/lib/sparc/64/libCrun.so.1)
> void __Crun::ex_rethrow_q()   .libs/common.o  (symbol belongs to
> implicit dependency /nfsdata/taqstore-tr18/chenher/share/sunstudio12.1/
> lib/sparc/64/libCrun.so.1)
> void __Crun::register_exit_code(void(*)()extern"C") .libs/
> descriptor.o  (symbol belongs to implicit dependency /nfsdata/taqstore-
> tr18/chenher/share/sunstudio12.1/lib/sparc/64/libCrun.so.1)
> bool __Crun::ex_skip().libs/extension_set.o  (symbol
> belongs to implicit dependency /nfsdata/taqstore-tr18/chenher/share/
> sunstudio12.1/lib/sparc/64/libCrun.so.1)
> void __Crun::ex_clean()   .libs/extension_set.o  (symbol
> belongs to implicit dependency /nfsdata/taqstore-tr18/chenher/share/
> sunstudio12.1/lib/sparc/64/libCrun.so.1)
> void __Crun::ex_rethrow() .libs/extension_set.o  (symbol
> belongs to implicit dependency /nfsdata/taqstore-tr18/chenher/share/
> sunstudio12.1/lib/sparc/64/libCrun.so.1)
> void operator delete(void*,void*)  .libs/
> extension_set.o  (symbol belongs to implicit dependency /nfsdata/
> taqstore-tr18/chenher/share/sunstudio12.1/lib/sparc/64/libCrun.so.1)
> void*operator new[](unsigned long)   .libs/
> extension_set.o  (symbol belongs to implicit dependency /nfsdata/
> taqstore-tr18/chenher/share/sunstudio12.1/lib/sparc/64/libCrun.so.1)
> void*operator new(unsigned long)   .libs/common.o
> (symbol belongs to implicit dependency /nfsdata/taqsto