[Nut-upsdev] [Nut-upsuser] Nut-2.7.3 & gcc-3.3.6

Sergey Talchuk tals1975 at gmail.com
Mon Jul 6 14:32:59 UTC 2015


Hi Charles,

Thanks for the prompt reply!
Errors occur when execute make:

/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.
-I../include      -MT nutclient.lo -MD -MP -MF $depbase.Tpo -c -o
nutclient.lo nutclient.cpp &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../include -MT nutclient.lo
-MD -MP -MF .deps/nutclient.Tpo -c nutclient.cpp  -fPIC -DPIC -o
.libs/nutclient.o
In file included from nutclient.cpp:20:
nutclient.h:26:18: string: No such file or directory
nutclient.h:27:18: vector: No such file or directory
nutclient.h:28:15: map: No such file or directory
nutclient.h:29:15: set: No such file or directory
nutclient.h:30:21: exception: No such file or directory
In file included from nutclient.cpp:20:
nutclient.h:51: error: `exception' is not a class or namespace
nutclient.h:51: error: invalid base-class specification
nutclient.h:53: error: syntax error before `&' token
nutclient.h:53: error: missing ';' before right brace
nutclient.h:54: error: ISO C++ forbids defining types within return type
nutclient.h:54: error: destructors must be member functions
nutclient.h:54: error: return type specification for destructor invalid
nutclient.h:54: error: virtual outside class declaration
nutclient.h:55: error: virtual outside class declaration
nutclient.h:55: error: non-member function `const char* nut::what()' cannot
   have `const' method qualifier
nutclient.h: In function `const char* nut::what()':
nutclient.h:55: error: invalid use of `this' in non-member function
nutclient.h: At global scope:
nutclient.h:56: error: syntax error before `(' token
nutclient.h:65: error: syntax error before `{' token
nutclient.h:68: error: destructors must be member functions
nutclient.h:68: error: virtual outside class declaration
nutclient.h:69: error: syntax error before `private'
nutclient.h:78: error: syntax error before `{' token
nutclient.h:81: error: destructors must be member functions
nutclient.h:81: error: virtual outside class declaration
nutclient.h:82: error: syntax error before `}' token
nutclient.h:88: error: base class `IOException' has incomplete type
nutclient.h: In constructor `UnknownHostException::UnknownHostException()':
nutclient.h:90: error: class `UnknownHostException' does not have any field
   named `IOException'


etc...
------
Sergey

On Mon, Jul 6, 2015 at 4:56 PM, Charles Lepple <clepple at gmail.com> wrote:

> On Jul 6, 2015, at 4:40 AM, Sergey Talchuk wrote:
>
> Dear developers,
>
> libnutclient has been added as a C++ alternative to libupsclient in 2.7.1.
> As a result I can't compile nut 2.7.3 with gcc-3.3.6.
>
>
> What does the error message look like? Does the configure script fail when
> checking for the C++ compiler, or later on?
>
> There wasn't such a problem with nut-2.6.5.
>
> Is it possible to add a configuration parameter like
> '-without-libnutclient' to provide better compatibility with older gcc
> versions please (since libnutclient is an alternative to libupsclient)?
>
>
> Certainly possible - the NUT clients (upsc, upsmon, etc.) do not use
> libnutclient. I would like the defaults to work, though - hence the
> previous question.
>
> Or maybe use C instead of C++ for libnutclient?
>
>
> As I understand it, the purpose of libnutclient was to provide a more
> object-oriented API to NUT. I'm not sure we need two different C APIs.
>
>
> Unfortunately, is not that easy to upgrade glibc in an embedded system.
>
>
> Thanks for the feedback. I agree that libnutclient should be optional, but
> it is good to confirm that it is a problem in the field.
>
> No need to email both NUT lists - we can post results to nut-upsuser later.
>
> --
> Charles Lepple
> clepple at gmail
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20150706/74366af5/attachment.html>


More information about the Nut-upsdev mailing list