3b/cl-opengl

font not found

npatrick04 opened this issue · 2 comments

I'm not sure that this problem is directly a problem with cl-opengl, but that's where it's getting exhibited. I'm using SBCL save-lisp-and-die to create an executable which uses cl-opengl including glut fonts. The graphics are working find in the executable, but glut:bitmap-character with glut:+bitmap-9-by-15+ is not succeeding. After going through the source a bit, it appears that this should be a pointer to a font structure in the libglut.so library. It seems like the library is not being completely loaded, or the pointer is not valid once the binary is reloaded, perhaps because the pointer is different.

Regardless, I'm able to use the font just fine when running at the REPL, but the executable keeps reporting "freeglut (SBCL): font 0xb741db40 not found".

3b commented

Yeah, the pointer probably changes on every load on systems with ASLR.
Pushed something that might fix it, let me know if that works better.

That did the trick. Thanks!