Bug 565577

Summary: "xmlrpc-c-config client --libs" is missing some libraries
Product: [Fedora] Fedora Reporter: Nalin Dahyabhai <nalin>
Component: xmlrpc-cAssignee: Enrico Scholz <rh-bugzilla>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: jzeleny, rh-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-15 21:51:42 UTC Type: ---
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: 564921    

Description Nalin Dahyabhai 2010-02-15 17:00:30 UTC
Description of problem:
Currently, running "xmlrpc-c-config client --libs" outputs "-lxmlrpc_client".  With the new DSO changes, apps which used to link correctly don't any more.  

Version-Release number of selected component (if applicable):
xmlrpc-c-devel-1.21.00-1300.1851.fc13.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. cat > version.c << EOF
    #include <stdio.h>
    #include <xmlrpc_client.h>
    int
    main(int argc, char **argv)
    {
        printf("Version %d.%d.%d.\n",
               xmlrpc_version_major,
               xmlrpc_version_minor,
               xmlrpc_version_point);
        return 0;
    }
EOF

2. gcc -Wall -o version `xmlrpc-c-config client --cflags` version.c `xmlrpc-c-config client --libs`
  
Actual results:
/usr/bin/ld: /tmp/cc5J8U8r.o: undefined reference to symbol 'xmlrpc_version_major'
/usr/bin/ld: note: 'xmlrpc_version_major' is defined in DSO /usr/lib64/libxmlrpc.so.3 so try adding it to the linker command line
/usr/lib64/libxmlrpc.so.3: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

Expected results:
Success.

Comment 1 Enrico Scholz 2010-02-15 17:57:24 UTC
mmmh... that's difficultly to solve :(   You are using symbols from 'libxmlrpc-c' but the xmlrpc-c-config script does not know this target.

I can modify this script to cover typical usecases, but

a) what are "typical usecases"?

b) this will lead to overlinking when only pure 'client' functionality (e.g. reading of 'xmlrpc_client_version_major') is required.

Comment 2 Nalin Dahyabhai 2010-02-15 18:08:21 UTC
I'm not sure what is or isn't a typical use case -- this specific example is a contrived one, for simplicity's sake.  My actual app is calling functions like xmlrpc_read_bool() when it's parsing results sent back from a server, and I expect that sort of usage is going to be pretty widespread.

Comment 3 Enrico Scholz 2010-02-15 18:14:03 UTC
I am going to replace the .so libraries with linker scripts which are including other libxmlrpc_c libs with AS_NEEDED() commands.  But this might take some time.

Comment 4 Enrico Scholz 2010-02-15 21:51:42 UTC
should be fixed by
http://koji.fedoraproject.org/koji/buildinfo?buildID=156601