ucd-snmp-4.2.6-r1 fails to compile, but the die in emake||die is not called. this is where the compile first fails: gcc -march=pentium3 -mmmx -msse -O2 -pipe -Dlinux -I/usr/include/rpm -I. -I.. -I. -I./.. -c scapi.c -fPIC -DPIC -o .libs/scapi.lo scapi.c: In function `sc_encrypt': scapi.c:612: error: incompatible types in initialization scapi.c:612: error: incompatible types in initialization scapi.c:612: error: incompatible types in initialization scapi.c:612: error: incompatible type for argument 1 of `memset' scapi.c: In function `sc_decrypt': scapi.c:725: error: incompatible types in initialization scapi.c:725: error: incompatible types in initialization scapi.c:725: error: incompatible types in initialization scapi.c:725: error: incompatible type for argument 1 of `memset' make[1]: *** [scapi.lo] Error 1 make[1]: Leaving directory `/home/portage/portage/ucd-snmp-4.2.6-r1/work/ucd-snmp-4.2.6/snmplib' USE='-ssl' allows it to complete.
I am not experiencing the same problem that you are. What version of openssl are you running?
I am at openssl-0.9.7b (installed 0.9.7 from the start, not an upgrade from 0.9.6 or earlier).
Okay... I have only tested with openssl-0.9.6... As a suggestion, you might want to use net-snmp instead being as you are obviously using a more bleeding-edge system. ucd-snmp is in the deprecated stage currently. I will test with openssl-0.9.7 on my system to see if I get the same error. If I do I will look into this further.
I do have net-snmp installed; I only tried ucd-snmp because hpoj does not work w/ net-snpm. The real bug though wasn't so much that ucd failed to compile, but rather that the failure did not result in a return code from make(1) that portage could recognise as a failure. emake||die never called die, even though make failed. You could try testing that by adding a patch that deliberately causes gcc to fail and see whether emake returns false or true.
I can confirm this. It _should_ die out, but it doesn't. Problably a dependency problem with the makefile. As far as why it doesn't work with ssl...I'm still digging. And moving from ucd -> net isn't very simple even if net-snmp has ucd-compatibily enabled because too many things changed, so we should definitely still maintain ucd. I'm working on a cleaned up version. Stay tuned.
Looks like too much changed between ssl versions 0.9.6 and 0.9.7 -- there's some discussion here: http://net-snmp.sourceforge.net/irc/net-snmp.log.2003-3-14.html We can make it depend on =openssl-0.9.6* but that would cause openssl to get into an upgrade loop with the current portage.
Created attachment 18173 [details, diff] ucd-snmp-4.2.6-openssl-0.9.7.patch This should fix it (tested on 0.9.7 at least), and is based on the fixes for net-snmp.
Created attachment 18175 [details, diff] ucd-snmp-4.2.6-Makefile-fixes.patch This one should fix the race conditions if make fails with -j2 or greater (or even with just make?).
Created attachment 18176 [details, diff] ucd-snmp-4.2.6-coreutils.patch This one should fix head/tail issues - well, might as well as we have not made up our minds about the coreutils issue ...
Might I add that this thing really need new Makefiles ? They seem fairly broken for parallel builds ...
Ok, drop the ucd-snmp-4.2.6-Makefile-fixes.patch, it has issues, as the build system is already fairly broken, and do not live up to running autoconf.
Created attachment 18179 [details, diff] ucd-snmp-4.2.6-coreutils-2.patch Ok, I was brain dead - I'll test it first next time :P Anyhow, we should not touch configure.in or aclocal.m4, else autoconf gets called, which breaks things. This patch is an update that fixes this.
Created attachment 18180 [details, diff] ucd-snmp-4.2.6-r1.ebuild.diff Just for the heck of it - ebuild patch.
Wow! Thanks Martin. One problem is that the ssl support breaks when 0.9.6 is installed. I made it only apply the patch if openssl-0.9.7 or higher is available. I'll get all of this checked it along with some other cleanup work I did locally. Thanks again.
You might use below to add a test. Sorry, missed needing to define that when building with 0.9.6 .... -------------------------------------- nosferatu net-snmp-5.0.9 # cat test_ssl096.c #include <stdlib.h> #include <openssl/crypto.h> int main() { /* Return false if we have openssl-0.9.7 or above */ if (SSLeay() >= 0x907000) return 1; return 0; } nosferatu net-snmp-5.0.9 # gcc -o test_ssl096 test_ssl096.c -lssl nosferatu net-snmp-5.0.9 # # if test_ssl096; then append-flags "-DSTRUCT_DES_KS_STRUCT_HAS_WEAK_KEY"; fi nosferatu net-snmp-5.0.9 #
Created attachment 18217 [details, diff] ucd-snmp-4.2.6-agent-parallel-fixes.patch Fix race conditions under make -j6 here at least. This enable us to be able to add -Makefile-fixes.patch again. Works here with -j1, -j6, -j12 and -j24.
Created attachment 18218 [details, diff] ucd-snmp-4.2.6-openssh096-ebuild-fixes.patch Skip the src_unpack() section. The rest use the test_ssl096.c to get the openssl-0.9.7 patch to work on 0.9.6 system.
Comment on attachment 18175 [details, diff] ucd-snmp-4.2.6-Makefile-fixes.patch ucd-snmp-4.2.6-agent-parallel-fixes.patch should enable us to use this again ...
Ok, with tremendous help from Martin, all these fixes are incorporated into portage now. Please give the new ebuild a whirl. It is currently ~arch (4.2.6-r2).
in cvs