Re: Monit Compilation Errors
Yes, you are right, --ansi have undesirable effects like:
In file included from src/net.h:30:0,
src/monit.h:124:1: error: C++ style comments are not allowed in ISO C90
//FIXME: we can export this type in libmonit
Finally, fter switching to the 32bits cygwin version (-m32 in cygwin64
generated more errors), and modifying Lync.c , monit has been compiled
again for this version.
$ ./monit.exe --version
This is Monit version 5.25.1
Built without ssl, without ipv6, with compression, without pam and without
Copyright (C) 2001-2017 Tildeslash Ltd. All Rights Reserved.
And the http service works:
user: admin, pwd: monit
Monit Service Manager Running
What are the next steps? Try to compile for the 64bits version? Both
packages are required or only one? In that case, the 64bits cygwin
installer can install the 32 bits monit version?
Thanks a lot for your time.
2018-01-17 20:12 GMT+01:00 szgyg <szgyg@xxxxxxxxxxxxxx>:
> On 2018-01-15, Brian Inglis wrote:
> > On 2018-01-15 13:56, szgyg wrote:
> >> On 2018-01-15, Kizito Porta Balanyà wrote:
> >>> I'm trying to compile the last version of MONIT and I get some errors
> >>> I can not solve.
> >>> <command-line>:0:6: error: expected identifier or ‘(’ before numeric
> >>> constant
> >>> src/monit.h:581:19: note: in expansion of macro ‘unix’
> >>> } unix;
> >>> ^~~~
> >> From https://gcc.gnu.org/onlinedocs/cpp/System-
> >> "historically system-specific macros have had names with no special
> >> prefix; for instance, it is common to find unix defined on Unix systems.
> >> [...] When the -ansi option, or any -std option that requests strict
> >> conformance, is given to the compiler, all the system-specific
> >> macros outside the reserved namespace are suppressed."
> >> You can see the predefined macros with `cpp -dD /dev/null'.
> >> [...]
> >> You can undefine the unix macro or rename the unix struct.
> > Looks like -std=c99 without -ansi does not suppress those symbols so add
> > to CFLAGS, use equivalent configure options, or autoconf/automake
> I'd go with the minimally intrusive `CFLAGS=-Uunix'. -ansi can have
> side effects.
> Problem reports: http://cygwin.com/problems.html
> FAQ: http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple