Bug #40507 my_demangle defined twice when compiling with icc 10.1
Submitted: 4 Nov 2008 17:17 Modified: 18 Feb 2009 6:48
Reporter: Serge Adda Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.1.29, 5.1 bzr OS:Linux (x64)
Assigned to: CPU Architecture:Any
Tags: Contribution, icc

[4 Nov 2008 17:17] Serge Adda
Description:
my_demangle is defined twice when compiling with icc 10.1.

It seems that icc is not supporting __attribute__ ((weak)) used in mysys/stacktrace.c.

How to repeat:
install icc
. iccvars.sh
configure using the instructions from 5.1 manual:
CC=icc CXX=icpc CFLAGS="-O3 -unroll2 -ip -mp -no-gcc -restrict"
CXXFLAGS="-O3 -unroll2 -ip -mp -no-gcc -restrict" ./configure
--prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data
--libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex
--enable-thread-safe-client --enable-local-infile --enable-assembler
--disable-shared --with-client-ldflags=-all-static
--with-mysqld-ldflags=-all-static --with-embedded-server --with-innodb
make

Suggested fix:
# diff mysys/stacktrace.c.orig mysys/stacktrace.c
69a70,73
> #if defined(__INTEL_COMPILER)
> #pragma weak my_demangle=my_demangle_null
> char *my_demangle_null(const char *mangled_name, int *status)
> #else /* __INTEL_COMPILER */
70a75
> #endf /* !__INTEL_COMPILER */
[15 Dec 2008 22:15] Sveta Smirnova
Thank you for the report.

Verified as described.
[18 Feb 2009 6:48] Sveta Smirnova
Bug is not repeatable with 5.1-bugteam tree for me. Closed as "Can't repeat". Please wait next release.
[18 Feb 2009 7:51] Sveta Smirnova
Current version 5.1 can be compiled successfully as well.

Please upgrade.