Compiling on Leopard & Snow Leopard

View: New views
10 Messages — Rating Filter:   Alert me  

Compiling on Leopard & Snow Leopard

by Scott F. Comstock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Has anyone had luck compiling Cryptlib (static or dynamic) on Leopard or
Snow Leopard?


-Scott


_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.

Parent Message unknown Fwd: Compiling on Leopard & Snow Leopard

by Andy Gocke-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I can make it compile, however I get a trap during the tests. I can post the fixes for debugging (there's at least one define that needs to be changed), but I think some more in depth work will have to be done to fix it for snow leopard. Static compilation doesn't work on leopard, but dynamic does.

Andy Gocke


On Sep 13, 2009, at 9:45 AM, Scott F. Comstock wrote:

Has anyone had luck compiling Cryptlib (static or dynamic) on Leopard or Snow Leopard?


-Scott


_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.



_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.

Re: Compiling on Leopard & Snow Leopard

by Peter Gutmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"Scott F. Comstock" <scott@...> writes:

>Has anyone had luck compiling Cryptlib (static or dynamic) on Leopard or Snow
>Leopard?

I build it on... hmm, I can't get to the machine at the moment so I can't
check the version but I'm pretty sure it's 10.5.  If someone can give me SSH
access to a 10.6 box I'll get it running on that.

(There was an incorrect define in the last release in osconfig.h for B_ENDIAN,
but apart from that it should build OK, at least on non-10.6).

Peter.

_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.

Re: Compiling on Leopard & Snow Leopard

by Axel Rau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Am 13.09.2009 um 16:45 schrieb Scott F. Comstock:

> Has anyone had luck compiling Cryptlib (static or dynamic) on  
> Leopard or Snow Leopard?
3.3.2 compiled out of the box last April on 10.5 i386 (recent version  
of 10.5 at that time).
Build log available on request.
Test completed with:
---
All tests concluded successfully.
___

Axel


_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.

Re: Compiling on Leopard & Snow Leopard

by Miller, Timothy J. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sep 13, 2009, at 9:45 AM, Scott F. Comstock wrote:

> Has anyone had luck compiling Cryptlib (static or dynamic) on  
> Leopard or
> Snow Leopard?

Not yet.  I toyed with this for an hour or so over the weekend, but  
don't have a working version yet (though it's compiling now, so that's  
progress :). So far:

crypt/osconfig.h has a second "#define B_ENDIAN" after the #if/#else  
for __ppc__ which kind of moots the point of the attempted detection.

Also, it appears that SL needs a Darwin linking rule in getlibs.sh to  
link to libresolv.

That's as far as I got before real life intervened (read: I went to  
the art museum).

-- Tim




_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.

smime.p7s (3K) Download Attachment

Re: Compiling on Leopard & Snow Leopard

by Miller, Timothy J. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sep 14, 2009, at 12:37 AM, Peter Gutmann wrote:

> I build it on... hmm, I can't get to the machine at the moment so I  
> can't
> check the version but I'm pretty sure it's 10.5.  If someone can  
> give me SSH
> access to a 10.6 box I'll get it running on that.

> (There was an incorrect define in the last release in osconfig.h for  
> B_ENDIAN,
> but apart from that it should build OK, at least on non-10.6).

I can't give you access, but here's what I get:

stovetop:cryptlib-3.3.3 tmiller$ make testlib
Undefined symbols:
   "_res_9_dn_skipname", referenced from:
       _findHostInfo in libcl.a(dns_srv.o)
       _findHostInfo in libcl.a(dns_srv.o)
       _findHostInfo in libcl.a(dns_srv.o)
   "_res_9_query", referenced from:
       _findHostInfo in libcl.a(dns_srv.o)
   "_res_9_dn_expand", referenced from:
       _findHostInfo in libcl.a(dns_srv.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [testlib] Error 1

Adding a Darwin stanza to getlibs.sh with -lresolv didn't seem to  
work, but I could be mistaken on how your build system hangs together.

-- Tim




_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.

smime.p7s (3K) Download Attachment

Re: Compiling on Leopard & Snow Leopard

by Peter Gutmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"Miller, Timothy J." <tmiller@...> writes:

>I can't give you access, but here's what I get:
>
>stovetop:cryptlib-3.3.3 tmiller$ make testlib
>Undefined symbols:

Ah, that's an easy one, to fix it just undefine USE_DNSSRV in misc/config.h.

Peter.

_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.

Re: Compiling on Leopard & Snow Leopard

by Miller, Timothy J. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Peter Gutmann wrote:
>> stovetop:cryptlib-3.3.3 tmiller$ make testlib
>> Undefined symbols:

> Ah, that's an easy one, to fix it just undefine USE_DNSSRV in misc/config.h.

Okay, now I get:

stovetop:cryptlib-3.3.3 tmiller$ make testlib
stovetop:cryptlib-3.3.3 tmiller$ ./testlib
Trace/BPT trap

This is with a debug build.

-- Tim


_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.

smime.p7s (4K) Download Attachment

Parent Message unknown Re: Compiling on Leopard & Snow Leopard

by Peter Gutmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

So a preliminary update, the problem is due to a SIGTRAP in dlopen(), an
(apparent) bug introduced in Snow Leopard.  Others have found this as well,
see e.g. http://openradar.appspot.com/7209349.

Peter.

_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.

Parent Message unknown Re: Compiling on Leopard & Snow Leopard

by Peter Gutmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It's definitely a bug in dlopen() in OS X 10.6.  To work around this, at line
41 (or thereabouts) of cryptlib.c, add:

#undef USE_THREADS

and rebuild.  This will disable the use of dlopen() from a worker thread.

Peter.

_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.