On Tue, Dec 22, 2009 at 2:15 AM, Luís Oliveira <span dir="ltr"><<a href="mailto:luismbo@gmail.com">luismbo@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tue, Dec 22, 2009 at 6:56 AM, Elliott Slaughter<br>
<<a href="mailto:elliottslaughter@gmail.com">elliottslaughter@gmail.com</a>> wrote:<br>
> After what feels like beating my head against a wall for several hours, and<br>
> getting contradictory results from various attempts to boils the failure<br>
> down to a manageable size, I finally tried my original build recipe again,<br>
> and it just worked. I'm not really sure what to say, other than that I'm<br>
> really confused. I don't think the workarounds suggested by myself and<br>
> others are necessary, so I think we can all forget about this, at least<br>
> until this comes to haunt me again.<br>
<br>
</div>This is something that definitely needs to be improved in CFFI, at<br>
least documentation-wise. Care to share your build recipe for dealing<br>
with foreign libraries?</blockquote></div><br>Well, there's not really much to it, at least when it works. Basically, I just<div><br></div><div>(asdf:oos 'asdf:load-op *some-system*)</div><div><br></div><div>which presumably has a dependency on lispbuilder or cl-opengl or something else that depends on a foreign library. After than, just save the executable,</div>
<div><br></div><div>#+sbcl (sb-ext:save-lisp-and-die #-windows "main" #+windows "main.exe" :toplevel #'main :executable t)<br clear="all"><br></div><div>The only platform where I typically have this not work is on SBCL/Windows. I do have a little piece of initialization code to reload any foreign libraries, but obviously that didn't help me this last time. Sometimes I also put the dlls in the current directory, but again, I'm not sure whether that actually helps or not.</div>
<div><br></div><div>Other than that, I've just got a makefile which builds installers for Windows, .app files for Mac, and tarballs for Linux.</div><div><br></div><div>Anyway, if you are interested in looking at the entire script, see:</div>
<div><br></div><div><a href="http://blackthorn-engine.googlecode.com/hg/dist.lisp">http://blackthorn-engine.googlecode.com/hg/dist.lisp</a></div><div><br></div><div>and the makefile (particularly the dist and install-* targets):</div>
<div><br></div><div><a href="http://blackthorn-engine.googlecode.com/hg/Makefile">http://blackthorn-engine.googlecode.com/hg/Makefile</a></div><div><br></div><div>Hope that helps.</div><div><br>-- <br>Elliott Slaughter<br>
<br>"Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay<br>
</div>