[Xymon] HAVE_SETENV should NOT be set for Solaris
Richard L. Hamilton
rlhamil2 at gmail.com
Tue Mar 29 01:15:58 CEST 2016
> On Mar 28, 2016, at 19:06, Richard L. Hamilton <rlhamil2 at gmail.com> wrote:
>
>
>> On Mar 28, 2016, at 13:30, J.C. Cleaver <cleaver at terabithia.org> wrote:
>>
>>
>>
>> On Mon, March 28, 2016 9:00 am, Richard Hamilton wrote:
>>> I should have probably mentioned this before; but at least older Solaris
>>> (e.g. Solaris 9) does NOT have setenv(); but for some reason,
>>> configure.client thinks it does. Typically once this reminds me, I just
>>> edit include/config.h to fix that, remove the .o files, and try again. :-)
>>> _______________________________________________
>>
>>
>> Hi,
>>
>> That's odd. I don't have access to a Solaris box running that at the
>> moment, but does ./build/test-setenv.c actually compile successfully
>> there?
>>
>
>
> Nope:
>
> bash-2.05$ cc test-setenv.c -o test-setenv
> "test-setenv.c", line 5: warning: implicit function declaration: setenv
> Undefined first referenced
> symbol in file
> setenv test-setenv.o
> ld: fatal: Symbol referencing errors. No output written to test-setenv
> bash-2.05$ nm /usr/lib/libc.so.1|grep setenv
> bash-2.05$
>
> Solaris 10 and later has it in libc; but Solaris 9 doesn't.
The test:
$CC -c -o build/testfile.o $CFLAGS build/test-setenv.c 1>/dev/null 2>&1
in build/genconfig.sh, only compiles to .o, and doesn't attempt to link; therefore, it isn't actually determining whether the symbol is defined. :-) Note also from the error message above "implicit function declaration: setenv", that it wasn't in any included header file, either. Had the attempt been to compile to an executable (linking too), a non-zero return code would have been spotted.
>
More information about the Xymon
mailing list