Bug 74354 - Sources: unwary 'make' call in .spec file
Sources: unwary 'make' call in .spec file
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: vnc (Show other bugs)
7.3
i386 Linux
low Severity low
: ---
: ---
Assigned To: Tim Waugh
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-09-21 03:17 EDT by Sysoltsev Slawa
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-10-18 13:36:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sysoltsev Slawa 2002-09-21 03:17:13 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
Here is %build and begin of %install section from vnc-3.3.3r2-28 spec file:
%build
xmkmf -a
make CDEBUGFLAGS="$RPM_OPT_FLAGS" World
cd Xvnc
make EXTRA_LIBRARIES="-lwrap -lnss_nis" CDEBUGFLAGS="$RPM_OPT_FLAGS" World

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}%{_bindir}
./vncinstall %{buildroot}%{_bindir}
cd Xvnc
make DESTDIR="%{buildroot}" install
cd ..

Installing with command `make DESTDIR="%{buildroot}" install` includes 
installing some files and also it includes `make install` in 
vnc_unixsrc/Xvnc/programs/Xserver directory. From here Xvnc and Xwrapper are 
installed but if at least one of their prerequisition (a lot of *.a and so on 
in subdirs) isn't up to date, their rebuild is happens. I have some problems 
with time (or maybe with something else) on my system and sometimes 'make' 
ridiculously considered that some *.a libs in subdirs is out of date. It tries 
to rebuild it and then also rebuild Xvnc. But it fails to build it because Xvnc 
requires linking with libwrap and libnss_nis:
hw/vnc/libvnc.a(sockets.o): In function `rfbCheckFds':
sockets.o(.text+0x438): undefined reference to `hosts_ctl'
hw/vnc/libvnc.a(httpd.o): In function `httpCheckFds':
httpd.o(.text+0x235): undefined reference to `hosts_ctl'
make: *** [Xvnc] Error 1

When Xvnc was built during '%build' stage, make was called with 
EXTRA_LIBRARIES="-lwrap -lnss_nis" parameter. In %install stage this parameter 
is missed and this caused above described error.

I added this parameter to 'make' call in %install stage and all has become OK.

So to be more acceptable on unstable systems, vnc .spec file should be:
%build
xmkmf -a
make CDEBUGFLAGS="$RPM_OPT_FLAGS" World
cd Xvnc
make EXTRA_LIBRARIES="-lwrap -lnss_nis" CDEBUGFLAGS="$RPM_OPT_FLAGS" World

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}%{_bindir}
./vncinstall %{buildroot}%{_bindir}
cd Xvnc
make EXTRA_LIBRARIES="-lwrap -lnss_nis" DESTDIR="%{buildroot}" install
cd ..


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


How reproducible:
Sometimes

Steps to Reproduce:
1. Unpack source
2. Try `rpm -bb vnc.spec`

	

Actual Results:  Compilation error during %install.

Expected Results:  Freshly built binary packages.

Additional info:
Comment 1 Tim Waugh 2002-11-08 08:21:40 EST
Fixed package is 3.3.3r2-40, which will show up in rawhide shortly. (But use NTP!)

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