List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:December 12 2008 2:04am
Subject:Re: I cannot compile MySQL++ 3.0.8 in FreeBSD 5.2.1 with gcc 3.3.3
View as plain text  
On Dec 11, 2008, at 4:54 AM, soryu Jeong wrote:

> lib/null.h:174: error: `mysqlpp::Null<Type, Behavior>::data' has  
> incomplete
>   type
> lib/stadapter.h:44: error: forward declaration of `struct  
> mysqlpp::String'

The compiler is wrong to demand access to all the type information at  
this point.  It's possible for it to delay the full template  
instantiation until the point of use, which is not in stadapter.h.

> Is MySQL++ not support FreeBSD 5.2.1 or gcc 3.3.3 ?

In the release notes for FreeBSD 5.3, it says they upgraded GCC from a  
prerelease version of 3.3.3 to a prerelease version of 3.4.2.  Why  
they're shipping beta compilers in an OS that prides itself on  
stability is beyond me, but, the main point is that this compilation  
bug may be due to the incompleteness of 3.3.3.  We regularly build  
MySQL++ on older versions of GCC successfully, so this must be a  
temporary bug.

Further scanning of the release notes shows that they didn't upgrade  
the compiler again during the 5.x series, so I'm guessing their 3.4.2  
variant didn't cause any new problems.  They began shipping the  
official 3.4.4 version with FreeBSD 6.0.

> what can I do for compile it ?


If it were me, I'd try one of these things, in this order of preference:

	- upgrade to a later 5.x version of FreeBSD -- you probably want this  
for security reasons anyway

	- upgrade GCC to one from a newer FreeBSD, since the one you have is  
clearly broken

	- appease the compiler, sprinkling #include <mystring.h> around the  
MySQL++ code until the error goes away; start with stadapter.h

	- build MySQL++ on another machine that generates binary-compatible  
libraries, copy the library over, and hope this lets you build your  
program against it successfully

	- build everything on another machine, and just copy over binaries

If you try one of the first two, let us know what you upgraded to that  
fixed it.  We need to document this in the MySQL++ FAQ.
Thread
I cannot compile MySQL++ 3.0.8 in FreeBSD 5.2.1 with gcc 3.3.3soryu Jeong11 Dec
  • Re: I cannot compile MySQL++ 3.0.8 in FreeBSD 5.2.1 with gcc 3.3.3Warren Young12 Dec