Hi everyone,
I'm having some trouble running with the latest clsql-mysql package because the systems complains about a couple of undefined functions. I'm running the latest cffi (i believe it's still 0.10.5).
Here's where my compilation fails:
The function CFFI-UFFI-COMPAT::FOREIGN-ENCODED-OCTET-COUNT is undefined.
[Condition of type UNDEFINED-FUNCTION]
My first attempt was to copy that function definition along with some required global variable uffi:*default-foreign-encoding* but then i get a new failure with a different function:
The function CFFI-UFFI-COMPAT::STRING-TO-OCTETS is undefined.
[Condition of type UNDEFINED-FUNCTION]
I guess i can copy the uffi definition for this function as well, but that feels like getting too hackish for my taste.
Is this something i'm doing wrong or the cffi-uffi-compat package is not fully uffi-2.0.0 compatible?
Any ideas of how i should tackle this issue?
Cheers,
Alex Paes
Hello Alexandre,
On Fri, Aug 6, 2010 at 12:27 PM, Alexandre Paes alex.paes@streetdogstudio.com wrote:
Is this something i'm doing wrong or the cffi-uffi-compat package is not fully uffi-2.0.0 compatible?
UFFI 2.0.0 is indeed more recent than the latest uffi-compat.
Any ideas of how i should tackle this issue?
You could implement the new UFFI 2.0.0 functions. That would be great.
You should be able to use what's in CFFI and Babel to do so. (For example, if UFFI 2 does provide a string-to-octets function, you should change CFFI-UFFI-COMPAT to depend on Babel and use babel:string-to-octets to implement uffi:string-to-octets.)
Cheers,
Hi Luís,
I've finally sat down and corrected the changes i had made to my cffi-uffi-compat.lisp file (basically copied/pasted the missing definitions from UFFI) and did the things you suggested
a) added a dependency on babel to the cffi-uffi-compat.asd file
b) added the foreign-encoded-octet-count function at the end of the file and added to list of exported symbols
c) added an extra key parameter (encoding) to the function convert-from-foreign-string, i believe this the parameter name was changed from locale to encoding on the new UFFI version, i could have simply replaced the locale parameter but since they aren't even being used on the function body i thought it was better to keep both and avoid breaking compatibility with other code.
Please give it a look, i know it's not much work but since i had to do it for my client's webapp here goes a small patch with my modifications. Hope this is helpful for anyone.
Cheers,
Alexandre Paes
On Sat, Aug 7, 2010 at 7:23 AM, Luís Oliveira luismbo@gmail.com wrote:
Hello Alexandre,
On Fri, Aug 6, 2010 at 12:27 PM, Alexandre Paes alex.paes@streetdogstudio.com wrote:
Is this something i'm doing wrong or the cffi-uffi-compat package is not fully uffi-2.0.0 compatible?
UFFI 2.0.0 is indeed more recent than the latest uffi-compat.
Any ideas of how i should tackle this issue?
You could implement the new UFFI 2.0.0 functions. That would be great.
You should be able to use what's in CFFI and Babel to do so. (For example, if UFFI 2 does provide a string-to-octets function, you should change CFFI-UFFI-COMPAT to depend on Babel and use babel:string-to-octets to implement uffi:string-to-octets.)
Cheers,
-- Luís Oliveira http://r42.eu/~luis/ http://r42.eu/%7Eluis/
Hello Alexandre,
On Sat, Aug 14, 2010 at 11:42 PM, Alexandre Paes alex.paes@streetdogstudio.com wrote:
Please give it a look, i know it's not much work but since i had to do it for my client's webapp here goes a small patch with my modifications. Hope this is helpful for anyone.
Thanks for your patch! I've added it to Launchpad for later review. https://bugs.launchpad.net/cffi/+bug/622434