Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 212581 - dev-db/mysql++-2.3 doesn't compile w/ gcc-4.3
Summary: dev-db/mysql++-2.3 doesn't compile w/ gcc-4.3
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux MySQL bugs team
Depends on:
Blocks: gcc-4.3
  Show dependency tree
Reported: 2008-03-07 13:25 UTC by Sektor van Skijlen
Modified: 2008-04-21 03:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

mysql++-2.3.2-gcc-4.3.patch (mysql++-2.3.2-gcc-4.3.patch,358 bytes, patch)
2008-03-22 22:30 UTC, Ryan Hill (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sektor van Skijlen 2008-03-07 13:25:11 UTC
dev-db/mysql++ fails.

Reports: from lib/const_string.h file, no definition of 'memcpy' found.
Reason: The #include <cstring> is missing from const_string.h file.

The type of the bug is that it "may fail on some systems or some gcc versions".

It really doesn't matter, which version of gcc I was using (ok, I used 4.3.0 pre-release). Thing that matter is that the code is ISO C++ standard counter-correct.

It *may work* on some compilers anyway (or some compilers' versions) by the reason that '#include <string>' declaration includes <cstring> as well, but *programmer should never state this a sure thing*. Need 'memcpy' or 'strcpy' = use '#include <cstring>'.

Reproducible: Always

Steps to Reproduce:
1. Try to install mysql++ (I used paludis)

Actual Results:  
Reports compile errors: in lib/const_sring.h definition for 'memcpy' is not found.

Expected Results:  
Should report no compile errors. :)

Severity: normal, however note that it blocks using other packages that depend on mysql++.
How to fix:

In lib/const_string.h file, after this line:

#include <string>

add the following:

#include <cstring>

Note: *not replace* <string> with <cstring>. Both are needed, as the class defined in this file uses both 'memcpy' and 'std::string'.
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2008-03-22 22:30:05 UTC
Created attachment 146956 [details, diff]
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2008-04-21 03:00:54 UTC