[CDRIVER-367] Solaris bson.c does not compile / Warnings Created: 19/May/14 Updated: 03/May/17 Resolved: 19/May/14 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Udo Grabowski | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | bson | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
See Perl Driver #345 comment: |
||
| Description |
|
problems with Solaris CC compiler (x86): <https://github.com/mongodb/mongo-perl-driver/commit/16c440d9209b3f7eb5a42078b183419677878a18> does still not completely fix bson-context.c, see Perl driver "bson/bson.c", line 1267: left operand must be modifiable lvalue: op "=" is not fixed by this commit. Additionally, the current head of libbson cannot be exported by |
| Comments |
| Comment by Udo Grabowski [ 19/May/14 ] |
|
autoconf (GNU Autoconf) 2.69, automake (GNU automake) 1.11.6, libtool (GNU libtool) 2.4.2 (maybe a bit old). |
| Comment by Christian Hergert [ 19/May/14 ] |
|
Missing valid libtool perhaps? We have a couple of more requirements when building from Git that are not required when building from a release tarball. Namely:
|
| Comment by Udo Grabowski [ 19/May/14 ] |
|
Checked with autogen.sh (which left a spurios LT_PREREQ(2.2) in configure, which I deleted) and configure, exactly the same result as with |
| Comment by Christian Hergert [ 19/May/14 ] |
|
We have gone through considerable effort to make the configure scripts to check for everything. Duplicating that in CMake is a Sisyphean task, so it really only has the minimum necessary to build Visual Studio project files on Win32. |
| Comment by Udo Grabowski [ 19/May/14 ] |
|
Indeed, I DID use cmake, that usually works ok on OpenIndiana (has cmake 2.8.11). |
| Comment by Christian Hergert [ 19/May/14 ] |
|
I just want to double check that you are not using CMake. CMake is our build system for Win32 and should not be used on *nix's. (Use ./autogen.sh or ./configure if a release tarball, make, make check). |
| Comment by Udo Grabowski [ 19/May/14 ] |
|
I've "stealed" mbarrier.h and sys/mbarrier.h from the Update 2 distribution, and that compiled with Update 1. One error remained, "/tmp/libbson-e0af62fbe02ff07e0498814d1dfdba07644687c7/src/bson/bson-clock.c", line 55: identifier redeclared: bson_gettimeofday previous: function(pointer to struct timeval {long tv_sec, long tv_usec} , pointer to void) returning int : "/tmp/libbson-e0af62fbe02ff07e0498814d1dfdba07644687c7/src/bson/bson-clock.h", line 36 |
| Comment by Christian Hergert [ 19/May/14 ] |
|
Thanks for the update Udo, I was just about to suggest using the tar.gz export version from github. I imagine they are building the exported zip's with GNU zip, which might not be compatible with Solaris zip. (I know the default gtar, not using ustar format has similar issues). Our release tarballs do explicitly work around this by using ustar format. I'll look into adding a configure.ac check for mbarrier.h and fallback to an alternate means. If you are using Solaris Studio, however, this will probably be a lock/unlock and very much not optimal. (Otherwise I'll have to hand write assembler for SPARC/x86 which I'd like to avoid). Although, do you happen to know of an alternate memory barrier intrinsic for older Solaris Studio? In terms of format support, however, we will be supporting the newest Solaris Studio only. That said, I'd certainly like to see it support as much as possible. |
| Comment by Udo Grabowski [ 19/May/14 ] |
|
I could finally unzip it with 7z, but not unzip. Probably the 2.32 zip version is not compatible with the newer zip archive. The latest libbson-e0af62fbe02ff07e0498814d1dfdba07644687c7 cannot be compiled with Sun Studio 12 Update 1, because it needs |
| Comment by Christian Hergert [ 19/May/14 ] |
|
Libbson works and is supported on Solaris with Solaris CC compiler. The version bundled in the Perl driver is behind the version of Libbson that added support for Solaris. I verified on Linux the exported zip from github which also works just fine. |