make: ./libtool: Command not found

Gregory Machin gdm at
Tue Jul 13 11:40:04 UTC 2010

I'm looking for advise on how to over-ride the Makefile, via the .spec file.

Here is the situation.
I'm trying to build libjpeg.spec , all the files are in the correct
places ./SPEC, ./SOURCE. No matter what I try I get the following ....

checking libjpeg version number... 62
creating ./config.status
creating Makefile
creating jconfig.h
+ make libdir=/usr/lib
./libtool --mode=compile gcc -O2 -g -m32 -march=i586
-fasynchronous-unwind-tables  -I. -c ./jcapimin.c
make: ./libtool: Command not found
make: *** [jcapimin.lo] Error 127
error: Bad exit status from /var/tmp/rpm-tmp.8207 (%build)

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

I looked in the make file and LIBTOOL is set to "LIBTOOL= libtool", I
checked on the file system and libtool is in /usr/bin

I can do a ./configure, make LIBTOOL= libtool , make install LIBTOOL= libtool
and it then installs manualy .. but this defeats the purpose of rpm..

So how can I set LIBTOOL to the correct value in the libjpeg.spec file ?

this is the spec file below ....

bash-3.00# cat ./SPECS/libjpeg.spec
%define LIBVER 62.0.0
Summary: A library for manipulating JPEG image format files.
Name: libjpeg
Version: 6b
Release: 33
License: distributable
Group: System Environment/Libraries
Patch0: libjpeg-6b-arm.patch
Patch1: jpeg-c++.patch
Patch2: libjpeg-shared.patch
Patch3: libjpeg-rpath.patch
Buildroot: %{_tmppath}/%{name}-root

%package devel
Summary: Development tools for programs which will use the libjpeg library.
Group: Development/Libraries
Requires: libjpeg = %{version}

The libjpeg package contains a library of functions for manipulating
JPEG images, as well as simple client programs for accessing the
libjpeg functions.  Libjpeg client programs include cjpeg, djpeg,
jpegtran, rdjpgcom and wrjpgcom.  Cjpeg compresses an image file into
JPEG format.  Djpeg decompresses a JPEG file into a regular image
file.  Jpegtran can perform various useful transformations on JPEG
files.  Rdjpgcom displays any text comments included in a JPEG file.
Wrjpgcom inserts text comments into a JPEG file.

%description devel
The libjpeg-devel package includes the header files and static libraries
necessary for developing programs which will manipulate JPEG files using
the libjpeg library.

If you are going to develop programs which will manipulate JPEG images,
you should install libjpeg-devel.  You'll also need to have the libjpeg
package installed.

%setup -q -n jpeg-6b
%patch0 -p1 -b .arm
%patch1 -p1 -b .c++
%patch2 -p1 -b .ppcshared
%patch3 -p1

%configure --enable-shared --enable-static

make libdir=%{_libdir} %{?_smp_mflags}

mkdir -p $RPM_BUILD_ROOT/usr/{include,bin}
mkdir -p $RPM_BUILD_ROOT%{_libdir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1

# Work around the broken makefiles...
mv $RPM_BUILD_ROOT%{_mandir}/*.1 $RPM_BUILD_ROOT%{_mandir}/man1

/sbin/ldconfig -n $RPM_BUILD_ROOT/%{_libdir}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%doc usage.doc README

%files devel
%doc libjpeg.doc coderules.doc structure.doc wizard.doc example.c



More information about the Rpm-list mailing list