Hello Phil,

I suspect that there is some problem because I have been building
Bacula on Solaris for quite a number of years now with no problems
using the Solaris compiler.  The code I build is the Enterprise version,
but for baconfig.h it is identical to the Community version. Perhaps
you are on a very old C++ compiler that does not properly support
C++.  I am using Sun Studio 12.1

If you cannot get a more modern version you can try gcc, but it
doesn't generate code as well as Sun Studio does.

Best regards,
Kern

PS: I use compiler options: "-fast -xarch=native -I/usr/sfw/include  -m64"

On 08/17/2012 05:57 PM, Phil Stracchino wrote:
> The Gentoo ebuild for 5.12.10 just showed up in Portage today, and built
> with no problems.  However, when I went to update my main server
> (running Solaris 10) to 5.2.10, the Sun Studio compiler *really* does
> not like the class definitions in src/baconfig.h.
>
> This definition:
>
> class POOL_MEM;
> /* Edit message into Pool Memory buffer -- no __FILE__ and __LINE__ */
> int  Mmsg(POOLMEM **msgbuf, const char *fmt,...);
> int  Mmsg(POOLMEM *&msgbuf, const char *fmt,...);
> int  Mmsg(POOL_MEM &msgbuf, const char *fmt,...);
>
> results in the following compiler messages (CC=/usr/bin/cc -fast
> -xarch=generic -xtarget=generic -xcache=generic -m64):
>
>
> "../baconfig.h", line 442: warning: old-style declaration or incorrect
> type for: class
> "../baconfig.h", line 442: syntax error before or at: POOL_MEM
> "../baconfig.h", line 442: warning: old-style declaration or incorrect
> type for: POOL_MEM
> "../baconfig.h", line 445: syntax error before or at: &
> "../baconfig.h", line 445: warning: undefined or missing type for: const
> "../baconfig.h", line 445: warning: identifier redeclared: Mmsg
>          current : function() returning int
>          previous: function(pointer to pointer to char, pointer to const
> char, ...) returning int : "../baconfig.h", line 444
> "../baconfig.h", line 446: syntax error before or at: &
> "../baconfig.h", line 446: warning: undefined or missing type for: const
> "../baconfig.h", line 446: warning: identifier redeclared: Mmsg
>          current : function() returning int
>          previous: function(pointer to pointer to char, pointer to const
> char, ...) returning int : "../baconfig.h", line 444
>
>
> It clearly dislikes the '&msgbuf' construct.  However, I don't know
> enough C++ to know whether it *should*.
>
> Similar failures occur on the rest of the class definitions.
>
>


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to