helpMySQL++ - Support: sr #2665, Build of 'lib' fails with...

Show feedback again

sr #2665: Build of 'lib' fails with SunStudio 12.2 compiler

Submitted by:  Arjan Hulsbosch <ahulsbos>
Submitted on:  Tue Dec 14 16:31:48 2010  
Category: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Wed Dec 15 13:29:00 2010, comment #1:

I managed to run dtest on a Linux platform, with GCC compiler, with the patches installed, and it ran without problem. I couldn't get the tests to compile with Oracle Solaris Studio yet, unfortunately.

Arjan Hulsbosch <ahulsbos>
Tue Dec 14 16:31:48 2010, original submission:

When building MySQL++ with SunStudio 12.2 compiler on both Solaris 10 for Sparc and Solaris 11 Express for Sparc with the following message:

/home/ahulsbos/scratch/src/mysqlpp/bk-deps CC -c -o mysqlpp_connection.o -I. -KPIC -DPIC -I/opt/pd/mysql5/include -g ./lib/connection.cpp
"./lib/null.h", line 174: Error: In this declaration "data" is of an incomplete type "mysqlpp::String".
"./lib/qparms.h", line 102: Where: While specializing "mysqlpp::Null<mysqlpp::String, mysqlpp::NullIsNull>".
"./lib/qparms.h", line 102: Where: Specialized in non-template code.
1 Error(s) detected.

The issue can be fixed by moving the definition of 'SQLTypeAdapter& SQLQueryParms::operator [](size_type n)' from the header file 'qparms.h' to 'qparms.cpp' file. The following patches implement the fix:

Index: lib/qparms.h
--- lib/qparms.h (revision 2680)
+++ lib/qparms.h (working copy)
@@ -96,13 +96,7 @@
size_t length) const;

/// \brief Access element number n
- SQLTypeAdapter& operator [](size_type n)
- {
- if (n >= size()) {
- insert(end(), (n + 1) - size(), "");
- }
- return std::vector<SQLTypeAdapter>::operator [](n);
- }
+ SQLTypeAdapter& operator [](size_type n);

/// \brief Access element number n
const SQLTypeAdapter& operator [](size_type n) const
Index: lib/qparms.cpp
--- lib/qparms.cpp (revision 2680)
+++ lib/qparms.cpp (working copy)
@@ -47,6 +47,16 @@

+SQLQueryParms::operator [](size_type n)
+ if (n >= size()) {
+ insert(end(), (n + 1) - size(), "");
+ }
+ return std::vector<SQLTypeAdapter>::operator [](n);
SQLQueryParms::operator [](const char* str)
if (parent_) {

Arjan Hulsbosch <ahulsbos>


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #11587:  qparms.cpp.patch added by ahulsbos (452B - text/x-patch)
file #11588:  qparms.h.patch added by ahulsbos (549B - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by ahulsbos (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Dec 15 13:26:52 2010ahulsbosAttached File-=>Added qparms.cpp.patch, #11587
      Attached File-=>Added qparms.h.patch, #11588
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup