Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 202399 - net-analyzer/net-snmp-5.4.1-r1 doesn't compile w/ app-arch/rpm-5.0_beta1
Summary: net-analyzer/net-snmp-5.4.1-r1 doesn't compile w/ app-arch/rpm-5.0_beta1
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Netmon project
URL: http://sourceforge.net/tracker/index....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-15 17:08 UTC by Manuel Gomez
Modified: 2012-08-03 11:53 UTC (History)
5 users (show)

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


Attachments
emerge --info (emerge.info,9.96 KB, text/plain)
2007-12-15 17:10 UTC, Manuel Gomez
Details
config.log for compile with Jeff's patch (config.log,92.76 KB, text/plain)
2008-09-07 19:57 UTC, Andrey Falko
Details
rpm514-netsnmp-5.4.1.1.patch (rpm514-netsnmp-5.4.1.1.patch,11.54 KB, patch)
2008-09-07 20:28 UTC, Andrey Falko
Details | Diff
net-snmp-5.4.1.1-r1.ebuild.patch (net-snmp-5.4.1.1-r1.ebuild.patch,875 bytes, patch)
2008-09-07 20:33 UTC, Andrey Falko
Details | Diff
files/net-snmp-5.4.1.1-rpm5-1.patc (net-snmp-5.4.1.1-rpm5-1.patch,2.21 KB, patch)
2008-11-04 00:50 UTC, Mario Fetka (geos_one)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Gomez 2007-12-15 17:08:13 UTC
While trying to configure net-analyzer/net-snmp-5.4.1-r1 with USE=rpm,
checking rpm/rpmlib.h usability... no
checking rpm/rpmlib.h presence... no
checking for rpm/rpmlib.h... no
checking rpm/header.h usability... no
checking rpm/header.h presence... no
checking for rpm/header.h... no
checking for rpm/rpmlib.h... (cached) no
checking for rpm/header.h... (cached) no
configure: error: Could not find either the RPM header files needed and was specifically asked to use RPM support

Reproducible: Always

Steps to Reproduce:
USE=rpm emerge net-snmp



I have app-arch/rpm-5.0_beta1 installed.  Tried re-emerging that and nothing changed.
Comment 1 Manuel Gomez 2007-12-15 17:10:05 UTC
Created attachment 138550 [details]
emerge --info
Comment 2 Andrey Falko 2007-12-15 21:21:28 UTC
It looks to me like rpm-5's headers are renamed: 
equery f rpm | grep include
/usr/include
/usr/include/rpm
/usr/include/rpm/argv.h
/usr/include/rpm/db.h
/usr/include/rpm/envvar.h
/usr/include/rpm/fs.h
/usr/include/rpm/fts.h
/usr/include/rpm/mire.h
/usr/include/rpm/misc.h
/usr/include/rpm/pkgio.h
/usr/include/rpm/rpmal.h
/usr/include/rpm/rpmbc.h
/usr/include/rpm/rpmbuild.h
/usr/include/rpm/rpmcb.h
/usr/include/rpm/rpmcli.h
/usr/include/rpm/rpmconstant.h
/usr/include/rpm/rpmdav.h
/usr/include/rpm/rpmdb.h
/usr/include/rpm/rpmdpkg.h
/usr/include/rpm/rpmds.h
/usr/include/rpm/rpmevr.h
/usr/include/rpm/rpmfc.h
/usr/include/rpm/rpmfi.h
/usr/include/rpm/rpmgi.h
/usr/include/rpm/rpmhash.h
/usr/include/rpm/rpmio-stub.h
/usr/include/rpm/rpmio.h
/usr/include/rpm/rpmlib.h
/usr/include/rpm/rpmlog.h
/usr/include/rpm/rpmmacro.h
/usr/include/rpm/rpmmg.h
/usr/include/rpm/rpmns.h
/usr/include/rpm/rpmnss.h
/usr/include/rpm/rpmpgp.h
/usr/include/rpm/rpmps.h
/usr/include/rpm/rpmspec.h
/usr/include/rpm/rpmsq.h
/usr/include/rpm/rpmssl.h
/usr/include/rpm/rpmsw.h
/usr/include/rpm/rpmsx.h
/usr/include/rpm/rpmtag.h
/usr/include/rpm/rpmte.h
/usr/include/rpm/rpmts.h
/usr/include/rpm/rpmurl.h
/usr/include/rpm/rpmversion.h
/usr/include/rpm/rpmwf.h
/usr/include/rpm/rpmxar.h
/usr/include/rpm/signature.h
/usr/include/rpm/stringbuf.h
/usr/include/rpm/ugid.h

This make sense because rpm-5 is not backwards compatible with rpm-4, which is what net-snmp was build for.

I suggest downgrading to rpm-4.4.x until someone (maybe me) patches net-snmp for new rpm.
Comment 3 Ariel Poliak 2008-01-07 06:56:28 UTC
I am also affected by this bug -- adding myself to CC list...
Comment 4 Jeff Johnson 2008-09-05 18:50:01 UTC
There's a patch to fix net-snmp compilation against rpm-5.1.4 at

    http://rpm5.org/community/rpm-devel/2982.html

Future versions of net-snmp will likely avoid -lrpm so that the issue
does not reappear again and again and again.
Comment 5 Jeff Johnson 2008-09-05 20:51:55 UTC
It appears that the patch was stripped from the e-mail posting.

The patch for net-snmp to build against rpm-5.1.4 is at

    http://wraptastic.org/pub/jbj/rpm514.patch

as well. Sorry for the erroneous link.
Comment 6 Andrey Falko 2008-09-06 00:08:52 UTC
Thanks for the patch Jeff.

I can't get the patch to apply to net-snmp :(. I tried with 5.4.1.1, 5.4.1, and 5.4 :(. 

I removed the front net-snmp-5.4/ in the patch.

Here is the command that portage is trying to run:

patch -p0 -g0 -E --no-backup-if-mismatch < /usr/local/portage/net-analyzer/net-snmp/files/net-snmp-5.4-rpm5.patch


Here is the output:
patching file agent/mibgroup/host/hr_swinst.c
patching file configure
Hunk #3 FAILED at 24782.
Hunk #4 succeeded at 24828 with fuzz 2.
Hunk #5 FAILED at 24859.
Hunk #6 FAILED at 24920.
Hunk #7 succeeded at 24961 with fuzz 1.
Hunk #9 FAILED at 24982.
Hunk #10 FAILED at 24995.
Hunk #11 succeeded at 25232 with fuzz 1.
Hunk #12 succeeded at 27503 (offset 8 lines).
Hunk #13 succeeded at 27798 (offset 8 lines).
Hunk #14 succeeded at 27807 (offset 8 lines).
Hunk #15 succeeded at 27816 (offset 8 lines).
Hunk #16 succeeded at 27852 (offset 8 lines).
Hunk #17 succeeded at 27894 (offset 8 lines).
Hunk #18 succeeded at 27923 (offset 8 lines).
5 out of 18 hunks FAILED -- saving rejects to file configure.rej

Here is the md5sums of net-snmp-5.4, 5.4.1, and 5.4.1.1:

46d893281056ff476e597659cb91574d  net-snmp-5.4.tar.gz
6c974df7a5a5b1579f72115e6b045bda  net-snmp-5.4.1.tar.gz
00acdef24bfde94ec5a291233e2611b6  net-snmp-5.4.1.1.tar.gz
Comment 7 Jeff Johnson 2008-09-06 12:54:04 UTC
Could you point me at a reference tarball? I'll rebase the patch so
that it apples directly to the reference tarball. I don't run Gentoo
is the difficulty for me.

Thanks.
Comment 8 Jeff Johnson 2008-09-06 13:19:34 UTC
I've rebased the patch against this reference tarball

    http://gentoolabs.com.ar/distfiles/net-snmp-5.4.1.1.tar.gz

The rebased patch is at

    http://wraptastic.org/pub/jbj/rpm514-netsnmp-5.4.1.1.patch

Note that you also will need to do

    CPPFLAGS=/usr/include/rpm

before running configure.

hth

   
Comment 9 Andrey Falko 2008-09-07 19:57:17 UTC
Created attachment 164847 [details]
config.log for compile with Jeff's patch

The patch applied with no problems, but I'm stuck on another problem:

checking rpm/rpmlib.h usability... no
checking rpm/rpmlib.h presence... yes
configure: WARNING: rpm/rpmlib.h: present but cannot be compiled
configure: WARNING: rpm/rpmlib.h:     check for missing prerequisite headers?
configure: WARNING: rpm/rpmlib.h: see the Autoconf documentation
configure: WARNING: rpm/rpmlib.h:     section "Present But Cannot Be Compiled"
configure: WARNING: rpm/rpmlib.h: proceeding with the preprocessor's result
configure: WARNING: rpm/rpmlib.h: in the future, the compiler will take precedence
configure: WARNING:     ## ---------------------------------------------------- ##
configure: WARNING:     ## Report this to net-snmp-coders@lists.sourceforge.net ##
configure: WARNING:     ## ---------------------------------------------------- ##
checking for rpm/rpmlib.h... yes
checking rpm/header.h usability... no
checking rpm/header.h presence... no
checking for rpm/header.h... no
checking for rpm/rpmlib.h... (cached) yes
checking for rpm/header.h... (cached) no
configure: error: Could not find either the RPM header files needed and was specifically asked to use RPM support

The attached config.log should probably be enough. I'm going to continue working this today.
Comment 10 Jeff Johnson 2008-09-07 20:07:06 UTC
Hmmm, rpmRC seems to be the failure in

configure:29523: checking rpm/rpmlib.h usability
configure:29540: i686-pc-linux-gnu-gcc -c  -O2 -march=athlon64 -pipe -Ulinux -Dlinux=linux -I /usr/include/rpm  conftest.c >&5
In file included from conftest.c:100:
/usr/include/rpm/rpmlib.h:266: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rpmReadPackageFile'
/usr/include/rpm/rpmlib.h:282: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rpmInstallSourcePackage'
configure:29546: $? = 1

rpmRC is defined in rpmio.h, which should have been included automagically by <rpmlib.h>

Make sure you have
   CPPFLAGS=/usr/include/rpm
defined before running the net-snmp configure. The issue is that rpmlib.h
includes files with out the rpm/ prefix, augmenting CPPFLAGS tells where
the net-snmp configure tests should look for othe includes.
Comment 11 Andrey Falko 2008-09-07 20:23:49 UTC
(In reply to comment #10)
> Make sure you have
>    CPPFLAGS=/usr/include/rpm

If I get CPPFLAGS to exactly that I get a nasty:

checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables

I get it to CPPFLAGS="-I /usr/include/rpm"

> defined before running the net-snmp configure. The issue is that rpmlib.h
> includes files with out the rpm/ prefix, augmenting CPPFLAGS tells where
> the net-snmp configure tests should look for othe includes.
> 

CPPFLAGS does appear to get set to the above as it shows up all over the place in config.log :(. Perhaps its some bug on a gentoo system? I'm going to try to setup a chroot with a non-gentoo toolchain so that I can make sure.
Comment 12 Andrey Falko 2008-09-07 20:28:00 UTC
Created attachment 164849 [details, diff]
rpm514-netsnmp-5.4.1.1.patch
Comment 13 Andrey Falko 2008-09-07 20:33:58 UTC
Created attachment 164851 [details, diff]
net-snmp-5.4.1.1-r1.ebuild.patch

In case any Gentoo user wants to test this out on their systems: Create net-snmp-5.4.1.1-r1.ebuild in your overlay and put the patch into your files directory and try to compile against rpm-5.1.4 ebuild which you can find here: http://bugs.gentoo.org/show_bug.cgi?id=223481 (just apply the patch to rpm-5.0.3 ebuild)
Comment 14 Mario Fetka (geos_one) 2008-11-04 00:50:27 UTC
Created attachment 170663 [details, diff]
files/net-snmp-5.4.1.1-rpm5-1.patc

this is a cleaner patch
my mod patching configure.in
Comment 15 Jeff Johnson 2010-09-09 16:06:33 UTC
tracked at https://bugs.launchpad.net/rpm/+bug/634172
Comment 16 Stanislav Ochotnicky (RETIRED) gentoo-dev 2012-07-26 08:27:42 UTC
For the record, we moved rpm-5.x into a separate app-arch/rpm5 package. It's a different upstream so we felt it was best course of action
Comment 17 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-03 11:53:31 UTC
(In reply to comment #16)
> For the record, we moved rpm-5.x into a separate app-arch/rpm5 package. It's
> a different upstream so we felt it was best course of action