[MDEV-8285] compile fails under Mac OS X 10.6.8 due to use of strnlen Created: 2015-06-08 Updated: 2015-06-14 Resolved: 2015-06-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Compiling |
| Affects Version/s: | 10.0.19-galera, 10.1.4 |
| Fix Version/s: | 10.0.20 |
| Type: | Bug | Priority: | Major |
| Reporter: | Bjarne D Mathiesen | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
I've got 2 older Mac Mini systems I'm using as headless servers: #=> system_profiler SPHardwareDataType SPSoftwareDataType Software: |
||
| Sprint: | 10.0.20 |
| Description |
|
We had a discussion on the macports developer mailing list & this is the conclusion: The mariadb build failures are easy: they're failing because strnlen is not defined. This is correct: strnlen was not part of OS X until 10.7. You should report this problem to the developers of mariadb. They need to either avoid using strnlen, or else provide an implementation of it when the OS does not. |
| Comments |
| Comment by Elena Stepanova [ 2015-06-08 ] |
|
Is 10.6 even supported still? |
| Comment by Bjarne D Mathiesen [ 2015-06-08 ] |
|
10.6 is EOL from Apple ; but it's my impression that many - like me - are still using it on older hardware - in part due to the fact that 10.6 is considered one of the most stable releases of the OS. 10.6 - and older - are still supported by the community through eg macports. So it's a question of whether MariaDB wants to address this problem - or - just says 'wontfix' |
| Comment by Elena Stepanova [ 2015-06-09 ] |
|
I would vote against supporting an alternative (or non-optimal, if that's what getting rid of strnlen would mean) implementation just for an EOL-ed version of OS X; but maybe there is a solution from which even modern versions could benefit – assigning to serg for consideration and final decision. |
| Comment by Sergei Golubchik [ 2015-06-09 ] |
|
We already have a configure-time check that detects system stnlen and our internal strnlen implementation in strings/strnlen.c that is used if the system one is not available. I don't know why it fails in this particular case, may be something in 10.6.8 or macports fools the configure-time check? |
| Comment by Bjarne D Mathiesen [ 2015-06-09 ] |
|
you can find the compile logs here : [#http://www.mathiesen.info/macports/] |
| Comment by Ryan Carsten Schmidt [ 2015-06-09 ] |
|
The configure check works fine. It correctly determines that the OS does not provide strnlen and compiles your implementation. The problem is that sometime between version 10.1.0 and 10.1.4, an invocation of strnlen was added to storage/connect/xobject.cpp, but the corresponding #include to include your implementation if needed was not also added. Not sure whether it should be #include "strings_def.h" or #include "m_string.h". |
| Comment by Sergei Golubchik [ 2015-06-09 ] |
|
Ah, great, thanks ryandesign. I think that should be enough for me to fix it. |