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.
Created attachment 138550 [details] emerge --info
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.
I am also affected by this bug -- adding myself to CC list...
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.
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.
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
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.
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
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.
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.
(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.
Created attachment 164849 [details, diff] rpm514-netsnmp-5.4.1.1.patch
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)
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
tracked at https://bugs.launchpad.net/rpm/+bug/634172
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
(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