kidok / protobuf

Automatically exported from code.google.com/p/protobuf
0 stars 0 forks source link

Protobuf fails to build on Solaris 10/11 #602

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to build on Solaris 10/11 with GCC or Solaris Studio.

What is the expected output? What do you see instead?
I expect Protobuf to build and for make check to be successful. Protobuf fails 
to build.

What version of the product are you using? On what operating system?
2.5.0 and subversion trunk. Solaris 10 and Solaris 11. Both x86 and SPARC.

Please provide any additional information below.
Protobuf fails to build on Solaris for the following reasons:
* sched_yield() requires linking with librt on Solaris 10.
* Solaris Studio requires specifying -features=tmplrefstatic to handle some 
templates.
* atomic operations are missing for SPARC.

Protobuf make check fails with Solaris Studio because:
* #include <clocale> is missing from stringprintf_unittest.cc
* NULL literal recognition template fails.

Attached is a patch that fixes all these problems. Parts of it overlap issues 
561 and 565.

I have tested this patch against the following configurations:

Solaris 10:
 * SPARC:
   * GCC 3.4.3:
     * 32-bit: PASS
     * 64-bit: PASS
   * Solaris Studio 12.3:
     * 32-bit: PASS
     * 64-bit: PASS
 * x86:
   * GCC 3.4.3:
     * 32-bit: PASS
     * 64-bit: PASS
   * Solaris Studio 12.3:
     * 32-bit: PASS
     * 64-bit: PASS

Solaris 11.1:
 * x86:
   * GCC 4.5.2:
     * 32-bit: PASS
     * 64-bit: PASS
   * Solaris Studio 12.3:
     * 32-bit: PASS
     * 64-bit: PASS

Ubuntu 13.10:
(This was a sanity-check to ensure I didn't inadvertently break something.)
 * x86:
    * GCC 4.8.1
      * 64-bit: PASS

Test procedure:

$ ./configure
 or (for 32-bit): $ ./configure --disable-64bit-solaris
$ make
$ make check

PASS = built and all tests passed.

I don't have access to a SPARC Solaris 11 machine so I have not been able to 
test that configuration, although I believe it should work.

Original issue reported on code.google.com by j.l.ols...@gmail.com on 2 Feb 2014 at 10:42

Attachments:

GoogleCodeExporter commented 9 years ago
It would be nice to get protobuf working again on FreeBSD/sparc64 also. If 
anybody needs testing resources for that, ping me.

Original comment by mm42...@googlemail.com on 20 Feb 2014 at 1:49