Bug #44931 Missing includes
| Submitted: | 18 May 2009 12:04 | Modified: | 3 Aug 2009 11:56 |
|---|---|---|---|
| Reporter: | Michal Hrusecky | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / C++ | Severity: | S3 (Non-critical) |
| Version: | 1.0.5 | OS: | Linux |
| Assigned to: | Ulf Wendel | CPU Architecture: | Any |
| Tags: | Contribution | ||
[18 May 2009 12:04]
Michal Hrusecky
[18 May 2009 12:54]
Sveta Smirnova
Thank you for the report. Yes, references to stdio.h are not exist. But everything compiles fine in my environment. Additionally version 1.0.4 is a bit old. Please try current version 1.0.5 and if problem still exists provide your compile log.
[21 May 2009 15:22]
Michal Hrusecky
Compilation log (version 1.0.5 - interesting parts only)
Attachment: compile.log (application/octet-stream, text), 3.20 KiB.
[21 May 2009 15:23]
Michal Hrusecky
Patch against 1.0.5
Attachment: mysql-connector-cpp-1.0.5-gcc44.patch (application/octet-stream, text), 1003 bytes.
[21 May 2009 15:26]
Michal Hrusecky
I updated patch against version 1.0.5. I guess that problem depends on gcc version (I'm using version 4.4.0).
[22 May 2009 6:30]
Sveta Smirnova
Thank you for the feedback. I use same gcc of same version: $gcc --version gcc (GCC) 4.4.0 20081128 (experimental) Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[22 May 2009 7:08]
Sveta Smirnova
Same results on another box - build succeeds. Could you please provide cmake output also?
[22 May 2009 14:02]
Michal Hrusecky
Full log from two different machines
Attachment: log.txt (text/plain), 9.90 KiB.
[22 May 2009 14:09]
Michal Hrusecky
I also tried it on other machine with same result - it doesn't compile with gcc 4.4.0, with 4.3.x everything is ok. I guess I've got newer gcc :-) Output from both machines included. I'm not very familiar with cmake, but I can provide you with any addition files. But my builds fails because of pritnf/snprintf or similar functions which are defined in stdio.h and stdio.h isn't included in any of these files that fails to compile... So I wouldn't suspect cmake for that...
[29 May 2009 8:56]
Sveta Smirnova
Thank you for the feedback. Verified as described. Problem is repeatable only if use latest gcc 4.4.0 on Linux.
[13 Jul 2009 17:17]
Ulf Wendel
I have pushed a change to the development version. Will need to check it using GCC 4.4.0. The development version gets mirrored at https://code.launchpad.net/~mysql/mysql-connector-cpp/trunk .
[15 Jul 2009 8:29]
Ulf Wendel
Fixed in trunk, someone needs to review and close the issue. Andrey, Lawrin, - can one of you bite the bullet and review?
[15 Jul 2009 17:16]
Lawrenty Novitsky
I would move those stdio inclusions from .h to .cpp. I think there is no need to do that in .h Besides that, I could find references to snprintf also in mysql_metadata.cpp mysql_ps_resultset.cpp. I think it wouldn't hurt to include stdio everywhere, and not to rely on the fact it included in some other included header. Otherwise I'm fine with the patch
[3 Aug 2009 11:56]
Ulf Wendel
Lawrin, I followed your suggestions. I moved the include into .cpp and checked the other files for including stdio.h. I have pushed my changes into trunk and verified that it compiles. The fixes will make it into the next release, which is 1.0.6. It is scheduled for September 2009.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.064 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.