minimal_client.c does not compile as described

Bug #912810 reported by Karl Krach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subversion (Ubuntu)
New
Undecided
Unassigned

Bug Description

The minimal_client.c demo program states in its first lines how to compile it:

 * To compile on Debian:
 *
 * cc minimal_client.c -o minimal_client \
 * -I/usr/include/subversion-1 $(pkg-config --cflags apr-1) -lsvn_client-1
 *

But on Ubuntu we have to use:

$ gcc minimal_client.c -o minimal_client -I/usr/include/subversion-1 \
        $(pkg-config --libs --cflags apr-1 apr-util-1) -lsvn_client-1 \
        -lsvn_subr-1 -lsvn_fs-1

instead!

The source can be found at /usr/share/doc/libsvn1/examples/minimal_client.c.gz (libsvn-doc).

$ lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10
$ apt-cache policy libsvn-dev libsvn-doc
libsvn-dev:
  Installed: 1.6.12dfsg-4ubuntu5
  Candidate: 1.6.12dfsg-4ubuntu5
  Version table:
 *** 1.6.12dfsg-4ubuntu5 0
        500 http://de.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
        100 /var/lib/dpkg/status
libsvn-doc:
  Installed: 1.6.12dfsg-4ubuntu5
  Candidate: 1.6.12dfsg-4ubuntu5
  Version table:
 *** 1.6.12dfsg-4ubuntu5 0
        500 http://de.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Karl Krach (bluespirit) wrote :

When compiling with the original cmd line, we get this:

$ gcc minimal_client.c -o minimal_client -I/usr/include/subversion-1 $(pkg-config --cflags apr-1) -lsvn_client-1
minimal_client.c: In function ‘main’:
minimal_client.c:254:3: warning: ‘svn_client_ls’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:4077) [-Wdeprecated-declarations]
/usr/bin/ld: /tmp/ccFIqY3z.o: undefined reference to symbol 'svn_auth_get_username_prompt_provider'
/usr/bin/ld: note: 'svn_auth_get_username_prompt_provider' is defined in DSO /usr/lib/libsvn_subr-1.so.1 so try adding it to the linker command line
/usr/lib/libsvn_subr-1.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.