[CDRIVER-1041] Build 1.3.0 failure on sparc: strnlen undefined Created: 08/Dec/15  Updated: 18/Jan/16  Resolved: 09/Dec/15

Status: Closed
Project: C Driver
Component/s: libbson, libmongoc
Affects Version/s: 1.3.0
Fix Version/s: 1.3.1

Type: Bug Priority: Critical - P2
Reporter: Jeroen Ooms [X] Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris Sparc 10



 Description   

Build fails on sparc with "symbol strnlen: referenced symbol not found". Two issues:

  • In bson-config.h we define BSON_HAVE_STRNLEN, however bson-string.c uses HAVE_STRNLEN
  • mongoc-cursor.c has another call to strnlen which is not conditioned at all.


 Comments   
Comment by Jeroen Ooms [X] [ 09/Dec/15 ]

That is correct, strnlen was introduced in Solaris 11. So you would need Solaris 10 to test.

Comment by A. Jesse Jiryu Davis [ 09/Dec/15 ]

Interesting; our test machine is Solaris 11 with the latest gcc from opencsw (gcc 4.9.2). The driver compiles there without your patch. In any case, your patch is correct, thanks for your contribution!

Comment by Jeroen Ooms [X] [ 08/Dec/15 ]

I'm using the latest gcc from opencsw on Solaris Sparc 10.

Comment by A. Jesse Jiryu Davis [ 08/Dec/15 ]

Thanks Jeroen. I want to know why we didn't catch this. What compiler & version are you using that fails?

Comment by Jeroen Ooms [X] [ 08/Dec/15 ]

Pull requests:

Generated at Wed Feb 07 21:11:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.