On Wed, May 16, 2018 at 11:11:31AM +0100, Stuart Henderson wrote:
> On 2018/05/16 11:55, Reyk Floeter wrote:
> > Hi,
> > 
> > On Tue, May 15, 2018 at 11:46:45PM +0200, Reyk Floeter wrote:
> > > attached is a new port, sysutils/cloud-agent.  I wrote this tool
> > > myself and you can find it on https://github.com/reyk/cloud-agent.
> > 
> > New version of the port, with the following changes:
> > 
> > - Added expat to WANTLIB (pointed out by Rafael)
> > - Uploaded my own release tarball (pointed out by Stuart,
> > see https://www.conserver.com/pipermail/users/2018-March/msg00005.html)
> > 
> > new pkg/DESCR:
> > ---
> > This is a simple OpenBSD-specific agent that handles provisioning and
> > cloud initialization on clouds such as Microsoft Azure, Amazon AWS,
> > Apache CloudStack, or OpenStack.
> > ---
> > 
> > OK?
> > 
> > Reyk
> 
> Seems ssl isn't actually linked (I'm not sure what purpose DPADD servers
> in agent/Makefile?)  So I think WANTLIB should be "c crypto tls expat".
> 
> Otherwise OK.
> 

Well, it does link with libssl, libcrypto, and libtls.  It works
because libtls is linked against libssl and libcrypto and our linker
is smart enough to handle those inter-library dependencies.

But it doesn't work with static linking (make LDSTATIC=-static) and
LDADD should really be "LDADD+= -lexpat -ltls -lssl -lcrypto".

I will fix it in the next upstream version of cloud-agent but I think
that the current port with "WANTLIB= c tls ssl crypto expat" is fine.

Unless there are issues on non-amd64/i386 platforms?  I don't have
access to any of them at the moment.

$ grep LDADD Makefile
LDADD+=         -lexpat -ltls
$ ldd obj/cloud-agent
obj/cloud-agent:
        Start            End              Type  Open Ref GrpRef Name
        0000189a1b400000 0000189a1b60e000 exe   1    0   0      obj/cloud-agent
        0000189d01b2d000 0000189d01d58000 rlib  0    1   0      
/usr/lib/libexpat.so.12.0
        0000189c8a57e000 0000189c8a78e000 rlib  0    1   0      
/usr/lib/libtls.so.17.1
        0000189c8bb95000 0000189c8be77000 rlib  0    1   0      
/usr/lib/libc.so.92.3
        0000189c9ea0f000 0000189c9edef000 rlib  0    2   0      
/usr/lib/libcrypto.so.43.1
        0000189d0d3bd000 0000189d0d611000 rlib  0    1   0      
/usr/lib/libssl.so.45.1
        0000189d08200000 0000189d08200000 ld.so 0    1   0      
/usr/libexec/ld.so

Reyk

Reply via email to