Re: [Chicken-users] Openssl with csc -deploy

2015-05-08 Thread Peter Bex
On Thu, May 07, 2015 at 11:40:40PM -0400, Nick Van Horn wrote:
 Thanks for the reply Peter.
 
  This won't help because Spiffy has a run-time dependency on openssl,
  which it tries to load via something like this:
 
  (define ssl-port?
(handle-exceptions _ #f (eval `(let () (use ssl) ssl-port?
 
  The idea is that on Windows openssl is too painful to install, so making
  it a hard dependency is considered obnoxious.
 
 Perhaps I should have listed the extensions that I'm using, as I'm not
 in fact using Spiffy. I'm using rest-bind, http-client, oauth, and their
 dependencies for retrieving web data over a secure connection. 

Oh, sorry.  I misunderstood.  http-client _also_ has this openssl hack,
but I forgot about that so I somehow assumed you were using Spiffy.

 Trying to run the eval you supplied in my deployed application (csc
 -deploy foo.scm) leads to the error:
 
 Error: during expansion of (import ...) - module not found: openssl

Then this is probably a bug: it seems that in deploy mode, evaled code
does not use the deployment search path.  I've created a ticket to track
this bug: https://bugs.call-cc.org/ticket/1191

 What is curious is that my attempts to load the openssl module with
 `use`, `require-extension`, and the like prior to this test does *not*
 lead to this error when I run my unmodified application.

Yeah, but those use statements are evaluated at compile-time.

 In fact, the missing openssl module is only noticed downstream, when
 my original error is thrown by http-client.

I don't understand what you mean by that.

Cheers,
Peter


signature.asc
Description: Digital signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Openssl with csc -deploy

2015-05-08 Thread Nick Van Horn
 Then this is probably a bug: it seems that in deploy mode, evaled code
 does not use the deployment search path.  I've created a ticket to track
 this bug: https://bugs.call-cc.org/ticket/1191

Great---thanks for doing this. This bug has derailed my plans to deploy
this application on other machines. Hopefully the solution is simple
enough to see this fixed someday soon.

Is there any possible quick-fix to use in the meantime, so that I can
begin testing things in my deployed environment?

 Yeah, but those use statements are evaluated at compile-time.

Ah, that makes sense.

 In fact, the missing openssl module is only noticed downstream, when
 my original error is thrown by http-client.

 I don't understand what you mean by that.

I only mean that I hadn't noticed this bug until I tried a secure
connection with http-client. The other aspects of my application had
been working fine in interpreted and deployed versions of the code. This
was surprising to me until you clarified the compile-time evaluation.

Thanks again!
Nick

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Openssl with csc -deploy

2015-05-08 Thread Peter Bex
On Fri, May 08, 2015 at 11:52:06AM -0400, Nick Van Horn wrote:
  Then this is probably a bug: it seems that in deploy mode, evaled code
  does not use the deployment search path.  I've created a ticket to track
  this bug: https://bugs.call-cc.org/ticket/1191
 
 Great---thanks for doing this. This bug has derailed my plans to deploy
 this application on other machines. Hopefully the solution is simple
 enough to see this fixed someday soon.
 
 Is there any possible quick-fix to use in the meantime, so that I can
 begin testing things in my deployed environment?

Sorry, I don't think there's any hook that allows for overriding any
of this.  I don't understand this module loading code very well yet,
so perhaps one of the other core maintainers can weigh in on this.

At least in http-client there is no easy hook.  But perhaps you could
tweak the sources of http-client to make openssl a hard dependency.
Simply add (use openssl) and remove the definition of ssl-connect.

Cheers,
Peter


signature.asc
Description: Digital signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Openssl with csc -deploy

2015-05-08 Thread Evan Hanson
Hi Nick,

I've used the following commands for this. The only difference is the
third command, which copies CHICKEN's core libraries into the deployment
directory. I have a hunch as to why this makes the difference, but it's
orthogonal to your problem, so for now can you just try adding
`chicken-install -i foo` to your build process and see if this works?

$ cat foo.scm
(use http-client)
(print (call-with-input-request https://call-cc.org; #f (cut read-string 
#f )))
$ csc -deploy foo
$ chicken-install -i foo
$ chicken-install -p foo -deploy http-client openssl
$ ./foo/foo
[... response ...]

Cheers,

Evan


signature.asc
Description: Digital signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] specialized-io egg version discrepancy

2015-05-08 Thread Jeronimo Pellegrini
Hello again,

On Fri, May 08, 2015 at 06:48:48PM -0600, Matt Gushee wrote:
 In addition to shadowing the builtin write-string, this write-string causes
 a segfault when I attempt to use it within 'with-output-to-string' in csi.
 Haven't looked into it any further yet, but that doesn't seem very good.

I have just checked the basic usage of write-string...

This seems to work fine:

(use specialized-io)
(define out (open-output-file out.txt))
(write-string (with-output-to-string (lambda () (write xyz) )) out)
(close-output-port out)

After that, the file out.txt contains
xyz

Using write-one-string from the trunk version seems to also
work well.

J.

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] specialized-io egg version discrepancy

2015-05-08 Thread Matt Gushee
Hi--

I just installed the specialized-io egg, but the version available via
chicken-install does not match the documentation.

The documentation says the most recent version is 1.3, but the version I
installed, according to the .setup file, is 1.2; also, the documentation
describes a function called 'write-one-string'; the actual egg I have lacks
that, but has a 'write-string' procedure, which appears to be the same
thing.

In addition to shadowing the builtin write-string, this write-string causes
a segfault when I attempt to use it within 'with-output-to-string' in csi.
Haven't looked into it any further yet, but that doesn't seem very good.

This egg looks very useful; hope it can be brought up to date. If the
original author isn't available, I can at least take a look and see what
needs to be done. Thanks for your attention!

--
Matt Gushee
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users