Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 25595 - ucd-snmp fails to compile, but emake||die short-circuits anyway
Summary: ucd-snmp fails to compile, but emake||die short-circuits anyway
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Nick Hadaway
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-30 16:02 UTC by James Cloos
Modified: 2003-10-10 07:47 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ucd-snmp-4.2.6-openssl-0.9.7.patch (ucd-snmp-4.2.6-openssl-0.9.7.patch,5.29 KB, patch)
2003-09-22 17:45 UTC, Martin Schlemmer (RETIRED)
Details | Diff
ucd-snmp-4.2.6-Makefile-fixes.patch (ucd-snmp-4.2.6-Makefile-fixes.patch,1.19 KB, patch)
2003-09-22 17:47 UTC, Martin Schlemmer (RETIRED)
Details | Diff
ucd-snmp-4.2.6-coreutils.patch (ucd-snmp-4.2.6-coreutils.patch,6.29 KB, patch)
2003-09-22 17:49 UTC, Martin Schlemmer (RETIRED)
Details | Diff
ucd-snmp-4.2.6-coreutils-2.patch (ucd-snmp-4.2.6-coreutils-2.patch,6.33 KB, patch)
2003-09-22 18:26 UTC, Martin Schlemmer (RETIRED)
Details | Diff
ucd-snmp-4.2.6-r1.ebuild.diff (ucd-snmp-4.2.6-r1.ebuild.diff,965 bytes, patch)
2003-09-22 18:27 UTC, Martin Schlemmer (RETIRED)
Details | Diff
ucd-snmp-4.2.6-agent-parallel-fixes.patch (ucd-snmp-4.2.6-agent-parallel-fixes.patch,1.61 KB, patch)
2003-09-23 14:38 UTC, Martin Schlemmer (RETIRED)
Details | Diff
ucd-snmp-4.2.6-openssh096-ebuild-fixes.patch (ucd-snmp-4.2.6-openssh096-ebuild-fixes.patch,1.49 KB, patch)
2003-09-23 14:50 UTC, Martin Schlemmer (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Cloos 2003-07-30 16:02:00 UTC
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.
Comment 1 Nick Hadaway 2003-08-15 20:08:52 UTC
I am not experiencing the same problem that you are.

What version of openssl are you running?

Comment 2 James Cloos 2003-08-15 20:58:42 UTC
I am at openssl-0.9.7b (installed 0.9.7 from the start, not an upgrade
from 0.9.6 or earlier).
Comment 3 Nick Hadaway 2003-08-15 21:42:36 UTC
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.
Comment 4 James Cloos 2003-08-15 22:37:09 UTC
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.
Comment 5 Max Kalika (RETIRED) gentoo-dev 2003-09-22 15:35:36 UTC
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. 
Comment 6 Max Kalika (RETIRED) gentoo-dev 2003-09-22 15:43:21 UTC
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. 
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2003-09-22 17:45:17 UTC
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.
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2003-09-22 17:47:04 UTC
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?).
Comment 9 Martin Schlemmer (RETIRED) gentoo-dev 2003-09-22 17:49:42 UTC
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 ...
Comment 10 Martin Schlemmer (RETIRED) gentoo-dev 2003-09-22 18:00:21 UTC
Might I add that this thing really need new Makefiles ?  They seem fairly
broken for parallel builds ...
Comment 11 Martin Schlemmer (RETIRED) gentoo-dev 2003-09-22 18:04:51 UTC
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.
Comment 12 Martin Schlemmer (RETIRED) gentoo-dev 2003-09-22 18:26:32 UTC
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.
Comment 13 Martin Schlemmer (RETIRED) gentoo-dev 2003-09-22 18:27:38 UTC
Created attachment 18180 [details, diff]
ucd-snmp-4.2.6-r1.ebuild.diff

Just for the heck of it - ebuild patch.
Comment 14 Max Kalika (RETIRED) gentoo-dev 2003-09-23 09:41:12 UTC
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. 
Comment 15 Martin Schlemmer (RETIRED) gentoo-dev 2003-09-23 13:39:51 UTC
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 #
Comment 16 Martin Schlemmer (RETIRED) gentoo-dev 2003-09-23 14:38:11 UTC
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.
Comment 17 Martin Schlemmer (RETIRED) gentoo-dev 2003-09-23 14:50:54 UTC
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 18 Martin Schlemmer (RETIRED) gentoo-dev 2003-09-23 14:55:18 UTC
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 ...
Comment 19 Max Kalika (RETIRED) gentoo-dev 2003-09-23 21:41:41 UTC
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).
Comment 20 Max Kalika (RETIRED) gentoo-dev 2003-10-10 07:47:23 UTC
in cvs