Coder Social home page Coder Social logo

Comments (10)

rpav avatar rpav commented on June 3, 2024

Have you tried putting this in the same directory as SBCL? I think this is what I had to do.

from cl-cairo2.

ezrarush avatar ezrarush commented on June 3, 2024

thank you for replying. Your comment helped me figure out why I was having so much trouble.

It was misleading error messages form cffi:load-foreign-library-error. You see if I correctly load the first DLL in a series of required DLLs but the second DLL gives an error; cffi's error displays the first dll as the malfunctioning DLL.

example: cl-cairo need libcairo-2.dll, libfontconfig-1.dll.
If 64-bit libcairo-2.dll is correct and loads but libfontconfig-1.dll is not correct (maybe because it is 32-bit) it still gives the following error message

Unable to load foreign library (LIBCAIRO).
  Error opening shared object "libcairo-2.dll":
 %1 is not a valid Win32 application.
   [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]

Also slime does not display windows pop-up error messages but SBCL console does.

edit: cl-cairo2 loads using a 64-bit SBCL with 64-bit DLLs on 64-bit Windows 8.1 just fine no problems.
http://win32builder.gnome.org/gtk+-bundle_3.10.4-20131202_win64.zip contains the complete set of correct DLLs.

from cl-cairo2.

rpav avatar rpav commented on June 3, 2024

Yeah this is more of an SBCL/CFFI/Windows issue, but saying such doesn't really solve the problem. Unfortunately I have also heard reports of issues with 32-bit Cairo (and SBCL?) as well. You may want to try CCL; I think the Windows support is a bit more active there. I've also had fewer issues with foreign code in CCL recently.

from cl-cairo2.

ezrarush avatar ezrarush commented on June 3, 2024

I will report back if this issue is still active later with my progress. I wish to make lisp programs that run on 64-bit windows 8 even if the lisp program is itself 32-bit so these issues are important to me

from cl-cairo2.

ezrarush avatar ezrarush commented on June 3, 2024

To install the 32-bit cairo DLLs please use this official tutorial (cairo is now part of gtk+)

http://www.gtk.org/download/win32_tutorial.php

from cl-cairo2.

rpav avatar rpav commented on June 3, 2024

I will check this out; have you tried with CCL and 64-bit cairo?

For 32-bit, I would expect a complete set of 32-bit libraries would be required. However I don't like the fact that 64-bit doesn't work. I'll look into it next time I get a chance to boot over and do some work there.

from cl-cairo2.

ezrarush avatar ezrarush commented on June 3, 2024

my opinion is that gtk+ made a mistake in one of their 64-bit DLLs (namely libpng14-14.dll) and this is not cl-cairo2's fault.

Also my opinion is that if the lisp image is 64-bit cffi demands that every foreign function be 64-bit and will not handle any 32-bit DLLs or WoW64. this is not cl-cairo2's fault unless there is some config i missed.

from cl-cairo2.

rpav avatar rpav commented on June 3, 2024

WRT 64-bit vs 32-bit, this is almost certainly the case. I recall back in the 32/16-bit days, there were ways to making "thunking" calls into 16-bit code from 32-bit; this required special handling and was pretty painful. I'm pretty sure you can't call 32-bit code from 64 from what I know of the ABI.

As for the broken DLL, if I can confirm this I'll file a bug report or similar and see if we can get a fixed version.

from cl-cairo2.

ezrarush avatar ezrarush commented on June 3, 2024

I was wrong about gtk.org having bad DLLs. My SBCL wasn't loading libpng14-14.dll for some reason I cannot explain.

http://www.gtk.org/download/win64.php has working DLLs but not all that are required for cl-cairo2 (the link is missing liblzma-5.dll)

http://win32builder.gnome.org/gtk+-bundle_3.10.4-20131202_win64.zip has all the DLLs necessary to load cl-cairo2

as for cffi running on a 64-bit lisp image not being able to handle wow64 32-bit DLLS, i guess i can understand.

from cl-cairo2.

ezrarush avatar ezrarush commented on June 3, 2024

Thank you for helping me. I have installed SBCL 1.2.1 AMD64 and quickloaded cl-cairo2.

There is nothing wrong with the DLLs on http://www.gtk.org/download/win64.php I have compiled a 64-bit c language cairo2 windows executable using mingw-w64 and it uses the DLLs just fine. I was wrong and I do not know why my SBCL 1.1.8 AMD64 couldn't load cl-cairo2 with missing DLL errors.

If anyone needs the complete set of DLLs (both 32 and 64 bit) to run cl-cairo2 on windows please download them form this link http://win32builder.gnome.org/

from cl-cairo2.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.