Bug #39181 Build error in MemoryManager.h in Pushbuild on sol10-sparc-a-max
Submitted: 2 Sep 2008 12:00 Modified: 8 Jan 18:20
Reporter: Olav Sandstaa
Status: Closed
Category:Server: Falcon Severity:S3 (Non-critical)
Version:6.0.7 OS:Sun Solaris (Solaris 10)
Assigned to: Olav Sandstaa Target Version:6.0.8
Tags: pushbuild, Sun Studio 10, Sun Studio 11
Triage: Triaged: D3 (Medium)

[2 Sep 2008 12:00] Olav Sandstaa
Description:
Falcon does not compile on the sol10-sparc-a-max pushbuild machine. The error message
is:

CC -DHAVE_CONFIG_H -D_REENTRANT -D_PTHREADS -DFALCONDB -DSTORAGE_ENGINE -DNAMESPACE=Nfs
-I. -I. -I../../include -I../../include -I../../include -I../../regex -I../../sql -I.
-I./TransformLib -I../../zlib     -g  -DSAFE_MUTEX -xO3 -noex -mt -D_FORTEC_ -xarch=v8  
-DHAVE_RWLOCK_T -D_DEBUG -c -o libhafalcon_a-BackLog.o `test -f 'BackLog.cpp' || echo
'./'`BackLog.cpp
"MemoryManager.h", line 47: Error: "inline" is not allowed here.
"MemoryManager.h", line 47: Error: always_inline is not defined.
"MemoryManager.h", line 47: Error: Badly formed expression.
"MemoryManager.h", line 50: Error: "inline" is not allowed here.
"MemoryManager.h", line 50: Error: __attribute__ is initialized twice.
"MemoryManager.h", line 50: Error: always_inline is not defined.
"MemoryManager.h", line 50: Error: Badly formed expression.
"MemoryManager.h", line 50: Error: n must be initialized.
"MemoryManager.h", line 50: Error: "," expected instead of ")".
"MemoryManager.h", line 51: Error: A declaration was expected instead of "}".
"MemoryManager.h", line 53: Error: "inline" is not allowed here.
"MemoryManager.h", line 53: Error: __attribute__ is initialized twice.
"MemoryManager.h", line 53: Error: always_inline is not defined.
"MemoryManager.h", line 53: Error: Badly formed expression.
"MemoryManager.h", line 53: Error: Use ";" to terminate declarations.
"MemoryManager.h", line 53: Error: "," expected instead of ")".
"MemoryManager.h", line 54: Error: A declaration was expected instead of "}".
"MemoryManager.h", line 56: Error: "inline" is not allowed here.
"MemoryManager.h", line 56: Error: __attribute__ is initialized twice.
"MemoryManager.h", line 56: Error: always_inline is not defined.
"MemoryManager.h", line 56: Error: Badly formed expression.
"MemoryManager.h", line 59: Error: "inline" is not allowed here.
"MemoryManager.h", line 59: Error: __attribute__ is initialized twice.
"MemoryManager.h", line 59: Error: always_inline is not defined.
"MemoryManager.h", line 59: Error: Badly formed expression.
Compilation aborted, too many Error messages.

See for instance:

https://intranet.mysql.com/secure/pushbuild/getlog.pl?dir=bzr_mysql-6.0-falcon-team&entry=...

How to repeat:
See pushbuild logs for sol10-sparc-a-max, for instance:

https://intranet.mysql.com/secure/pushbuild/getlog.pl?dir=bzr_mysql-6.0-falcon-team&entry=...
[2 Sep 2008 12:13] John H. Embretsen
Sometimes the build fails with a timeout instead, which is probably a separate issue (see
Bug#32725). The timout has masked the error reported in this bug report.

This issue was probably introduced August 22nd in the mysql-6.0-falcon-team branch, the
same day Falcon was in fact enabled in SPARC builds in Pushbuild.
[2 Sep 2008 12:46] Olav Sandstaa
With CC 5.7 from Sun Studio 10 the compilation error is easy to reproduce. With CC 5.9
from Sun Studio 12 the code compiles without errors.
[9 Sep 2008 22:01] Olav Sandstaa
Omer, one comment about the triage: To fix this problem requires changes in the Falcon
code, not the environment. The problem only occurs with older versions of the Sun Studio
compiler (Sun CC 5.7 and 5.8) due to they being more strict than the latest version found
in Sun Studio 12 (Sun CC 5.9).
[14 Sep 2008 22:13] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/54046

2823 Olav Sandstaa	2008-09-14
      Bug#39181 Build error in MemoryManager.h in Pushbuild on sol10-sparc-a-max
      
      Fixed compilation error that occured with Sun Studio 10 (Sun CC 5.7) due to
      inclusion of gcc specific code.
[8 Jan 18:20] MC Brown
A note has been added to the 6.0.8 changelog: 

Building MySQL with Falcon support using Sun Studio 10 would fail due to GNU CC specific
code within MemoryManager.h.