Bug 1271991

Summary: [RHEL7.2][ESX]open-vm-tools FTBFS if libSM-devel is installed
Product: Red Hat Enterprise Linux 7 Reporter: Richard W.M. Jones <rjones>
Component: open-vm-toolsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED CURRENTRELEASE QA Contact: ldu <ldu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: boyang, jingli, jsavanyo, ldu, leiwang, linl, ravindrakumar, rjones, vmware-gos-qa, xuli, yacao
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-13 09:30:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1288337, 1301891    
Attachments:
Description Flags
open-vm-tools-9.10.2-4.el7.src.rpm-x86_64-rebuild.log none

Description Richard W.M. Jones 2015-10-15 08:51:28 UTC
Description of problem:

If libSM-devel is installed, open-vm-tools fails to build from
source.  If libSM-devel is removed (it is not a BuildRequires)
then open-vm-tools builds OK.

During the ./configure phase:

checking for SmcOpenConnection in -lSM... yes

This causes HAVE_XSM to be defined.  Then during the make install
phase:

 /bin/sh ../../../libtool --mode=install /usr/bin/install -c  'libdesktopEvents.la' '/usr/src/redhat/BUILDROOT/open-vm-tools-9.10.2-4.el7.x86_64/usr/lib64/open-vm-tools/plugins/vmusr/libdesktopEvents.la'
libtool: install: warning: relinking `libdesktopEvents.la'
libtool: install: (cd /usr/src/redhat/BUILD/open-vm-tools-9.10.2-2822639/services/plugins/desktopEvents; /bin/sh /usr/src/redhat/BUILD/open-vm-tools-9.10.2-2822639/libtool  --tag CC --mode=relink gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_DEFAULT_SOURCE -Wall -Werror -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing -Wno-unknown-pragmas -Wno-uninitialized -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wl,-z,defs -Wl,-lc -shared -module -avoid-version -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o libdesktopEvents.la -rpath /usr/lib64/open-vm-tools/plugins/vmusr libdesktopEvents_la-desktopEvents.lo libdesktopEvents_la-reload.lo libdesktopEvents_la-x11Lock.lo libdesktopEvents_la-xioError.lo libdesktopEvents_la-sessionMgr.lo libdesktopEvents_la-sessionMgrSignals.lo -lXtst -lXrandr -lXrender -lXi -lXinerama -lXext -lSM -lICE -L/usr/lib64 -lX11 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype /usr/src/redhat/BUILD/open-vm-tools-9.10.2-2822639/libvmtools/libvmtools.la -lglib-2.0 -lSM -lICE -inst-prefix-dir /usr/src/redhat/BUILDROOT/open-vm-tools-9.10.2-4.el7.x86_64)
libtool: relink: gcc -Wl,--as-needed -shared  .libs/libdesktopEvents_la-desktopEvents.o .libs/libdesktopEvents_la-reload.o .libs/libdesktopEvents_la-x11Lock.o .libs/libdesktopEvents_la-xioError.o .libs/libdesktopEvents_la-sessionMgr.o .libs/libdesktopEvents_la-sessionMgrSignals.o   -Wl,-rpath -Wl,/usr/lib64 -lXtst -lXrandr -lXrender -lXi -lXinerama -lXext -L/usr/lib64 -lX11 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lfreetype -L/usr/src/redhat/BUILDROOT/open-vm-tools-9.10.2-4.el7.x86_64/usr/lib64 -lvmtools -ldnet -lrt -lcrypt -licui18n -licuuc -licudata -lpthread -ldl -lm -lssl -lcrypto -lglib-2.0 -lSM -lICE  -m64 -mtune=generic -Wl,-z -Wl,defs -Wl,-lc -Wl,-z -Wl,relro   -Wl,-soname -Wl,libdesktopEvents.so -o .libs/libdesktopEvents.so
.libs/libdesktopEvents_la-reload.o: In function `ReloadSelf':
/usr/src/redhat/BUILD/open-vm-tools-9.10.2-2822639/services/plugins/desktopEvents/reload.c:54: undefined reference to `RpcChannel_Stop'
.libs/libdesktopEvents_la-xioError.o: In function `DEXIOErrorHandler':
/usr/src/redhat/BUILD/open-vm-tools-9.10.2-2822639/services/plugins/desktopEvents/xioError.c:97: undefined reference to `RpcChannel_Stop'
collect2: error: ld returned 1 exit status
libtool: install: error: relink `libdesktopEvents.la' with the above command before installing it
make[5]: *** [install-pluginLTLIBRARIES] Error 1
make[5]: Leaving directory `/usr/src/redhat/BUILD/open-vm-tools-9.10.2-2822639/services/plugins/desktopEvents'

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

open-vm-tools-9.10.2-4.el7

How reproducible:

100%

Steps to Reproduce:
1. Install libSM-devel
2. Build open-vm-tools package from source.

Additional info:

See full build log attached.

Reported by and thanks: Lili Du

Comment 1 Richard W.M. Jones 2015-10-15 08:54:41 UTC
*** Bug 1271990 has been marked as a duplicate of this bug. ***

Comment 3 Richard W.M. Jones 2015-10-15 09:01:46 UTC
Created attachment 1083185 [details]
open-vm-tools-9.10.2-4.el7.src.rpm-x86_64-rebuild.log

FFS Bugzilla.  Adding the attachment this time.

Comment 5 John Savanyo 2016-05-10 19:30:22 UTC
My understanding is that this is a bug that should be fixed in open-vm-tools and is being tracked by VMware internal PR number 1584768.

-John

Comment 7 Ravindra Kumar 2016-07-21 02:11:00 UTC
Rich, I could not repro this on a CentOS 7.2 VM while building CentOS RPMS for open-vm-tools 9.10.2 with libSM-devel package installed.

FWIW, RpcChannel_Stop symbol is provided by libvmtools which is being linked with libdesktopEvents.so (-lvmtools is present on the failed commandline), so I'm not sure what caused this failure.

This seems specific to RHEL and looks like you are not able to hit this with open-vm-tools 10.0.5?

Comment 8 Richard W.M. Jones 2016-07-21 08:11:09 UTC
Could be.  You might want to check the ./configure output carefully
to see if it contains:

  checking for SmcOpenConnection in -lSM... yes

In any case it's fixed with 10.0.5, so we're all good here.

Comment 9 Ravindra Kumar 2016-07-22 00:48:45 UTC
(In reply to Richard W.M. Jones from comment #8)
> Could be.  You might want to check the ./configure output carefully
> to see if it contains:
> 
>   checking for SmcOpenConnection in -lSM... yes

Yes, I see it for sure.

> In any case it's fixed with 10.0.5, so we're all good here.

Thanks!

Comment 11 Bo Yang 2016-09-08 01:49:32 UTC
Update:

Build open-vm-tools source package well after installed libSM-devel. Couldn't reproduce issue.

Steps:
1. Installed libSM-devel in target VM
2. Compiled open-vm-tools.src.rpm with rpmbuild, passed
3. Scp open-vm-tools.rpm produced to VM2 which NOT installed open-vm-tools
4. Installed open-vm-tools.rpm package, passed

Comment 12 Bo Yang 2016-09-08 02:04:51 UTC
Update2:


Build open-vm-tools source package well after installed libSM-devel. Couldn't reproduce issue.

ENV:
Host: ESXi6.0
Guest: 3.10.0-495.el7.x86_64
Open-vm-tools Source: open-vm-tools-10.0.5-2.el7

Steps:
1. Installed libSM-devel in target VM
2. Compiled open-vm-tools.src.rpm with rpmbuild, passed
3. Scp open-vm-tools.rpm produced to VM2 which NOT installed open-vm-tools
4. Installed open-vm-tools.rpm package, passed

Comment 13 Richard W.M. Jones 2016-09-13 09:30:58 UTC
I cannot reproduce this now.  To avoid a big circus trying to
reproduce such a minor bug, I'm closing this.