Re: openssl static compile issue
Hi Vasilij and Peter, It looks like my linking attempt was correct, but I needed to import openssl prior to http-client first as Vasilij suspected. That is, both steps are needed. Thank you both! Nick On Tue, May 12, 2020 at 4:30 PM Vasilij Schneidermann wrote: > Hello Peter, > > I've experimented a bit and found it's a matter of shuffling the imports > around. Here's an example: > > (import scheme) > (import (chicken base)) > (import (chicken io)) > (import openssl) ; HACK: this must precede the http-client import > (import http-client) > > (with-input-from-request "https://en.wikipedia.org/wiki/Cat"; #f > read-string) > > Vasilij > -- "Eppur si muove"
Re: openssl static compile issue
Hello Peter, I've experimented a bit and found it's a matter of shuffling the imports around. Here's an example: (import scheme) (import (chicken base)) (import (chicken io)) (import openssl) ; HACK: this must precede the http-client import (import http-client) (with-input-from-request "https://en.wikipedia.org/wiki/Cat"; #f read-string) Vasilij signature.asc Description: PGP signature
Re: openssl static compile issue
On Tue, May 12, 2020 at 03:07:34PM -0400, nemo1...@gmail.com wrote: > csc -static filename.scm -L -lssl -L -lcrypto > > which removes all errors and allows the code to compile. However, when ran > the compiled code generates the following http-client egg error: > > "Unable to connect over HTTPS. To fix this, install the openssl egg and try > again." > > Can anyone advise on how to properly compile a statically linked binary > using the openssl egg? I think this is due to the fact that http-client will dynamically try to import the openssl library. This happens through eval, which means you must also explicitly link in openssl's import library, at least I *think* that's what's happening here. Please give that a try. Cheers, Peter signature.asc Description: PGP signature