Bug #47950 innodb compile error with Sun Studio
Submitted: 9 Oct 2009 16:16 Modified: 9 Oct 2009 18:37
Reporter: Vladislav Vaintroub Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:mysql-next-mr OS:Solaris
Assigned to: CPU Architecture:Any

[9 Oct 2009 16:16] Vladislav Vaintroub
when compiling the latest mysql-next-mr on solaris with Sun Studio,
compile fails in innodb with 
 cc -DHAVE_CONFIG_H -I. -I../../include -I../../include -I../../include -I../../regex -I./include -I../../sql -I. -DMYSQL_DYNAMIC_PLUGIN -O1 -DHAVE_RWLOCK_T -DUNIV_SOLARIS -c btr/btr0btr.c  -KPIC -DPIC -o .libs/ha_innodb_la-btr0btr.o

"include/page0page.ic", line 921: only identifiers with external linkage may have linker scoping: page_mem_alloc_free

Investigation shows that the error is caused by incorrectly used UNIV_INTERN in the code

How to repeat:

Suggested fix:
=== modified file 'storage/innobase/include/page0page.ic'
--- storage/innobase/include/page0page.ic	2009-05-27 09:45:59 +0000
+++ storage/innobase/include/page0page.ic	2009-10-09 15:13:39 +0000
@@ -907,7 +907,7 @@
 Allocates a block of memory from the free list of an index page. */
[9 Oct 2009 16:24] Vladislav Vaintroub
clarification on OS and compiler :
OS is OpenSolaris, compiler is SunStudio Express.
[9 Oct 2009 18:37] Valeriy Kravchuk
Looks like a duplicate of bug #47058.
[9 Oct 2009 18:48] Vladislav Vaintroub
Yep, indeed a duplicate
Worth mentioning are 2 completely identical fix suggestions :)