Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 202399
Alias:
Product:
Component:
Status: NEW
Resolution:
Assigned To: Netmon Herd <netmon@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Manuel Gomez <targen@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
emerge.info emerge --info text/plain Manuel Gomez 2007-12-15 17:10 0000 9.96 KB Details
config.log config.log for compile with Jeff's patch text/plain Andrey Falko 2008-09-07 19:57 0000 92.76 KB Details
rpm514-netsnmp-5.4.1.1.patch rpm514-netsnmp-5.4.1.1.patch patch Andrey Falko 2008-09-07 20:28 0000 11.54 KB Details | Diff
net-snmp-5.4.1.1-r1.ebuild.patch net-snmp-5.4.1.1-r1.ebuild.patch patch Andrey Falko 2008-09-07 20:33 0000 875 bytes Details | Diff
net-snmp-5.4.1.1-rpm5-1.patch files/net-snmp-5.4.1.1-rpm5-1.patc patch Mario Fetka 2008-11-04 00:50 0000 2.21 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 202399 depends on: Show dependency tree
Bug 202399 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.








View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-12-15 17:08 0000
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 From Manuel Gomez 2007-12-15 17:10:05 0000 -------
Created an attachment (id=138550) [details]
emerge --info

------- Comment #2 From Andrey Falko 2007-12-15 21:21:28 0000 -------
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 From Ariel Poliak 2008-01-07 06:56:28 0000 -------
I am also affected by this bug -- adding myself to CC list...

------- Comment #4 From Jeff Johnson 2008-09-05 18:50:01 0000 -------
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 From Jeff Johnson 2008-09-05 20:51:55 0000 -------
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 From Andrey Falko 2008-09-06 00:08:52 0000 -------
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 From Jeff Johnson 2008-09-06 12:54:04 0000 -------
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 From Jeff Johnson 2008-09-06 13:19:34 0000 -------
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 From Andrey Falko 2008-09-07 19:57:17 0000 -------
Created an attachment (id=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 From Jeff Johnson 2008-09-07 20:07:06 0000 -------
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 From Andrey Falko 2008-09-07 20:23:49 0000 -------
(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 From Andrey Falko 2008-09-07 20:28:00 0000 -------
Created an attachment (id=164849) [details]
rpm514-netsnmp-5.4.1.1.patch

------- Comment #13 From Andrey Falko 2008-09-07 20:33:58 0000 -------
Created an attachment (id=164851) [details]
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 From Mario Fetka 2008-11-04 00:50:27 0000 -------
Created an attachment (id=170663) [details]
files/net-snmp-5.4.1.1-rpm5-1.patc

this is a cleaner patch
my mod patching configure.in

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug