Re: [racket-users] Building full racket 6.10 and up fails on Nix/MacOS

2018-02-23 Thread Claes Wallin
On Friday, February 23, 2018 at 9:52:40 PM UTC+8, Claes Wallin wrote:
>
> On Friday, February 23, 2018 at 8:50:22 PM UTC+8, Claes Wallin wrote:
>>
>> On Friday, February 23, 2018 at 8:37:17 PM UTC+8, Matthew Flatt wrote:
>>>
>>>
>>>  (define convert (bytes-open-converter "UTF-8" "UTF-16")) 
>>>  (bytes-convert convert (bytes 65 66 67 68)) 
>>>
>>> which will fail if the iconv installation doesn't recognize "UTF-8" or 
>>> "UTF-16".
>>>
>>> Ok, so (bytes-open-converter) will return #f if it receives an unknown 
>>> encoding?
>>>
>>> I guess I'll have to look at what kind of iconv library racket is being 
>>> built with.
>>>
>>
> I can confirm that my (bytes-open-converter) doesn't understand "UTF-16" 
> and returns #f. Thanks for the lead!
>

Replacing the system libiconv with GNU libiconv works! We should have a 
full racket in Nix/Darwin in few days.

-- 
   /c 

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Building full racket 6.10 and up fails on Nix/MacOS

2018-02-23 Thread Claes Wallin
On Friday, February 23, 2018 at 8:50:22 PM UTC+8, Claes Wallin wrote:
>
> On Friday, February 23, 2018 at 8:37:17 PM UTC+8, Matthew Flatt wrote:
>>
>>
>>  (define convert (bytes-open-converter "UTF-8" "UTF-16")) 
>>  (bytes-convert convert (bytes 65 66 67 68)) 
>>
>> which will fail if the iconv installation doesn't recognize "UTF-8" or 
>> "UTF-16".
>>
>> Ok, so (bytes-open-converter) will return #f if it receives an unknown 
>> encoding?
>>
>> I guess I'll have to look at what kind of iconv library racket is being 
>> built with.
>>
>
I can confirm that my (bytes-open-converter) doesn't understand "UTF-16" 
and returns #f. Thanks for the lead!

-- 
   /c 

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Building full racket 6.10 and up fails on Nix/MacOS

2018-02-23 Thread Claes Wallin
On Friday, February 23, 2018 at 8:37:17 PM UTC+8, Matthew Flatt wrote:
>
> At Thu, 22 Feb 2018 19:55:17 -0800 (PST), Claes Wallin wrote:  

> raco setup: --- summary of errors --- 
> > raco setup: error: during building docs for 
> > /racket-doc/scribblings/reference/reference.scrbl 
> > raco setup:   examples: exception raised in example 
> > raco setup: error: "bytes-convert: contract violation\n  expected: 
> > bytes-converter?\n  given: #f\n  argument position: 1st\n  other 
> > arguments...:\n   #\"ABCD\"" 
>
> Maybe you already know this, but it's probably related to iconv. That 
> part of the documentation is trying to run an example 
>

No, I don't know this. Thank you!

 (define convert (bytes-open-converter "UTF-8" "UTF-16")) 
>  (bytes-convert convert (bytes 65 66 67 68)) 
>
> which will fail if the iconv installation doesn't recognize "UTF-8" or 
> "UTF-16".
>

Ok, so (bytes-open-converter) will return #f if it receives an unknown 
encoding?

I guess I'll have to look at what kind of iconv library racket is being 
built with.

-- 
   /c

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Building full racket 6.10 and up fails on Nix/MacOS

2018-02-23 Thread Matthew Flatt
At Thu, 22 Feb 2018 19:55:17 -0800 (PST), Claes Wallin wrote:
> I have got racket-minimal 6.12 into Nix, and it builds properly on 
> aarch64-linux and on x86_64-darwin (MacOS). AArch64 probably hasn't had a 
> racket before (I haven't checked), and Nix/MacOS has been without a working 
> racket since it was bumped to 6.10 last August (which broke it because 6.10 
> needed some previously unnecessary MacOS frameworks and nobody fixed that).
> 
> However, I can't get the full racket to build, because I'm getting errors 
> when it's parsing a scribble file:
> 
> raco setup: --- summary of errors ---
> raco setup: error: during building docs for 
> /racket-doc/scribblings/reference/reference.scrbl
> raco setup:   examples: exception raised in example
> raco setup: error: "bytes-convert: contract violation\n  expected: 
> bytes-converter?\n  given: #f\n  argument position: 1st\n  other 
> arguments...:\n   #\"ABCD\""

Maybe you already know this, but it's probably related to iconv. That
part of the documentation is trying to run an example

 (define convert (bytes-open-converter "UTF-8" "UTF-16"))
 (bytes-convert convert (bytes 65 66 67 68))

which will fail if the iconv installation doesn't recognize "UTF-8" or
"UTF-16".

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Building full racket 6.10 and up fails on Nix/MacOS

2018-02-22 Thread Claes Wallin
I have got racket-minimal 6.12 into Nix, and it builds properly on 
aarch64-linux and on x86_64-darwin (MacOS). AArch64 probably hasn't had a 
racket before (I haven't checked), and Nix/MacOS has been without a working 
racket since it was bumped to 6.10 last August (which broke it because 6.10 
needed some previously unnecessary MacOS frameworks and nobody fixed that).

However, I can't get the full racket to build, because I'm getting errors 
when it's parsing a scribble file:

raco setup: --- summary of errors ---
raco setup: error: during building docs for 
/racket-doc/scribblings/reference/reference.scrbl
raco setup:   examples: exception raised in example
raco setup: error: "bytes-convert: contract violation\n  expected: 
bytes-converter?\n  given: #f\n  argument position: 1st\n  other 
arguments...:\n   #\"ABCD\""


I haven't checked whether this file is special or if it's simply the first 
file in line to break things.

Any idea what might be causing this? The lack of a stack trace makes this 
feel like a tricky thing to track down without prior knowledge of the code 
base. The racket community has obviously been able to build native DrRacket 
for MacOS (the Nix build is --enable-xonx), so we know it's possible as far 
as racket is concerned.

I'm currently testing whether 6.9 still builds and if it doesn't, I'll git 
bisect through nixpkgs to see what broke it. So let's hope it breaks. :-)

For more discussion and details, see 
https://github.com/NixOS/nixpkgs/issues/34576 .

-- 
   /c

-- 
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.
For more options, visit https://groups.google.com/d/optout.