Bug #45846 config.h shipped in the source release
Submitted: 30 Jun 2009 9:00 Modified: 10 Sep 2010 8:27
Reporter: Matthias Brantner Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / C++ Severity:S3 (Non-critical)
Version:1.0.5 OS:Any
Assigned to: Ulf Wendel CPU Architecture:Any
Tags: cmake, config.h, configure, Contribution

[30 Jun 2009 9:00] Matthias Brantner
Description:
I have seen that the source tar-ball for the 1.0.5 release contains the cppconn/config.h file which is supposed to be generated by CMake from the cppconn/config.h.cm file. I think that it's not necessary to ship this file. Instead the file should be generated (using CMake's configure command) into the build directory. Additionally, a new include path needs to be added to the compiler options in order to also find files in the build directory. 

How to repeat:
Unpack the 1.0.5 source release. The cppconn directory contains the config.h file which is already configured.

Suggested fix:
Remove the cppconn/config.h file form the source distribution and add the include path to the build directory. I'll append a patch after submitting.
[30 Jun 2009 9:01] Matthias Brantner
possible patch for removing the config.h file from the distribution and adding the include path to the binary dir

Attachment: config-fixes-1.0.5.patch (application/octet-stream, text), 4.12 KiB.

[30 Jun 2009 10:03] Sveta Smirnova
Thank you for the report.

Verified as described.
[15 Jul 2009 9:45] Ulf Wendel
I am not sure if we need to fix anything in the CMake files. If you check trunk, you'll see that it does not hold a config.h. The config.h looks more like a left-over from the build and packaging process.

Means, if you check out the source from the repository all is fine. The bug report is only about the 1.0.5 release source package.

This is what you find when you check out the repository:
nixnutz@ulflinux:~/src/connector-cpp-bzr/trunk> ls cppconn/
build_config.h  config.h.cm   datatype.h  exception.h  parameter_metadata.h  resultset.h           sqlstring.h  warning.h
CMakeLists.txt  connection.h  driver.h    metadata.h   prepared_statement.h  resultset_metadata.h  statement.h

No config.h but a config.h.cm as it should be.

Adding our build experts to the issue.

Ulf
[15 Jul 2009 13:39] Matthias Brantner
Yes you're right. However, the package downloaded from http://dev.mysql.com/get/Downloads/Connector-C%2B%2B/mysql-connector-c%2B%2B-1.0.5.tar.gz/... contains the config.h file. So this is really a serious packaging problem.
[17 Aug 2009 14:16] Ulf Wendel
cpack should not longer add config.h and the new binding_config.h to source packages. This should fix it. Though, we need to verify/review when we do the next release.

Ulf
[10 Sep 2010 8:27] Ulf Wendel
Fixed in upcoming 1.1.0 (= 1.0.6).