[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: B. Blodau <b_blodau_at_hamburg.de>
Date: 2007-09-10 21:16:13 CEST

Hi Jermey, hi everybody else!

Thanks Jeremy for your help, finally I got the minimal client
compiling, linking and running. I also had the idea to turn of the
zro link, but I did it on the project settings and not in the target
settings. For some reason, this seems to make a difference.

I also found out that my libs (1.4.4) are all fat binaries,
containing i368 and ppc code - according to lipo.

However, after the first time of joy about the successful run of the
app, I found out that the linker is not adding the code to my app,
but only referencing it. When I run the app on a system without SVN
installed, it can't load the libraries.
What I need, is a stand-alone app which can run even if SVN is not
explicitely installed on the users machine.
I also tried it with a system where SVN 1.3 is installed. This also
failed, since 1.3 seems not containt the libsvn_fs_base library. So
the current app requires not only that SVN is installed, it also
requires a specific version of SVN, which can be quite inconvenient
for the user.

So my questions are:
- is generally possible to add the libraries to the app?
- am I allowed to to so, or may this be violation of SVN rights?
- how can I convince XCode to link these libraries into the app (I
tried many settings but without success).
- does anybody has experience with building the SVN source code
(the .c stuff) on the Mac? Just for the case, that there is no other
way to build a stand-alone application.

Thanks again to everybody for all your support.

Am 05.09.2007 um 10:54 schrieb Jeremy Pereira:

> 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 Mon Sep 10 21:13:03 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.