[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Compiling minimal_client on MacOS X

From: Jeremy Pereira <jeremyp_at_jeremyp.net>
Date: 2007-09-05 10:54:32 CEST

On 4 Sep 2007, at 19:24, B. Blodau wrote:

> Thanks to everybody
> for the help!
>
> Getting the subversion-deps helped me to get the minimal_client
> compiling and running.
> However, if I execute it, it encounters a ZeroLink: unknown symbol
> _svn_cmdline_init

A word of advice: turn off zero link. That way the missing
dependencies will all show up when you compile the project, not one
at a time each time you fix, compile and run the application. I hate
zero link; I can't see any positive benefit of it.

As an experiment I'v just tried to compile the minimal client from
scratch using the following steps. This assumes you have compiled
and built the real subversion by the standard method.

1. turn off zero link
2. Add the apr header directory to the search header path. On my
system it is /usr/local/apr/include
3. Add the subversion header directory to the search header path. On
my system it is /usr/local/include/subversion-1

At this point the minimal client will compile but the link will fail
with hundreds of unresolved symbols.

4. Add the apr library path to the search library path. On my system
it is /usr/local/apr/lib
5. Add the subversion library path to the search path. On my system
it is /usr/local/lib
6. Under "Other linker flags" add -lapr-0 and -lsvn_client-1

If you try to build at this point XCode will complain about loads of
other missing libraries. These all need to be added to "other linker
flags" (probably if you had forced a link against the static libsvn.a
you might be done at this point).

7. Add all of the loads of other libraries.
8. When I got to here I was surprised to find XCode complaining about
BerkeleyDB 4.3 being missing, since I thought I'd built subversion
without it. If you have the same problem add the BerkeleyDB library
directory to the search library path and the library itself to "other
linker flags". For me these were respectively /usr/local/BerkeleyDB.
4.3/lib and -ldb-4

And then the build completed.

In summary, my customised settings are:

Header Search Paths: /usr/local/apr/include/apr-0 /usr/local/include/
subversion-1 $(inherited)
Zero Link: off
Library Search Paths: /usr/local/BerkeleyDB.4.3/lib /usr/local/lib /
usr/local/apr/lib $(inherited)
Other Linker Flags: -lapr-0 -lsvn_client-1 -lsvn_wc-1 -lsvn_delta-1
-lsvn_diff-1 -lsvn_subr-1 -lsvn_ra-1 -lsvn_ra_local-1 -lsvn_repos-1 -
lsvn_fs-1 -lsvn_fs_fs-1 -lsvn_fs_base-1 -lsvn_ra_svn-1 -lsvn_ra_dav-1
-laprutil-0 -lexpat -ldb-4

>
> This was obvious, since I did not add any code yet. Adding
> libsvn_client solved that zero link, but now I'm getting the next
> one: _apr_terminate.
> To make this short: Is there any documentation which code files I
> need to add to get the minimal_client running? To find that out via
> trial and error may not be efficient. :)
> As for MacOS X, I guess I have to use the unix apr-implementations,
> right?
>
> Thanks again for any help
> Bert
>
> Am 04.09.2007 um 17:26 schrieb Miller, Eric:
>
>> Did you download the subversion-deps tarball as well? It should
>> contain
>> all that suff.
>>
>> Eric
>>
>>> -----Original Message-----
>>> From: B. Blodau [mailto:b_blodau@hamburg.de]
>>> Sent: Tuesday, September 04, 2007 9:12 AM
>>> To: users@subversion.tigris.org
>>> Subject: Compiling minimal_client on MacOS X
>>>
>>> Hello,
>>> I'm Bert Blodau and I'm still a rookie to Subversion.
>>>
>>> I'm trying to write a client application for Mac OS X using SVN's C-
>>> API. As a first try I tried to compile the minimal_client.c file, to
>>> see if I can just build a mini client.
>>>
>>> Maybe I was a bit to optimistic when I just downloaded the SVN
>>> version 1.4.4 from the SVN homepage, which includes both the header-
>>> and the C-files, expecting that I can compile them right away. I got
>>> a compiler error that all the apr... files are missing. It seems
>>> that
>>> I have to get the apr files from the apache homepage. Getting the
>>> apr-1.2.9 files didn't help, since the apr.h file is still missing.
>>>
>>> I think if I invest a couple of weeks to find out which files in
>>> which version I need, I will finally made it to compile
>>> minimal_client, but this might be a bit a frustrating process.
>>> Is there anybody out there who has done this already and can provide
>>> a simple checklist where to get which files and how to setup a
>>> simple
>>> project for MacOS X (including any necessary compiler settings)?
>>> If there is already a document on the SVN homepage which describes
>>> this process, it would be nice to know about it.
>>>
>>> Thanks in advance to everybody for any help.
>>> Bert
>>>
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>>> For additional commands, e-mail: users-help@subversion.tigris.org
>>>
>>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Sep 5 10:53:08 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.