Bug #57295 MySQL 5.1.51 not compiling from source
Submitted: 6 Oct 2010 22:09 Modified: 25 Oct 2010 22:27
Reporter: Gabriel Torres Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Compiling Severity:S1 (Critical)
Version:5.1.51 OS:Other (Debian)
Assigned to: CPU Architecture:Any

[6 Oct 2010 22:09] Gabriel Torres
Description:
The source code of 5.1.51 isn't compiling, exiting with the errors:

../libmysql/.libs/libmysqlclient.so: undefined reference to `_intel_fast_memset'
../libmysql/.libs/libmysqlclient.so: undefined reference to `_intel_fast_memcpy'

Researching online, this means that there are references to the Intel C++ compiler somewhere in the source code.

I have GCC installed, of course.

How to repeat:
download source code mysql-5.1.51.tar.gz
tar -xvzf mysql-5.1.51.tar.gz
cd mysql-5.1.51
./configure --withtout-server
make

Then the error messages will show up.

Suggested fix:
There something broken in the package.
[7 Oct 2010 0:59] Alexey Kishkin
I assume you meant '--without-server' , (not '--withtout-server'). But nevermind.

I cannot reproduce this problem on ubuntu 10.4.
Could you please provide output of

uname -a

?
[7 Oct 2010 16:18] Gabriel Torres
Linux mail.clubedohardware.com.br 2.6.26-1-686-bigmem #1 SMP Sat Jan 10 19:13:22 UTC 2009 i686 GNU/Linux

Thanks.
[7 Oct 2010 18:15] Sveta Smirnova
Thank you for the feedback.

Please also send us config.log file.
[7 Oct 2010 18:33] Gabriel Torres
Config.log as requested

Attachment: bug-data-57295.zip (application/x-zip-compressed, text), 37.46 KiB.

[7 Oct 2010 21:21] Sveta Smirnova
Thank you for the feedback.

config.log looks OK and shows gcc compiler was choose. But error you get is from Intel compiler. Do you have Intel compiler installed too?
[7 Oct 2010 21:25] Gabriel Torres
No, that's exactly the odd part. Somehow ./configure is setting up to use Intel compiler, even though I don't have it.
[8 Oct 2010 12:40] MySQL Verification Team
I couldn't repeat too:
make[1]: Leaving directory `/home/miguel/temp/mysql-5.1.51/win'
miguel@tikal:~/temp/mysql-5.1.51$ uname -a
Linux tikal 2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:32:27 UTC 2010 x86_64 GNU/Linux
miguel@tikal:~/temp/mysql-5.1.51$ gcc --version
gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
[8 Oct 2010 19:20] Sveta Smirnova
Thank you for the feedback.

Could you also please send output of `ldd ../libmysql/.libs/libmysqlclient.so`?
[8 Oct 2010 22:26] Gabriel Torres
mail:/downloads/mysql-5.1.51# ldd libmysql/.libs/libmysqlclient.so
        linux-gate.so.1 =>  (0xb7f2a000)
        libcrypt.so.1 => /lib/i686/cmov/libcrypt.so.1 (0xb7e75000)
        libnsl.so.1 => /lib/i686/cmov/libnsl.so.1 (0xb7e5c000)
        libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7e35000)
        libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7cda000)
        /lib/ld-linux.so.2 (0xb7f2b000)
mail:/downloads/mysql-5.1.51#
[13 Oct 2010 10:43] Susanne Ebrecht
I am not able to repeat this on debian.

Neither on 32bit nor on 64bit.

Please show output from ./configure
[14 Oct 2010 2:19] Alexey Kishkin
> Somehow ./configure is setting up to use Intel compiler, even though I don't have it.

Actually it means configure sets gcc, but 'make' tries to link with some libs, that had been compiled by icc.

Did you install before compiling on that computer any icc-related software? Or may be icc compiled mysql?
[14 Oct 2010 16:12] Gabriel Torres
Hum... Before (i.e., MySQL =< 5.1.50) I used the icc binaries, however you are not putting the icc compiled binaries for download anymore (i.e., 5.1.51). So maybe there is "old stuff" from the 5.1.50 icc laying around somewhere in my server... I will take a look into this possibility.
[25 Oct 2010 22:25] Gabriel Torres
It turned out to be a wrong file installed "everywhere", by carefully reading the last lines before the error, I could find that I copied libz.a and libz.la that where compiled using ICC from MySQL 5.1.50 to /usr/local/mysql/lib/, /usr/lib/ and /usr/local/lib of my server. Deleting these files solved the problem. 

We can close this ticket. The problem was specific to my server configuration.

Thank you for all the support.
[25 Oct 2010 22:27] MySQL Verification Team
According last comment.