You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Barry Scott <ba...@barrys-emacs.org> on 2006/11/04 10:24:54 UTC

Re: problem compiling against keychain auth on mac

On Oct 31, 2006, at 01:28, Ben Collins-Sussman wrote:

> On 10/30/06, Barry Scott <ba...@barrys-emacs.org> wrote:
>
>>
>> But XCODE g++ does not define DARWIN. How is this supposed to work?
>>
>
> DARWIN is defined by APR, our portability layer.  That's how it works.
>

I cannot find a #define for DARWIN in the APR include files.

  $ grep DARWIN /usr/local/svn140/include/apr-0/*
/usr/local/svn140/include/apr-0/apr_portable.h:#elif defined(DARWIN)
/usr/local/svn140/include/apr-0/apr_signal.h:#if defined(DARWIN) && ! 
defined(__cplusplus) && !defined(_ANSI_SOURCE)

I built my own SVN using your two source kits as
follows is that has any bearing on the problem.

Also isn't testing for DARWIN the wrong thing to do?
The key chain is a Mac OS X features not a Darwin feature right?

Barry

---------------- build-svn.sh ---------------
#!/bin/sh

. software-version.inc

[ -e ${TARGET} ] || mkdir ${TARGET}
cd ${TARGET}
echo Info: Cleanup...
rm -rf subversion-${SVNVER}
echo Info: Extract SVN sources...
tar -xjf ${INPUT_KIT_DIR}/subversion-${SVNVER}.tar.bz2
tar -xjf ${INPUT_KIT_DIR}/subversion-deps-${SVNVER}.tar.bz2

# must make the install path P at least as long as X so that  
install_name_tool will work
X=/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
python2.3/site-packages/pysvn/
P=/usr/local/svn140-pad-pad-pad-pad-pad-pad-pad-pad-pad-pad-pad-pad- 
pad-pad-pad-pad-pad-pad-pad-pad-pad

cd subversion-${SVNVER}
(
     # make sure that only Mac OS X components are found
     # by limiting the PATH. e.g. no /usr/local/bin etc
     PATH=/bin:/usr/bin
     echo Info: Configure...
     ./configure 2>&1 \
         --prefix=$P \
         --disable-mod-activation --without-apxs --with-ssl

     echo Info: Make...
     make 2>&1
) | tee subversion-${SVNVER}-${TARGET}.log
--------------- build-svn.sh ------------------

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

Re: problem compiling against keychain auth on mac

Posted by Barry Scott <ba...@barrys-emacs.org>.
On Nov 5, 2006, at 20:24, Garrett Rooney wrote:

> On 11/5/06, Barry Scott <ba...@barrys-emacs.org> wrote:
>
>> I also take it that you do not consider it a problem that an svn
>> header file
>> publishes an API function that may not be in a the corresponding
>> library.
>> e.g. keychain function in header is conditional on DARWIN but the
>> C source is conditional on SVN_HAVE_KEYCHAIN_SERVICES.
>> SVN_HAVE_KEYCHAIN_SERVICES is not exposed to users of svn
>> API.
>
> Actually, I'd say that's probably a bug.  If we're defining it in the
> header file conditional on DARWIN we should at least provide a stub
> interface that returns APR_ENOTIMPL when we don't have the right
> libraries, or we shouldn't be exposing it in the header unless we
> found the right libs.

I think its a bug as well. I'd like to see an #define that I can test  
to find out
if the method is available or be able to add it blindly to the auth list
and have it not interfere in the auth algorithm.

>
>> I notice that SVN does not compile on 10.3 because of a problem with
>> keychain
>> header/lib (sorry I did not keep the logs) is that expected.
>> I'm only supporting 10.4 for pysvn now because of this.
>
> If you could find the actual error, that would be very useful.  We
> should be able to build on 10.3.

When I next boot up on 10.3 I've get the message for you.

Barry



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

Re: problem compiling against keychain auth on mac

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 11/5/06, Barry Scott <ba...@barrys-emacs.org> wrote:

> I also take it that you do not consider it a problem that an svn
> header file
> publishes an API function that may not be in a the corresponding
> library.
> e.g. keychain function in header is conditional on DARWIN but the
> C source is conditional on SVN_HAVE_KEYCHAIN_SERVICES.
> SVN_HAVE_KEYCHAIN_SERVICES is not exposed to users of svn
> API.

Actually, I'd say that's probably a bug.  If we're defining it in the
header file conditional on DARWIN we should at least provide a stub
interface that returns APR_ENOTIMPL when we don't have the right
libraries, or we shouldn't be exposing it in the header unless we
found the right libs.

> I notice that SVN does not compile on 10.3 because of a problem with
> keychain
> header/lib (sorry I did not keep the logs) is that expected.
> I'm only supporting 10.4 for pysvn now because of this.

If you could find the actual error, that would be very useful.  We
should be able to build on 10.3.

-garrett

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

Re: problem compiling against keychain auth on mac

Posted by Barry Scott <ba...@barrys-emacs.org>.
On Nov 4, 2006, at 16:11, Justin Erenkrantz wrote:

> On 11/4/06, Barry Scott <ba...@barrys-emacs.org> wrote:
>> I cannot find a #define for DARWIN in the APR include files.
>>
>>   $ grep DARWIN /usr/local/svn140/include/apr-0/*
>> /usr/local/svn140/include/apr-0/apr_portable.h:#elif defined(DARWIN)
>> /usr/local/svn140/include/apr-0/apr_signal.h:#if defined(DARWIN) && !
>> defined(__cplusplus) && !defined(_ANSI_SOURCE)
>
> It's added by autoconf to EXTRA_CPPFLAGS and also appears via apr-1- 
> config.
>
> % grep DARWIN build/apr_rules.mk
> EXTRA_CPPFLAGS=-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp
> % ./apr-1-config --cppflags
> -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp
>
>> I built my own SVN using your two source kits as
>> follows is that has any bearing on the problem.
>>
>> Also isn't testing for DARWIN the wrong thing to do?
>> The key chain is a Mac OS X features not a Darwin feature right?
>
> DARWIN is defined for all Mac OS X systems by APR.  The keychain stuff
> is conditional upon it being a Darwin platform and having the keychain
> libs.  -- justin
>

Thanks for explaining how this is done. apr-config/apr-1-config gives  
me the
DARWIN define. I assume that apr can run on Darwin or Mac OS X so that
would be reasonable.

I also take it that you do not consider it a problem that an svn  
header file
publishes an API function that may not be in a the corresponding  
library.
e.g. keychain function in header is conditional on DARWIN but the
C source is conditional on SVN_HAVE_KEYCHAIN_SERVICES.
SVN_HAVE_KEYCHAIN_SERVICES is not exposed to users of svn
API.

I notice that SVN does not compile on 10.3 because of a problem with  
keychain
header/lib (sorry I did not keep the logs) is that expected.
I'm only supporting 10.4 for pysvn now because of this.

Barry

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

Re: problem compiling against keychain auth on mac

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On 11/4/06, Barry Scott <ba...@barrys-emacs.org> wrote:
> I cannot find a #define for DARWIN in the APR include files.
>
>   $ grep DARWIN /usr/local/svn140/include/apr-0/*
> /usr/local/svn140/include/apr-0/apr_portable.h:#elif defined(DARWIN)
> /usr/local/svn140/include/apr-0/apr_signal.h:#if defined(DARWIN) && !
> defined(__cplusplus) && !defined(_ANSI_SOURCE)

It's added by autoconf to EXTRA_CPPFLAGS and also appears via apr-1-config.

% grep DARWIN build/apr_rules.mk
EXTRA_CPPFLAGS=-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp
% ./apr-1-config --cppflags
 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp

> I built my own SVN using your two source kits as
> follows is that has any bearing on the problem.
>
> Also isn't testing for DARWIN the wrong thing to do?
> The key chain is a Mac OS X features not a Darwin feature right?

DARWIN is defined for all Mac OS X systems by APR.  The keychain stuff
is conditional upon it being a Darwin platform and having the keychain
libs.  -- justin

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