You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by kf...@collab.net on 2004/07/30 15:39:36 UTC

building SVN client on HP-UX w/ --enable-all-static

Brane, any chance I could get login access to that HP-UX machine
you've got?  (I quite understand if you can't, just thought I'd ask.)

I'm trying to make Subversion not link in the dynamic loader at all in
wholly static builds.  This would have no effect on most systems.
Currently, static builds link in the (static version of the) dynamic
loader and just never use it.  With this change, they wouldn't link it
in at all.  No functional difference in the client either way.

But on HP-UX, it would make a difference: apparently, there's no
static version of the dynamic loader library there, so this change
would make it possible, finally, to produce a completely static HP-UX
Subversion client.

Right now, I'm just aiming to make this work in client-only builds
from a Subversion source-release tarball.  Those have APR bundled
inside them, so if we can just get configuration to do the following

   1. Make sure APR_HAS_DSO is false
   2. Make sure apr-config does not say "-ldl", so that SVN_APR_LIBS
      won't contain "-ldl"

then we should be set.  Our code in ra_loader.c and fs-loader.c
already uses APR_HAS_DSO to conditionally omit the code that actually
calls apr_dso_load(), so if we can just get that #define right, we
wouldn't need to alter Subversion's code.

On the other hand...

I feel like this is such an obvious road that people must have
traveled down it before.  Am I missing some big gotcha?

-Karl

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

Re: building SVN client on HP-UX w/ --enable-all-static

Posted by Toby Johnson <to...@etjohnson.us>.
kfogel@collab.net wrote:

>Brane, any chance I could get login access to that HP-UX machine
>you've got?  (I quite understand if you can't, just thought I'd ask.)
>  
>
Are you aware of HP's Test Drive program? They give you free telnet 
access to HP-UX servers. Some of them have only the HP ANSI C compiler 
while others have gcc as well, but I've had more luck with the former 
anyway when compiling Subversion.

http://www.testdrive.compaq.com/

>But on HP-UX, it would make a difference: apparently, there's no
>static version of the dynamic loader library there, so this change
>would make it possible, finally, to produce a completely static HP-UX
>Subversion client.
>  
>
Yeah, I noticed that too. :) I'd be very happy to see this fixed!

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

Re: building SVN client on HP-UX w/ --enable-all-static

Posted by kf...@collab.net.
Branko Čibej <br...@xbc.nu> writes:
> Is there any particular reason that the client must be
> --enable-all-static? Coldn't you just build a normal --disable-shared
> --disable-dso, and use dynamic libs for system libraries? Seems like a
> lot ltess pain.

We may indeed resort to that, it's just that our first desire was for
a portable binary with absolutely *no* external library dependencies,
for all the usual reasons.

Thanks for the new information, btw!

-K


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


Re: building SVN client on HP-UX w/ --enable-all-static

Posted by Branko Čibej <br...@xbc.nu>.
kfogel@collab.net wrote:

>Branko Čibej <br...@xbc.nu> writes:
>  
>
>>The big gotcha is that it still doesn't work. Instead of not finding
>>the dynamic linker library, which it doesn't look for any more, it's
>>not finding the symbols themselves (shl_load and friends on
>>HP-UX). Those references are coming from libnsl.a, which is a system
>>library. So I think we're screwed with an all-static build on HP-UX.
>>    
>>
>
>Hrm, okay -- well, there may yet be some tricks to try, I'll see what
>I can do.
>
>Thanks for the information!
>  
>
I noticed today that there's a magic switch for 'ld' on HP-UX that tells 
it to search a particular library and ignore restrictions about 
all-static builds. So the following works -- or rather, lets the stuff 
compile:

env CC='cc -Ae -Wl,-l:libdld.sl' \
    "./configure" \
    "--prefix=/home/brane/svn/inst" \
    "--with-berkeley-db=/home/brane/svn/db4" \
    "--disable-shared" \
    "--enable-all-static" \
    "--disable-dso"

However...

$ ./subversion/clients/cmdline/svn --version
/usr/lib/dld.sl: Unresolved symbol: _SYSTEM_ID (data)  from /usr/lib/libc.2
/usr/lib/dld.sl: Unresolved module for symbol: _memset (code)  from /usr/lib/libc.2
Abort(coredump)


Is there any particular reason that the client must be 
--enable-all-static? Coldn't you just build a normal --disable-shared 
--disable-dso, and use dynamic libs for system libraries? Seems like a 
lot ltess pain.

-- Brane


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

Re: building SVN client on HP-UX w/ --enable-all-static

Posted by kf...@collab.net.
Branko Čibej <br...@xbc.nu> writes:
> You know...that's already fixed... Guess what? all you have to do is
> 
>     --enable-all-static --disable-dso
> 
> When the APR configure sees --disable-dso, it does (surprise,
> surprise!) exactly what you want.

:-)

Will the miracles never cease?

> The big gotcha is that it still doesn't work. Instead of not finding
> the dynamic linker library, which it doesn't look for any more, it's
> not finding the symbols themselves (shl_load and friends on
> HP-UX). Those references are coming from libnsl.a, which is a system
> library. So I think we're screwed with an all-static build on HP-UX.

Hrm, okay -- well, there may yet be some tricks to try, I'll see what
I can do.

Thanks for the information!

-Karl


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


Re: building SVN client on HP-UX w/ --enable-all-static

Posted by Branko Čibej <br...@xbc.nu>.
kfogel@collab.net wrote:

>Brane, any chance I could get login access to that HP-UX machine
>you've got?  (I quite understand if you can't, just thought I'd ask.)
>  
>
Sorry, no can do, but I can definitely test your patch.

>I'm trying to make Subversion not link in the dynamic loader at all in
>wholly static builds.  This would have no effect on most systems.
>Currently, static builds link in the (static version of the) dynamic
>loader and just never use it.  With this change, they wouldn't link it
>in at all.  No functional difference in the client either way.
>
>But on HP-UX, it would make a difference: apparently, there's no
>static version of the dynamic loader library there, so this change
>would make it possible, finally, to produce a completely static HP-UX
>Subversion client.
>  
>
Yup. This is how I diagnosed the problem some time ago. Not linking the 
DSO library makes perfect sense on all platforms.

>Right now, I'm just aiming to make this work in client-only builds
>from a Subversion source-release tarball.  Those have APR bundled
>inside them, so if we can just get configuration to do the following
>
>   1. Make sure APR_HAS_DSO is false
>   2. Make sure apr-config does not say "-ldl", so that SVN_APR_LIBS
>      won't contain "-ldl"
>  
>
You know...that's already fixed... Guess what? all you have to do is

    --enable-all-static --disable-dso

When the APR configure sees --disable-dso, it does (surprise, surprise!) 
exactly what you want.

>then we should be set.  Our code in ra_loader.c and fs-loader.c
>already uses APR_HAS_DSO to conditionally omit the code that actually
>calls apr_dso_load(), so if we can just get that #define right, we
>wouldn't need to alter Subversion's code.
>
>On the other hand...
>
>I feel like this is such an obvious road that people must have
>traveled down it before.  Am I missing some big gotcha?
>  
>
The big gotcha is that it still doesn't work. Instead of not finding the 
dynamic linker library, which it doesn't look for any more, it's not 
finding the symbols themselves (shl_load and friends on HP-UX). Those 
references are coming from libnsl.a, which is a system library. So I 
think we're screwed with an all-static build on HP-UX.

-- Brane


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