[Nut-upsdev] building on Solaris 10 (was Re: 2.4.2 freeze)

Arjen de Korte nut+devel at de-korte.org
Sat Feb 13 12:39:50 UTC 2010


Citeren Charles Lepple <clepple op gmail.com>:

>> "/opt/src/utils/nut-2.4.1-r2339/drivers/apcsmart.c", line 127:  
>> warning: statement not reached
> Is there a way to flag a statement as "not reached" with the Sun C
> compiler? We have a comment to that effect in the code there.

We could also remove that line of code, or move the code from the  
preceding default to outside the switch cases. I have to agree with  
the compiler here, that this code is unreachable and might just as  
well be removed.

>> Some Solaris 10 build notes:
>> The Solaris 10 (U8) SUNWsmcmd package is broken so
>> /usr/sfw/bin/net-snmp-config is symlinked to net-snmp-config-64
>> instead of net-snmp-config-32. So configure will find the SNMP bits
>> but the build will fail.

In that case, this is either a problem with installing the wrong  
Net-SNMP version or the SUNWsmcmd package is badly broken. Rather than  
attempting to fix this, this should be fixed upstream.

[...]

>> If the symlink gets fixed there is still
>> the issue of net-snmp-config spitting out "-R../lib" that the linker
>> doesn't like. This post configure perl script does the trick.
>> perl -pi -e "s|-R../lib |-R/usr/sfw/lib |g;" \
>>    `find . -name Makefile -print`
> I suspect that we would want to handle this earlier in the
> configuration process, probably around when those options are
> retrieved.

Yes. But this is also something that should be fixed upstream. Knowing  
this, I think it makes sense to check for the usability of the  
Net-SNMP library during configuration not by just checking if the  
header files are installed, but also by checking if we can link a test  
program. At least the remaining stuff will then build properly.

Best regards, Arjen
-- 
Please keep list traffic on the list




More information about the Nut-upsdev mailing list