Re: [Chicken-users] EOF problem

2010-12-08 Thread Felix
From: Peter Bex 
Subject: Re: [Chicken-users] EOF problem
Date: Tue, 7 Dec 2010 22:30:27 +0100

> On Tue, Dec 07, 2010 at 04:18:49PM -0500, David Dreisigmeyer wrote:
>> Thank you Alan and Peter - that took care of it.
>> 
>> csc is also complaining about, e.g., int32_t , uint , uint64_t ,
>> __attribute__ and
>> 
>> #define CL_API_SUFFIX__VERSION_1_0   
>> AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
> 
> The problem with int32_t and such might be caused by the fact you don't
> have the #include in the foreign-parse block so it doesn't see the
> definitions in order to be able to convert the int32_t to its real type.
> 
> About __attribute__: perhaps the easyffi egg's C parser can't handle that?
> 

No, I don't think so. And bind neither, but I can look into that at
some stage.


cheers,
felix

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


Re: [Chicken-users] EOF problem

2010-12-07 Thread Peter Bex
On Tue, Dec 07, 2010 at 04:18:49PM -0500, David Dreisigmeyer wrote:
> Thank you Alan and Peter - that took care of it.
> 
> csc is also complaining about, e.g., int32_t , uint , uint64_t ,
> __attribute__ and
> 
> #define CL_API_SUFFIX__VERSION_1_0   AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER

The problem with int32_t and such might be caused by the fact you don't
have the #include in the foreign-parse block so it doesn't see the
definitions in order to be able to convert the int32_t to its real type.

About __attribute__: perhaps the easyffi egg's C parser can't handle that?

You could try manually wrapping up the binding through the FFI.
Also, AFAIK easyffi is now deprecated in favor of the "bind" egg.
Possibly its parser is capable of parsing this.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
-- Donald Knuth

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


Re: [Chicken-users] EOF problem

2010-12-07 Thread David Dreisigmeyer
Thank you Alan and Peter - that took care of it.

csc is also complaining about, e.g., int32_t , uint , uint64_t ,
__attribute__ and

#define CL_API_SUFFIX__VERSION_1_0   AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER

If I change, e.g., int32_t to int, uint64_t to unsigned long int
things work out -- not sure if this is a good idea though.  I don't
know how to get the __attribute__ or above #define to work though.

On Tue, Dec 7, 2010 at 3:22 PM, Peter Bex  wrote:
> On Tue, Dec 07, 2010 at 03:15:32PM -0500, David Dreisigmeyer wrote:
>> I'm getting the following error for the attached cl.scm file (OpenCL
>> 1.0 on OS X 10.6):
>>
>> $ csc -s -o cl.so cl.scm -framework OpenCL -framework Accelerate
>> Warning: (line 205) unterminated here-doc string literal `EOF'
>> Error: (line 205) unterminated list, starting in line 19
>> Error: shell command terminated with non-zero exit status 17920:
>> /usr/local/bin/chicken-4.6.0 cl.scm -output-file cl.c -dynamic
>> -feature chicken-compile-shared
>>
>> I was trying to follow the gl.scm (in the opengl egg) file as much as 
>> possible.
>
> Your code is correct, except that the EOF for the heredoc should be
> at the start of a line, and it must be on a line all by itself.
> In your code it has leading whitespace.
>
> Cheers,
> Peter
> --
> http://sjamaan.ath.cx
> --
> "The process of preparing programs for a digital computer
>  is especially attractive, not only because it can be economically
>  and scientifically rewarding, but also because it can be an aesthetic
>  experience much like composing poetry or music."
>                                                        -- Donald Knuth
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/chicken-users
>

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


Re: [Chicken-users] EOF problem

2010-12-07 Thread Peter Bex
On Tue, Dec 07, 2010 at 03:15:32PM -0500, David Dreisigmeyer wrote:
> I'm getting the following error for the attached cl.scm file (OpenCL
> 1.0 on OS X 10.6):
> 
> $ csc -s -o cl.so cl.scm -framework OpenCL -framework Accelerate
> Warning: (line 205) unterminated here-doc string literal `EOF'
> Error: (line 205) unterminated list, starting in line 19
> Error: shell command terminated with non-zero exit status 17920:
> /usr/local/bin/chicken-4.6.0 cl.scm -output-file cl.c -dynamic
> -feature chicken-compile-shared
> 
> I was trying to follow the gl.scm (in the opengl egg) file as much as 
> possible.

Your code is correct, except that the EOF for the heredoc should be
at the start of a line, and it must be on a line all by itself.
In your code it has leading whitespace.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
-- Donald Knuth

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


Re: [Chicken-users] EOF problem

2010-12-07 Thread Alan Post
On Tue, Dec 07, 2010 at 03:15:32PM -0500, David Dreisigmeyer wrote:
> I'm getting the following error for the attached cl.scm file (OpenCL
> 1.0 on OS X 10.6):
> 
> $ csc -s -o cl.so cl.scm -framework OpenCL -framework Accelerate
> Warning: (line 205) unterminated here-doc string literal `EOF'
> Error: (line 205) unterminated list, starting in line 19
> Error: shell command terminated with non-zero exit status 17920:
> /usr/local/bin/chicken-4.6.0 cl.scm -output-file cl.c -dynamic
> -feature chicken-compile-shared
> 
> I was trying to follow the gl.scm (in the opengl egg) file as much as 
> possible.
> 
> Thank you,
> 
> -Dave

Will you try removing the spaces in front of the 'EOF' and see if
that fixes the problem?

-Alan
-- 
.i ko djuno fi le do sevzi

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


[Chicken-users] EOF problem

2010-12-07 Thread David Dreisigmeyer
I'm getting the following error for the attached cl.scm file (OpenCL
1.0 on OS X 10.6):

$ csc -s -o cl.so cl.scm -framework OpenCL -framework Accelerate
Warning: (line 205) unterminated here-doc string literal `EOF'
Error: (line 205) unterminated list, starting in line 19
Error: shell command terminated with non-zero exit status 17920:
/usr/local/bin/chicken-4.6.0 cl.scm -output-file cl.c -dynamic
-feature chicken-compile-shared

I was trying to follow the gl.scm (in the opengl egg) file as much as possible.

Thank you,

-Dave

P.S. If you're using emacs, cl.scm looks best in c-mode.


cl.scm
Description: Binary data
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users