Re: [racket-users] M1 Mac exe SSL error

2021-10-22 Thread Mike Engelhart
Hi Matthew

Thanks for the fast reply!   Well I have to apologize - I had skipped the
"dist" step.  For some reason I assumed incorrectly the dist was if you
were building for another OS vs hardware architecture.  I ran your test as
well and it worked perfectly.  Thanks again!

Mike




On Fri, Oct 22, 2021 at 6:02 PM Matthew Flatt  wrote:

> At Fri, 22 Oct 2021 17:24:30 -0400, Mike Engelhart wrote:
> > I wanted to build a binary to send to a colleague to test it (who
> > isn't a programmer and doesn't have Racket installed) but when I
> > build it on my intel Macbook Pro and then send it to my M1 iMac
>
> That should work.
>
> I tried this small experiment:
>
>  ;; ssl.rkt
>   #lang racket/base
>   (require openssl)
>
>   (define-values (i o) (ssl-connect "www.cs.utah.edu" 443))
>   'done
>
> With that "ssl.rkt":
>
>  $ raco exe ssl.rkt
>  $ raco dist ssl-dist ssl
>  $ tar zcf ssl-dist.tgz ssl-dist
>
>  ... copy ssl-dist.tgz to an M1,
>  then on that machine ...
>
>  $ tar zxf ssl-dist.tgz
>  $ ./ssl-dist/bin/ssl
>
> and that much seemed to work.
>
> Does the little "ssl.rkt" program above work for you? If not, which
> version of Racket are you using? Also, just to make sure, are you
> creating a distribution to move to the other machine, as opposed to
> just an executable file?
>
>
> Matthew
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAGE%3DCnJMpuOcRpvqFhUC969HPXZ86vW8j3z3fg63DqwOnCGW7g%40mail.gmail.com.


Re: [racket-users] M1 Mac exe SSL error

2021-10-22 Thread Matthew Flatt
At Fri, 22 Oct 2021 17:24:30 -0400, Mike Engelhart wrote:
> I wanted to build a binary to send to a colleague to test it (who
> isn't a programmer and doesn't have Racket installed) but when I
> build it on my intel Macbook Pro and then send it to my M1 iMac

That should work.

I tried this small experiment:

 ;; ssl.rkt
  #lang racket/base
  (require openssl)

  (define-values (i o) (ssl-connect "www.cs.utah.edu" 443))
  'done

With that "ssl.rkt":

 $ raco exe ssl.rkt
 $ raco dist ssl-dist ssl
 $ tar zcf ssl-dist.tgz ssl-dist
 
 ... copy ssl-dist.tgz to an M1,
 then on that machine ...

 $ tar zxf ssl-dist.tgz
 $ ./ssl-dist/bin/ssl

and that much seemed to work.

Does the little "ssl.rkt" program above work for you? If not, which
version of Racket are you using? Also, just to make sure, are you
creating a distribution to move to the other machine, as opposed to
just an executable file?


Matthew

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20211022160205.234%40sirmail.smtps.cs.utah.edu.


[racket-users] M1 Mac exe SSL error

2021-10-22 Thread Mike Engelhart
Hi all

I'm new to Racket so this may be explained somewhere although searching the
web I couldn't find anything related to this.

I'm working on my first real project in Racket and it leverages http-easy
to do some simple API calls and processes the responses.   I wanted to
build a binary to send to a colleague to test it (who isn't a programmer
and doesn't have Racket installed) but when I build it on my intel Macbook
Pro and then send it to my M1 iMac and try and run it I get this error:

ssl-make-client-context: requested protocol not supported;

 SSL not available; check `ssl-load-fail-reason'

  requested: 'auto

  context...:

   .../openssl/mzssl.rkt:672:0: encrypt->method

   .../openssl/mzssl.rkt:747:0: make-raw-context

   .../openssl/mzssl.rkt:736:0: make-context

   .../openssl/mzssl.rkt:764:0: ssl-make-client-context

   .../openssl/mzssl.rkt:1061:0: ssl-secure-client-context

   .../private/arrow-val-first.rkt:486:18

   .../private/session.rkt:40:0: make-session

   body of '#%embedded:net/http-easy:

My thought on building it with my Intel mac is that by doing that it would
ensure that the M1 macs that my colleague also has it would use Rosetta 2
to run the code.

So my question is, is there a way to build a universal binary for Mac OS or
should I just build one on each platform and have separate binaries.

Thanks for any help.

Mike

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAGE%3DCnL3CvcTtiCdKaYUetVMGCcDJS6V435CSKiruJWOM8%3DHxA%40mail.gmail.com.