Bug 1071919

Summary: Unable to link against libupsclient 2.7
Product: [Fedora] Fedora Reporter: Ruben Kerkhof <ruben>
Component: nutAssignee: Michal Hlavinka <mhlavink>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mhlavink
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nut-2.7.1-2.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-06 14:20:19 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:

Description Ruben Kerkhof 2014-03-03 12:59:18 UTC
Description of problem:

The upgrade of nut from 2.6.5 to 2.7 broke collectd.
The configure test of collectd does the following:

configure:25197: Checking for libupsclient using /usr/bin/x86_64-redhat-linux-gnu-pkg-config
configure:25232: checking upsclient.h usability
configure:25232: gcc -c -O2 -g -pipe -Wall -Werror=format-security -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 -DLT_LAZY_OR_NOW='RTLD_LAZY|RTLD_GLOBAL'   conftest.c >&5
configure:25232: $? = 0
configure:25232: result: yes
configure:25232: checking upsclient.h presence
configure:25232: gcc -E   conftest.c
configure:25232: $? = 0
configure:25232: result: yes
configure:25232: checking for upsclient.h
configure:25232: result: yes
configure:25255: checking for upscli_connect in -lupsclient
configure:25280: gcc -o conftest -O2 -g -pipe -Wall -Werror=format-security -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 -DLT_LAZY_OR_NOW='RTLD_LAZY|RTLD_GLOBAL'   -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -lupsclient -lssl -lcrypto  conftest.c -lupsclient  -ldl  >&5
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libupsclient.so: undefined reference to `upslogx'
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libupsclient.so: undefined reference to `upslog_with_errno'
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libupsclient.so: undefined reference to `upsdebugx'

It looks like upslogx, upslog_with_errno and upsdebugx are not exported properly:

[ruben@vm ~]$ readelf  --dyn-syms /usr/lib64/libupsclient.so.3.0.1 | egrep '(upslogx|upslog_with_errno|upsdebugx)'
    20: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND upsdebugx
    41: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND upslogx
    51: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND upslog_with_errno

Comment 1 Michal Hlavinka 2014-03-06 14:20:19 UTC
Should be fixed now.

PS: Sorry for no heads-up, I did not know it would affect anything as repoquery did not show me any package depending on nut and/or nut-devel. I did not test for nut-client. Next time.

Comment 2 Ruben Kerkhof 2014-03-06 14:59:34 UTC
Hi Michal,

Great, thanks for fixing it so quickly!

No problem at all about the headsup.