You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "B. Blodau" <b_...@hamburg.de> on 2007/09/04 15:12:07 UTC

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

Re: Compiling minimal_client on MacOS X

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 5, 2007, at 04:07, Jeremy Pereira wrote:

> The libraries generated by the standard subversion build are not  
> universal, so if you try to build your application as a universal  
> binary, you will still get loads of unresolved symbols when the  
> binary for the unsupported architecture is linked.  One day I might  
> see if I can build universal versions of the subversion and apr  
> libraries, but I suspect that is a longish and frustrating task -  
> unless somebody else has already done it.

You can take a look at MacPorts [1], with which I have successfully  
built subversion, apr, apr-util, expat, gettext, libiconv, neon,  
openssl, and zlib universal, like this:

$ sudo port selfupdate
$ sudo port install apr-util +no_bdb
$ sudo port install subversion +no_bdb +universal

I think most of the software installs universal in the "usual" way  
described in the Apple tech note. Only a few of the ports need  
special help.

Note that MacPorts universal binaries target Mac OS X 10.4+ for both  
Intel and PPC. MacPorts doesn't make universal binaries that run on  
10.3+ on PPC and 10.4+ on Intel. That's more complicated.

[1] http://www.macports.org/



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Compiling minimal_client on MacOS X

Posted by Jeremy Pereira <je...@jeremyp.net>.
One other thing.

The libraries generated by the standard subversion build are not  
universal, so if you try to build your application as a universal  
binary, you will still get loads of unresolved symbols when the  
binary for the unsupported architecture is linked.  One day I might  
see if I can build universal versions of the subversion and apr  
libraries, but I suspect that is a longish and frustrating task -  
unless somebody else has already done it.

>
> 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
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Compiling minimal_client on MacOS X

Posted by Jeremy Pereira <je...@jeremyp.net>.
On 14 Sep 2007, at 13:12, B. Blodau wrote:

>
> However, since I need a universal App, I tried to create universal  
> binaries. After building the svn-libs on both architectures, I  
> tried to create fat libs via the "lipo -create" command. This  
> worked fine so far, at least "lipo -info" states that all the  
> libraries are fat and contain both "ppc" and "i386" code.
>
> But if I try to link a universal project with them, on the PPC the  
> linker complains that the i386 part is missing, while on a MacIntel  
> it complains that the PPC part is missing. So finally both parts  
> seem to be included, but the linker can only find its native part.
>
> OK, this seems to be more a Mac-specific problem and it may not be  
> posted here on the Subversion mailing list. But if anybody has  
> already had the same problem and knows about a solution, please  
> don't hesitate to tell me please.

Here's a trick I used to build a project using the MySQL static libs  
which you cannot get as fat binaries.

Collect all your i386 static libraries into one directory and all  
your ppc libraries into another.  The important part is that they the  
path to the libs must have one directory name that is the  
architecture name. e.g. I have:

mysql-client/i386/lib
mysql-client/ppc/lib

In my project that links with mysql.

Then you set your project up as a normal Universal binary and put the  
lib directory in the library search path but replace the i386 or ppc  
part with "$(arch)" e.g.

mysql-client/$(arch)/lib

>
> Ciao
> Bert
>
> Am 12.09.2007 um 11:53 schrieb Jeremy Pereira:
>
>>
>> On 11 Sep 2007, at 15:56, B. Blodau wrote:
>>
>>> Hi Jeremy,
>>> thanks a lot for your help.
>>>
>>> I already tried to use the static libraries instead of the  
>>> dynamic ones, but they seem to be incomplete. At least with my  
>>> installation of the 1.4.4 version, there are no libapr,  
>>> libaprutil static libraries.
>>
>> On my installation they seem to be in the Apache installation  
>> directory.  But there are also copies in <subversion source dir>/ 
>> apr/.libs and <subversion source dir>/apr-util/.libs.
>>
>>> Building them via the source code, results in compiler errors for  
>>> at least xmltok_impl.c, which is part of the apr-utils. I'm  
>>> wondering which compiler settings may be necessary to compile it.
>>
>> Here's my configure string:
>>
>> ./configure PYTHON=/usr/bin/python --with-apxs=/usr/local/apache2/ 
>> bin/apxs --with-berkeley-db=/usr/local/BerkeleyDB.4.3 --with-ssl -- 
>> with-editor=vi --with-swig=/usr/local/bin/swig
>>
>> I have Apache 2.0.something installed in /usr/local/apache2 and  
>> BDB 4.3 installed in /usr/local/BerkeleyDB.4.3.  With those  
>> settings, Subversion builds cleanly on my Mac.  NB you don't  
>> actually need the --with-swig switch or the --with-editor switch  
>> or probably the PYTHON=.... bit.
>>
>>> In the neon project I'm also getting compiler errors, that - e.g.  
>>> - gnutls.h can't be found. Do I have to install anything else?
>>
>> I don't have that anywhere on my file system but subversion builds  
>> fine for me.
>>>
>>> If in your case, using the souce is straight forward, would may I  
>>> do wrong? I just set up an XCode project for a tool and added the  
>>> include paths and the code and it should work fine.
>>
>> Are you trying to using XCode to build all of subversion?  It's  
>> better to just follow the build instructions in the INSTALL file  
>> in the source distribution.
>>
>>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Compiling minimal_client on MacOS X

Posted by "B. Blodau" <b_...@hamburg.de>.
Hi Jeremy,
thanks again for your help.

I think there was a misunderstanding on my side.

Before I downloaded the SVN code, I already installed SVN as a user  
installation. Therefore I already had some libs in my "/usr/local/ 
bin"-folder.
When I built the SVN libs via the source I've donwloaded later, I did  
not know that they are put into hidden ".libs" folders. So when I  
looked into the "/usr/local/lib" folder, I thought that these were  
the libraries I've built. That's also the reason why they where fat  
libs - universal.

In the meantime I found out the locations of the built l.ibs and put  
them togehter. As you said: They're not fat but either ppc or i386.

Compiling and linking with those static libs was finally successful.  
Of course, only for one architecture. The linker was still  
complaining, that some "libiconv", "libiconv_open" and  
"libiconv_close" stuff is still missing.
I finally solved that by adding the "libiconv.dylib" from "/usr/lib/"  
to the project. I'm not sure if that is the right way, but at least  
it is linking now.

However, since I need a universal App, I tried to create universal  
binaries. After building the svn-libs on both architectures, I tried  
to create fat libs via the "lipo -create" command. This worked fine  
so far, at least "lipo -info" states that all the libraries are fat  
and contain both "ppc" and "i386" code.

But if I try to link a universal project with them, on the PPC the  
linker complains that the i386 part is missing, while on a MacIntel  
it complains that the PPC part is missing. So finally both parts seem  
to be included, but the linker can only find its native part.

OK, this seems to be more a Mac-specific problem and it may not be  
posted here on the Subversion mailing list. But if anybody has  
already had the same problem and knows about a solution, please don't  
hesitate to tell me please.

Ciao
Bert

Am 12.09.2007 um 11:53 schrieb Jeremy Pereira:

>
> On 11 Sep 2007, at 15:56, B. Blodau wrote:
>
>> Hi Jeremy,
>> thanks a lot for your help.
>>
>> I already tried to use the static libraries instead of the dynamic  
>> ones, but they seem to be incomplete. At least with my  
>> installation of the 1.4.4 version, there are no libapr, libaprutil  
>> static libraries.
>
> On my installation they seem to be in the Apache installation  
> directory.  But there are also copies in <subversion source dir>/ 
> apr/.libs and <subversion source dir>/apr-util/.libs.
>
>> Building them via the source code, results in compiler errors for  
>> at least xmltok_impl.c, which is part of the apr-utils. I'm  
>> wondering which compiler settings may be necessary to compile it.
>
> Here's my configure string:
>
> ./configure PYTHON=/usr/bin/python --with-apxs=/usr/local/apache2/ 
> bin/apxs --with-berkeley-db=/usr/local/BerkeleyDB.4.3 --with-ssl -- 
> with-editor=vi --with-swig=/usr/local/bin/swig
>
> I have Apache 2.0.something installed in /usr/local/apache2 and BDB  
> 4.3 installed in /usr/local/BerkeleyDB.4.3.  With those settings,  
> Subversion builds cleanly on my Mac.  NB you don't actually need  
> the --with-swig switch or the --with-editor switch or probably the  
> PYTHON=.... bit.
>
>> In the neon project I'm also getting compiler errors, that - e.g.  
>> - gnutls.h can't be found. Do I have to install anything else?
>
> I don't have that anywhere on my file system but subversion builds  
> fine for me.
>>
>> If in your case, using the souce is straight forward, would may I  
>> do wrong? I just set up an XCode project for a tool and added the  
>> include paths and the code and it should work fine.
>
> Are you trying to using XCode to build all of subversion?  It's  
> better to just follow the build instructions in the INSTALL file in  
> the source distribution.
>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Compiling minimal_client on MacOS X

Posted by Jeremy Pereira <je...@jeremyp.net>.
On 11 Sep 2007, at 15:56, B. Blodau wrote:

> Hi Jeremy,
> thanks a lot for your help.
>
> I already tried to use the static libraries instead of the dynamic  
> ones, but they seem to be incomplete. At least with my installation  
> of the 1.4.4 version, there are no libapr, libaprutil static  
> libraries.

On my installation they seem to be in the Apache installation  
directory.  But there are also copies in <subversion source dir>/ 
apr/.libs and <subversion source dir>/apr-util/.libs.

> Building them via the source code, results in compiler errors for  
> at least xmltok_impl.c, which is part of the apr-utils. I'm  
> wondering which compiler settings may be necessary to compile it.

Here's my configure string:

./configure PYTHON=/usr/bin/python --with-apxs=/usr/local/apache2/bin/ 
apxs --with-berkeley-db=/usr/local/BerkeleyDB.4.3 --with-ssl --with- 
editor=vi --with-swig=/usr/local/bin/swig

I have Apache 2.0.something installed in /usr/local/apache2 and BDB  
4.3 installed in /usr/local/BerkeleyDB.4.3.  With those settings,  
Subversion builds cleanly on my Mac.  NB you don't actually need the  
--with-swig switch or the --with-editor switch or probably the  
PYTHON=.... bit.

> In the neon project I'm also getting compiler errors, that - e.g. -  
> gnutls.h can't be found. Do I have to install anything else?

I don't have that anywhere on my file system but subversion builds  
fine for me.
>
> If in your case, using the souce is straight forward, would may I  
> do wrong? I just set up an XCode project for a tool and added the  
> include paths and the code and it should work fine.

Are you trying to using XCode to build all of subversion?  It's  
better to just follow the build instructions in the INSTALL file in  
the source distribution.

>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Compiling minimal_client on MacOS X

Posted by "B. Blodau" <b_...@hamburg.de>.
Hi Jeremy,
thanks a lot for your help.

I already tried to use the static libraries instead of the dynamic  
ones, but they seem to be incomplete. At least with my installation  
of the 1.4.4 version, there are no libapr, libaprutil static libraries.
Building them via the source code, results in compiler errors for at  
least xmltok_impl.c, which is part of the apr-utils. I'm wondering  
which compiler settings may be necessary to compile it.
In the neon project I'm also getting compiler errors, that - e.g. -  
gnutls.h can't be found. Do I have to install anything else?

If in your case, using the souce is straight forward, would may I do  
wrong? I just set up an XCode project for a tool and added the  
include paths and the code and it should work fine.
And yes, I ran the configure tools before trying to compile.

Ciao
Bert



Am 11.09.2007 um 13:15 schrieb Jeremy Pereira:

>
> On 10 Sep 2007, at 20:16, B. Blodau wrote:
>
>> Hi Jermey, hi everybody else!
>>
>> 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 think you have two choices.
>
> Either build or obtain static versions of the Subversion libraries  
> and other dependencies and link with them instead of the dynamic  
> libraries.  I'm not quite sure how you would tell XCode to use the  
> static libraries instead of the dynamic ones.  Two possible  
> approaches are
>
> a) add the libraries to your project instead of just setting the  
> loader flags.
> b) put the static libraries in a separate directory and point the  
> library search path to that directory
>
> NB static libraries have a name of the form libxxxx.a instead of  
> libxxxx.dylib so if you have libsvn_client-1.a somewhere on your  
> system, that is the static library.
>
> The other option, if you are building a Mac OS X application  
> bundle, is to stick with the dynamic libraries but include them in  
> your bundle.
>
>
>> So my questions are:
>> - is generally possible to add the libraries to the app?
>
> See above
>
>> - am I allowed to to so, or may this be violation of SVN rights?
>
> Yes it may.  However, it is not that onerous to comply with their  
> licence.  See the file called "COPYING" in the top level of the  
> source distribution and the licences of the dependencies e.g. apr  
> and neon to find out what your obligations are.
>
>> - 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.
>
> Yes, I always build Subversion from source except on Windows. It's  
> pretty straight forward, except you don't get fat binaries.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Compiling minimal_client on MacOS X

Posted by Jeremy Pereira <je...@jeremyp.net>.
On 10 Sep 2007, at 20:16, B. Blodau wrote:

> Hi Jermey, hi everybody else!
>
> 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 think you have two choices.

Either build or obtain static versions of the Subversion libraries  
and other dependencies and link with them instead of the dynamic  
libraries.  I'm not quite sure how you would tell XCode to use the  
static libraries instead of the dynamic ones.  Two possible  
approaches are

a) add the libraries to your project instead of just setting the  
loader flags.
b) put the static libraries in a separate directory and point the  
library search path to that directory

NB static libraries have a name of the form libxxxx.a instead of  
libxxxx.dylib so if you have libsvn_client-1.a somewhere on your  
system, that is the static library.

The other option, if you are building a Mac OS X application bundle,  
is to stick with the dynamic libraries but include them in your bundle.


> So my questions are:
> - is generally possible to add the libraries to the app?

See above

> - am I allowed to to so, or may this be violation of SVN rights?

Yes it may.  However, it is not that onerous to comply with their  
licence.  See the file called "COPYING" in the top level of the  
source distribution and the licences of the dependencies e.g. apr and  
neon to find out what your obligations are.

> - 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.

Yes, I always build Subversion from source except on Windows. It's  
pretty straight forward, except you don't get fat binaries.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Compiling minimal_client on MacOS X

Posted by "B. Blodau" <b_...@hamburg.de>.
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.
Ciao
Bert

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

Re: Compiling minimal_client on MacOS X

Posted by Jeremy Pereira <je...@jeremyp.net>.
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

Re: Compiling minimal_client on MacOS X

Posted by "B. Blodau" <b_...@hamburg.de>.
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

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

Re: Compiling minimal_client on MacOS X

Posted by Jeremy Whitlock <jc...@gmail.com>.
Bert,
    I'm not sure which version you downloaded by the version I maintain:

http://downloads.open.collab.net/binaries.html

includes all of the headers and libraries used to build/run
Subversion.  It should have the headers you need.

Take care,

Jeremy

On 9/4/07, Miller, Eric <Er...@amd.com> wrote:
> 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

RE: Compiling minimal_client on MacOS X

Posted by "Miller, Eric" <Er...@amd.com>.
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