Bug 565577 - "xmlrpc-c-config client --libs" is missing some libraries
"xmlrpc-c-config client --libs" is missing some libraries
Product: Fedora
Classification: Fedora
Component: xmlrpc-c (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Enrico Scholz
Fedora Extras Quality Assurance
Depends On:
Blocks: 564921
  Show dependency treegraph
Reported: 2010-02-15 12:00 EST by Nalin Dahyabhai
Modified: 2010-02-15 16:51 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-02-15 16:51:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nalin Dahyabhai 2010-02-15 12:00:30 EST
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):

How reproducible:

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

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:
Comment 1 Enrico Scholz 2010-02-15 12:57:24 EST
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 13:08:21 EST
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 13:14:03 EST
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 16:51:42 EST
should be fixed by

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