Bug #57206 my_config.h does not copy into the install directory
Submitted: 3 Oct 2010 19:51 Modified: 14 Dec 2010 13:58
Reporter: Vikram J. Gurjar Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.1.50 OS:Linux (Centos 5.5)
Assigned to: CPU Architecture:Any

[3 Oct 2010 19:51] Vikram J. Gurjar
Description:
Did a minimal install of Centos 5.5.  Do not install mysql from the RPMs...

Installed MySQL 5.1.50 from source.

Then I installed Apache and PHP (all all their associated dependencies) from source.

While compiling PHP, I got an error

Unable to locate my_config.h 

How to repeat:
On a minimal Centos 5.5 installation (without the RPM based mysql) copy the source code (MySQL 5.1.50) and compile normally

./configure  LDFLAGS="-L/usr/local/ssl -L/usr/lib -L/usr/local/lib" CFLAGS="-I/usr/local/ssl/include/openssl -I/usr/include -I/usr/local/include"   CPPFLAGS="-I/usr/local/ssl/include/openssl -I/usr/include -I/usr/local/include"   --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --datadir=/var/lib --with-charset=utf8 --with-extra-charsets=all --with-unix-socket-path=/var/lib/mysql/mysql.sock --with-ssl --enable-thread-safe-client --with-plugins=all

make && make install

The my_config.h file does not copy to /usr/include/mysql/my_config.h

Then when you try to compile PHP with the MySQL option, it fails with an error message stating my_config.h could not be located.

Suggested fix:
Manual solution

Copy from the installation ~/include/my_config.h into the final installation ~/include/mysql/ directory.  Chmod it to 755 

Alternatively, somewhere in the make install script, copy my_config.h into the installation (prefix)/include/mysql directory.
[4 Oct 2010 14:09] Hartmut Holzgraefe
Works fine on CentOS 5.4 with the given configure string and doing "make install",
my_config.h is put into /usr/include/mysql just fine.

Retesting with CentOS 5.5 once installing it in a VM is done ...
[4 Oct 2010 16:31] MySQL Verification Team
Works fine on FC 13 X86_64 too.
[4 Oct 2010 16:35] Vikram J. Gurjar
Dear Mr.  Holzgraefe,

If you let me know the exact file name in which this copying script exists, I will debug it for you and send you the patch if required.

Regards,

Vikram Gurjar
[7 Oct 2010 12:41] Vikram J. Gurjar
Hi,

Would you like to have root access via ssh to a server on which I can replicate this problem in a consistent manner?

I can walk you through this problem if you fix a time and date that is convenient for you.

Regards,

Vikram J. Gurjar
[2 Dec 2010 20:44] Sveta Smirnova
Thank you for the feedback.

I can not repeat described behavior too. Please try with current version 5.1.53 and if problem still exists send us output of `ls -l /usr/include/mysql`
[3 Dec 2010 1:55] Vikram J. Gurjar
Dear Ms. Smirnova,

I will try this on a brand new server and get back to you. If it gives a problem, I will give you root access to the server.

As of the moment, I am copying the file manually before compiling PHP.

Regards,

Vikram J. Gurjar
[3 Dec 2010 10:35] Vikram J. Gurjar
This problem does not exist in 5.1.53 - Tried it and it worked just fine.

Vikram J. Gurjar
[14 Dec 2010 13:58] Sveta Smirnova
Thank you for the feedback.

Closed as "Can't repeat"