Bug 1071919 - Unable to link against libupsclient 2.7
Summary: Unable to link against libupsclient 2.7
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: nut
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-03 12:59 UTC by Ruben Kerkhof
Modified: 2014-03-06 14:59 UTC (History)
1 user (show)

Fixed In Version: nut-2.7.1-2.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-06 14:20:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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