[MDEV-9802] [PATCH] Build fails on SmartOS and gcc 4.9.3 Created: 2016-03-27 Updated: 2020-04-04 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Compiling |
| Affects Version/s: | 10.1.8, 10.1.9, 10.1.13 |
| Fix Version/s: | 10.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Brian White | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | None | ||
| Environment: |
SmartOS 5.11 joyent_20160317T000621Z, gcc 4.9.3, binutils 2.25.1, gmake 4.1 |
||
| Issue Links: |
|
||||||||||||
| Description |
|
Compilation fails at mysys/my_context.c with:
I found that if I prioritize the #elif defined(HAVE_UCONTEXT_H) check in mysys/my_context.c so that it comes before the 64-bit GNUC check, then it compiles just fine. |
| Comments |
| Comment by Brian White [ 2016-03-27 ] | ||||||||||||||||||||||
|
I want to add that I have also tried ensuring -g is set in the cflags to workaround a compiler bug on solaris/sunos that was previously discussed on the mariadb mailing list, but no luck. | ||||||||||||||||||||||
| Comment by Ben Stillman [ 2017-09-07 ] | ||||||||||||||||||||||
|
This is still an issue with 10.2.8 and Joint SmartOS 14.4.0. Brian White's workaround above works, but for 10.2 #elif defined(HAVE_UCONTEXT_H) has moved to include/my_context.h. Change:
To:
| ||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-09-08 ] | ||||||||||||||||||||||
|
knielsen, was there a special reason why ucontext has lower priority than asm implementations? | ||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-09-08 ] | ||||||||||||||||||||||
|
ben, did you try this on x86_64? | ||||||||||||||||||||||
| Comment by Kristian Nielsen [ 2017-09-08 ] | ||||||||||||||||||||||
|
> was there a special reason why ucontext has lower priority than asm Sure, ucontext is much slower. The whole point of the asm implementations Why not fix the missing .cfi_startproc? I wonder what is special on the Try generating the assembler output from my_context.c (gcc -S) and check Does my_context_spawn() need _attribute_((noinline))? If the .cfi_escape is not available on SmartOS, it can just be disabled in (But it would still be interesting to see the assembler output from the | ||||||||||||||||||||||
| Comment by Valerii Kravchuk [ 2017-09-11 ] | ||||||||||||||||||||||
|
OpenIndiana Hipster edition is also affected: openxs@hipster:~/git/server$ uname -a The fix described by Ben above helped to proceed. | ||||||||||||||||||||||
| Comment by Rainer Orth [ 2018-01-25 ] | ||||||||||||||||||||||
|
I've just run into the same issue when compiling MariaDB 10.2.12 on Solaris 11.4 The issue is in no way SmartOS-specific, but can happen on any x86 target: gcc In such a case (when the assembler is partially able to handle cfi directives), it There are several ways out of this:
For the moment, the middle option should be use to avoid using cfi directives |