dbTalk Databases Forums  

mysql++ build failed toward MinGW + STLport 5+

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss mysql++ build failed toward MinGW + STLport 5+ in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default mysql++ build failed toward MinGW + STLport 5+ - 05-18-2006 , 09:00 AM






The make process encountered error when compiling lib/manip.cpp with
following error messages:

manip.cpp: In function `mysqlpp::SQLQueryParms&
mysqlpp:perator<<(mysqlpp::quote_type2, mysqlpp::SQLString&)':
manip.cpp:60: error: conversion from `stlp_priv::__bstr_sum<char,
stlp_std::char_traits<char>, stlp_std::allocator<char>,
stlp_priv::__bstr_sum<char, stlp_std::char_traits<char>,
stlp_std::allocator<char>, stlp_priv::__char_wrapper<char>,
stlp_priv::__bstr_sum<char, stlp_std::char_traits<char>,
stlp_std::allocator<char>, stlp_priv::__bstr_wrapper<char,
stlp_std::char_traits<char>, stlp_std::allocator<char> >,
stlp_priv::__sum_storage_elem<char, stlp_std::char_traits<char>,
stlp_std::allocator<char> >, stlp_priv::__on_right>,
stlp_priv::__on_right>, stlp_priv::__char_wrapper<char>,
stlp_priv::__on_left>' to non-scalar type `mysqlpp::SQLString' requested
manip.cpp:68: error: conversion from `stlp_priv::__bstr_sum<char,
stlp_std::char_traits<char>, stlp_std::allocator<char>,
stlp_priv::__bstr_sum<char, stlp_std::char_traits<char>,
stlp_std::allocator<char>, stlp_priv::__bstr_wrapper<char,
stlp_std::char_traits<char>, stlp_std::allocator<char> >,
stlp_priv::__bstr_sum<char, stlp_std::char_traits<char>,
stlp_std::allocator<char>, stlp_priv::__cstr_wrapper<char>,
stlp_priv::__sum_storage_elem<char, stlp_std::char_traits<char>,
stlp_std::allocator<char> >, stlp_priv::__on_right>,
stlp_priv::__on_right>, stlp_priv::__char_wrapper<char>,
stlp_priv::__on_left>' to non-scalar type `mysqlpp::SQLString' requested
manip.cpp: In function `mysqlpp::SQLQueryParms&
mysqlpp:perator<<(mysqlpp::quote_only_type2, mysqlpp::SQLString&)':
manip.cpp:308: error: conversion from `stlp_priv::__bstr_sum<char,
stlp_std::char_traits<char>, stlp_std::allocator<char>,
stlp_priv::__bstr_sum<char, stlp_std::char_traits<char>,
stlp_std::allocator<char>, stlp_priv::__char_wrapper<char>,
stlp_priv::__bstr_sum<char, stlp_std::char_traits<char>,
stlp_std::allocator<char>, stlp_priv::__bstr_wrapper<char,
stlp_std::char_traits<char>, stlp_std::allocator<char> >,
stlp_priv::__sum_storage_elem<char, stlp_std::char_traits<char>,
stlp_std::allocator<char> >, stlp_priv::__on_right>,
stlp_priv::__on_right>, stlp_priv::__char_wrapper<char>,
stlp_priv::__on_left>' to non-scalar type `mysqlpp::SQLString' requested
manip.cpp: In function `mysqlpp::SQLQueryParms&
mysqlpp:perator<<(mysqlpp::quote_double_only_typ e2, mysqlpp::SQLString&)':
manip.cpp:366: error: conversion from `stlp_priv::__bstr_sum<char,
stlp_std::char_traits<char>, stlp_std::allocator<char>,
stlp_priv::__bstr_sum<char, stlp_std::char_traits<char>,
stlp_std::allocator<char>, stlp_priv::__cstr_wrapper<char>,
stlp_priv::__bstr_sum<char, stlp_std::char_traits<char>,
stlp_std::allocator<char>, stlp_priv::__bstr_wrapper<char,
stlp_std::char_traits<char>, stlp_std::allocator<char> >,
stlp_priv::__sum_storage_elem<char, stlp_std::char_traits<char>,
stlp_std::allocator<char> >, stlp_priv::__on_right>,
stlp_priv::__on_right>, stlp_priv::__cstr_wrapper<char>,
stlp_priv::__on_left>' to non-scalar type `mysqlpp::SQLString' requested
mingw32-make[1]: *** [mysqlpp_manip.o] Error 1
mingw32-make: *** [lib] Error 2

It seems caused by a different design of basic_string in STLport which I
cannot confirm, and the built-in MinGW libstdc++ built mysql++ 2.1.1
without pain. I tried to change the code by making a temporary
std::string first and then assign it to mysqlpp::SQLString and it worked.

Whether it is a problem of not-conformant-string-implementation in
STLport or a not-complete-implementation of mysqlpp::SQLString? Should
mysql++ team make a patch? Or should I forward this problem to the
STLport team?

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: mysql++ build failed toward MinGW + STLport 5+ - 05-19-2006 , 05:41 AM






dengxy (AT) cse (DOT) buaa.edu.cn wrote:
Quote:
stlp_priv::__on_left>' to non-scalar type `mysqlpp::SQLString' requested
manip.cpp: In function `mysqlpp::SQLQueryParms&
mysqlpp:perator<<(mysqlpp::quote_only_type2, mysqlpp::SQLString&)':
manip.cpp:308: error: conversion from `stlp_priv::__bstr_sum<char,
stlp_std::char_traits<char>, stlp_std::allocator<char>,
stlp_priv::__bstr_sum<char, stlp_std::char_traits<char>,
stlp_std::allocator<char>, stlp_priv::__char_wrapper<char>,
stlp_priv::__bstr_sum<char, stlp_std::char_traits<char>,
stlp_std::allocator<char>, stlp_priv::__bstr_wrapper<char,
stlp_std::char_traits<char>, stlp_std::allocator<char> >,
....spam, spam, spam, spam....Ain't STL error messages lovely?

Quote:
Should mysql++ team make a patch?
No, you should send your patch to the list, and let me decide whether to
apply it or not.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: mysql++ build failed toward MinGW + STLport 5+ - 05-19-2006 , 09:02 AM



Warren Young дµÀ:
Quote:
dengxy (AT) cse (DOT) buaa.edu.cn wrote:

stlp_priv::__on_left>' to non-scalar type `mysqlpp::SQLString' requested
manip.cpp: In function `mysqlpp::SQLQueryParms&
mysqlpp:perator<<(mysqlpp::quote_only_type2, mysqlpp::SQLString&)':
manip.cpp:308: error: conversion from `stlp_priv::__bstr_sum<char,
stlp_std::char_traits<char>, stlp_std::allocator<char>,
stlp_priv::__bstr_sum<char, stlp_std::char_traits<char>,
stlp_std::allocator<char>, stlp_priv::__char_wrapper<char>,
stlp_priv::__bstr_sum<char, stlp_std::char_traits<char>,
stlp_std::allocator<char>, stlp_priv::__bstr_wrapper<char,
stlp_std::char_traits<char>, stlp_std::allocator<char> >,


...spam, spam, spam, spam....Ain't STL error messages lovely?


Should mysql++ team make a patch?


No, you should send your patch to the list, and let me decide whether to
apply it or not.


OK. Since I cannot confirm which side should alter(STLport or mysql++),
I should have more investigation to decide what to do.

Hope anyone else will provide more detailed information.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #4  
Old   
AT
 
Posts: n/a

Default Re: mysql++ build failed toward MinGW + STLport 5+ - 06-08-2006 , 03:56 AM



I send a message on the STLport mailing list, and its developer said:

Quote:
Thanks for this report. It simply show that template expressions for
string concatenation has some drawback. In STLport
config file (stlport/stm_user_config.h or stlport/stl/user_config.h
depending on your STLport version) you must say
_STLP_NO_TEMPLATE_EXPRESSION. I will try to see if we can do something
for that.

and I found the flag _STLP_DONT_USE_TEMPLATE_EXPRESSION at
stlport/stl/config/user_config.h, and I uncomment this line and rebuilt
STLport and then compile mysql++ linking with it, and this time
everything goes fine.

Hope STLport developer will eliminate this template expression drawback
and regain the efficiency of template expression.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #5  
Old   
AT
 
Posts: n/a

Default Re: mysql++ build failed toward MinGW + STLport 5+ - 06-08-2006 , 04:10 AM



dengxy (AT) cse (DOT) buaa.edu.cn wrote:
Quote:
and I found the flag _STLP_DONT_USE_TEMPLATE_EXPRESSION at
stlport/stl/config/user_config.h, and I uncomment this line and rebuilt
STLport and then compile mysql++ linking with it, and this time
everything goes fine.
Thanks for the report!

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #6  
Old   
AT
 
Posts: n/a

Default Re: mysql++ build failed toward MinGW + STLport 5+ - 06-08-2006 , 10:38 PM



To Warren Young:

Francois Dumont, the STLport developer, also provide another walk around
today that makes it work with the template expression feature, which
gains superior performance when concatenating std::strings using
operator+ in STLport, however, at a cost to produce default SQLString
objects in manip.cpp.

Here is the patch using his walk around:
*************patch begin***************


--- mysql++/lib/manip.cpp 2006-04-05 12:44:49.000000000 +0800
+++ ./manip.cpp 2006-06-09 11:26:38.347625000 +0800
@@ -56,8 +56,9 @@
SQLQueryParms& operator <<(quote_type2 p, SQLString& in)
{
if (in.is_string) {
+ SQLString in2;
if (in.dont_escape) {
- SQLString in2 = '\'' + in + '\'';
+ in2 = '\'' + in + '\'';
in2.processed = true;
return *p.qparms << in2;
}
@@ -65,7 +66,7 @@
char* s = new char[in.size() * 2 + 1];
mysql_escape_string(s, in.c_str(),
static_cast<unsigned long>(in.size()));
- SQLString in2 = SQLString('\'') + s + '\'';
+ in2 = SQLString('\'') + s + '\'';
in2.processed = true;
*p.qparms << in2;
delete[] s;
@@ -305,7 +306,8 @@
SQLQueryParms& operator <<(quote_only_type2 p, SQLString& in)
{
if (in.is_string) {
- SQLString in2 = '\'' + in + '\'';
+ SQLString in2;
+ in2 = '\'' + in + '\'';
in2.processed = true;
return *p.qparms << in2;
}
@@ -363,7 +365,8 @@
SQLQueryParms& operator <<(quote_double_only_type2 p, SQLString& in)
{
if (in.is_string) {
- SQLString in2 = "\"" + in + "\"";
+ SQLString in2;
+ in2 = "\"" + in + "\"";
in2.processed = true;
return *p.qparms << in2;
}


*************patch end***************
By this patch applied, STLport can compile mysql++ without problem, too!
However, it is you who decide whether to use this patch

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #7  
Old   
AT
 
Posts: n/a

Default Re: mysql++ build failed toward MinGW + STLport 5+ - 06-26-2006 , 02:14 PM



dengxy (AT) cse (DOT) buaa.edu.cn wrote:
Quote:
By this patch applied, STLport can compile mysql++ without problem, too!
However, it is you who decide whether to use this patch
I don't find it objectionable. I've applied it. Thanks!

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.