Bug 89466 - ethereal-0.9.9-2 src RPM fails to compile RPMs
ethereal-0.9.9-2 src RPM fails to compile RPMs
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: ethereal (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-23 00:32 EDT by John Guthrie
Modified: 2015-03-04 20:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-11-25 09:09:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch for the ethereal spec file (965 bytes, patch)
2003-04-23 00:52 EDT, John Guthrie
no flags Details | Diff

  None (edit)
Description John Guthrie 2003-04-23 00:32:59 EDT
Description of problem:  The spec file as provided by the source RPM for ethereal-0.9.9-2 fails to compile.  It also requires libelf-devel.


Version-Release number of selected component (if applicable):  0.9.9-2


How reproducible:  completely, and perfectly.


Steps to Reproduce:
1.Download ethereal-0.9.9-2.src.rpm from a Red Hat Raw Hide mirror into
  the directory /usr/src/redhat/SRPMS
2.Run
  rpm -Uhv ethereal-0.9.9-2.src.rpm
  This puts the source and patches into /usr/src/redhat/SOURCES and the spec
  file into /usr/src/redhat/SPECS
3.cd /usr/src/redhat/SPECS
4.Run
  rpmbuild -bb ethereal.spec
    
Actual results:  1) If libelf-devel is not installed, then the configure
   script fails.
   2) If libelf-devel is installed, then the libtool fails in
   /usr/src/redhat/BUILD/ethereal-0.9.9/plugins/docsis with several errors
   saying that it can't find the command "-e".

Expected results:  This should end up producing two RPM files.


Additional info:
Comment 1 John Guthrie 2003-04-23 00:50:55 EDT
With libelf-devel installed, here is the relevant tail of the output of the command
  rpmbuild -bb ethereal.spec:

Making all in plugins
make[2]: Entering directory `/usr/local/src/redhat/BUILD/ethereal-0.9.9/plugins'
Making all in docsis
make[3]: Entering directory `/usr/local/src/redhat/BUILD/ethereal-0.9.9/plugins/docsis'
source='packet-docsis.c' object='packet-docsis.lo' libtool=yes \
depfile='.deps/packet-docsis.Plo' tmpdepfile='.deps/packet-docsis.TPlo' \
depmode=gcc3 /bin/sh ../../depcomp \
/bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I/usr/include  -I/usr/include/rpm -DINET6 -O2 -march=i386 -mcpu=i686 -Dlinux -I/usr/include/rpm -I. -I/usr/include/net-snmp  -DINET6 -D_U_="__attribute__((unused))" -Wall -W -O2 -march=i386 -mcpu=i686  -I../.. -I../../wiretap -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/include/rpm -DINET6 -O2 -march=i386 -mcpu=i686 -Dlinux -I/usr/include/rpm -I. -I/usr/include/net-snmp -c -o packet-docsis.lo `test -f 'packet-docsis.c' || echo './'`packet-docsis.c
../../libtool: line 1: s%^.*/%%: No such file or directory
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
../../libtool: line 1: -e: command not found
: compile: cannot determine name of library object from `'
make[3]: *** [packet-docsis.lo] Error 1
make[3]: Leaving directory `/usr/local/src/redhat/BUILD/ethereal-0.9.9/plugins/docsis'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/redhat/BUILD/ethereal-0.9.9/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/redhat/BUILD/ethereal-0.9.9'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.75427 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.75427 (%build)

Now looking at the libtool script, we find the following on line 356:

Xsed="${SED}"' -e 1s/^X//'

However, the environment variable SED is not defined in the Makefile!  In fact, it is not defined in any Makefile.  Hence, in all of the places where
$Xsed is being used as a command, the shell is trying to execute a command called '-e'.  There are two solutions to this.  One is to fix configure, so that it actually puts definitions of SED into the Makefiles.  The other way, which I chose, was to just add 'SED=sed' on the make command lines in the spec file.  You will see this in the attached patch file.

I have also put in a line

BuildRequires:  libelf-devel
Comment 2 John Guthrie 2003-04-23 00:52:22 EDT
Created attachment 91242 [details]
Patch for the ethereal spec file
Comment 3 John Guthrie 2003-04-23 17:29:22 EDT
I just downloaded the newest src RPM Raw Hide ethereal, ethereal-0.9.11-3 from the FTP site.  It looks like the SED issue has been fixed in this version of the spec file.  However, the line

BuildRequires: libelf-devel

still needs to be put into the spec file.
Comment 4 Phil Knirsch 2003-04-24 03:34:39 EDT
Thanks for the info and the update. Actually i think there is no reason why
ethereal should require libelf at all, so i'll look into removing that
dependancy completely.

Read ya, Phil
Comment 5 John Guthrie 2003-04-25 23:36:13 EDT
When I remove the libelf-devel RPM, and then I try to run

rpmbuild -bb ethereal.spec

I get the following as the last several lines of output:

cfile.o column.o conditions.o crypt-des.o crypt-md4.o crypt-md5.o crypt-rc4.o pa
cket-dcerpc-nt.o follow.o g711.o in_cksum.o ipproto.o pcap-util.o prefs.o print.
o ps.o ptvcursor.o reassemble.o ringbuffer.o tap.o util.o xdlc.o xmlstub.o regis
ter.o capture.o file.o filters.o proto_hier_stats.o summary.o .libs/etherealS.o
-rdynamic -Wl,--export-dynamic  plugins/docsis/.libs/docsis.so plugins/giop/.lib
s/cosnaming.so plugins/giop/.libs/coseventcomm.so plugins/gryphon/.libs/gryphon.
so plugins/megaco/.libs/megaco.so plugins/mgcp/.libs/mgcp.so plugins/pcli/.libs/
pcli.so wiretap/libwiretap.a gtk/libui.a epan/libethereal.a epan/ftypes/libftype
s.a epan/dfilter/libdfilter.a /usr/lib/libnetsnmp.so -lelf -lcrypto -lpcap -L/us
r/lib -L/usr/X11R6/lib /usr/lib/libgtk.so /usr/lib/libgdk.so /usr/lib/libgmodule
.so /usr/lib/libglib.so -ldl -lXi -lXext -lX11 -lm -lz -Wl,--rpath -Wl,/usr/lib/
ethereal/plugins/0.9.11
/usr/bin/ld: cannot find -lelf
collect2: ld returned 1 exit status
make[2]: *** [ethereal] Error 1
make[2]: Leaving directory `/home/john/rpm_build/BUILD/ethereal-0.9.11'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/john/rpm_build/BUILD/ethereal-0.9.11'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.66558 (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.66558 (%build)

(Sorry I couldn't get the full command line.  When I ran this, I was on a
console, and this was all that was on the screen.)  Anyway, as you can see,
make is trying to compile libelf into at least one of the executables.
Moreover, running ldd on the tethereal executable from previous successful
runs yields this:
        docsis.so => /usr/lib/ethereal/plugins/0.9.11/docsis.so (0x40014000)
        cosnaming.so => /usr/lib/ethereal/plugins/0.9.11/cosnaming.so (0x40030000)
        coseventcomm.so => /usr/lib/ethereal/plugins/0.9.11/coseventcomm.so (0x40034000)
        gryphon.so => /usr/lib/ethereal/plugins/0.9.11/gryphon.so (0x40037000)
        megaco.so => /usr/lib/ethereal/plugins/0.9.11/megaco.so (0x40042000)
        mgcp.so => /usr/lib/ethereal/plugins/0.9.11/mgcp.so (0x40045000)
        pcli.so => /usr/lib/ethereal/plugins/0.9.11/pcli.so (0x4004b000)
        libnetsnmp.so.5 => /usr/lib/libnetsnmp.so.5 (0x40065000)
->      libelf.so.0 => /usr/lib/libelf.so.0 (0x400e2000)
        libcrypto.so.2 => /lib/libcrypto.so.2 (0x400f6000)
        libgmodule-1.2.so.0 => /usr/lib/libgmodule-1.2.so.0 (0x401ca000)
        libglib-1.2.so.0 => /usr/lib/libglib-1.2.so.0 (0x401cd000)
        libdl.so.2 => /lib/libdl.so.2 (0x401f3000)
        libm.so.6 => /lib/libm.so.6 (0x401f7000)
        libpcap.so.0.6.2 => /usr/lib/libpcap.so.0.6.2 (0x40219000)
        libz.so.1 => /usr/lib/libz.so.1 (0x40236000)
        libc.so.6 => /lib/libc.so.6 (0x40244000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Now whether that dependency is actually needed is quite another question.  To
get some kind of answer, I ran

rpmbuild -bp ethereal.spec

in order to get a raw distribution, then I ran the configure command that was
in the spec file by hand.  I then proceeded to delete every occurence of
-lelf in every Makefile by hand, and then I ran make.  When I do this, the
build completes cleanly.  Here is the result of running

ldd ./libs/tethereal

from the build source tree directory:

ldd .libs/tethereal
        docsis.so => not found
        cosnaming.so => not found
        coseventcomm.so => not found
        gryphon.so => not found
        megaco.so => not found
        mgcp.so => not found
        pcli.so => not found
        libnetsnmp.so.5 => /usr/lib/libnetsnmp.so.5 (0x4002c000)
        libcrypto.so.2 => /lib/libcrypto.so.2 (0x400a9000)
        libgmodule-1.2.so.0 => /usr/lib/libgmodule-1.2.so.0 (0x4017d000)
        libglib-1.2.so.0 => /usr/lib/libglib-1.2.so.0 (0x40180000)
        libdl.so.2 => /lib/libdl.so.2 (0x401a6000)
        libm.so.6 => /lib/libm.so.6 (0x401a9000)
        libpcap.so.0.6.2 => /usr/lib/libpcap.so.0.6.2 (0x401cc000)
        libz.so.1 => /usr/lib/libz.so.1 (0x401e9000)
        libc.so.6 => /lib/libc.so.6 (0x401f7000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

All of the lines that say 'not found' are plugins that are normally found in
/usr/lib/ethereal/plugins/0.9.11, so this is to be expected.  However, note
that the is no libelf line.  So in particular, configure is adding -lelf into
all of the Makefiles needlessly.  I'm not an expert with autoconf, so I'll
let someone else try to make any fixes there.  But this gives some
confirmation that libelf is completely superfluous, despite configure adding
it in.  (Configure seems to be adding it in all cases these days unless
ld does not support it.)

I hope that this helps.  Sorry for being a little on the verbose side.
Comment 6 Phil Knirsch 2003-11-25 09:09:33 EST
Fixed in ethereal-0.9.16-3 and later.

Read ya, Phil

Note You need to log in before you can comment on or make changes to this bug.