[cello-devel] Trying to get Cello working on FreeBSD(ACL)

Kenny Tilton ktilton at nyc.rr.com
Sun Apr 25 16:50:57 UTC 2004



oyvin-cello at oyvins.net wrote:

>On Fri, Apr 23, 2004 at 11:00:08AM -0400, Kenny Tilton wrote:
>  
>
>>oyvin-cello at oyvins.net wrote:
>>    
>>
>>>| /usr/home/oyvin/programmering/lisp/cello/dvl/dynlib/libglut.so.
>>>| glut state 2 0
>>>| "about to initialize" 
>>>| "glut initialised"freeglut font 0x00000003 not found
>>>| 
>>>
>>>and the lisp quits.
>>>
>>>      
>>>
>>First, the "lisp quits" problem: That error comes from Freeglut, and I 
>>think it does an exit which Lisp cannot intercept. If this becomes a 
>>problem, we will have to talk to the FG people about changing that, or 
>>just fork FreeGlut.
>>
>>As for the font, that translates to glut_bitmap_8_by_13. But I see it is 
>>the first font attempted by the lesson-14 demo, so I do not know whether 
>>it is just a problem with that font on that version of Freeglut or 
>>whether none of the fonts will work. You might try put 
>>GLUT_BITMAP_HELVETICA_12 first.
>>    
>>
>
>Same error (though font 0x00000007). Same seems to happen with any font#.
>
>  
>
>>Or really track the problem down: look 
>>for a definition of  fgFontFixed8x13 in freeglut_font_data.c Should be 
>>there and look like this:
>>
>> const SFG_Font fgFontFixed8x13 = { 
>>"-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1", 93, 13, 
>>Fixed8x13_Character_Map, -1.0f, 2.0f };
>>    
>>
>
>I'ts there. The required (bitmap) fonts are available for other X programs,
>so the fontpath should be set correctly. Is it possible to do some debugging
>on which fonts freeglut finds at all?
>
(1) Freeglut actually hardcodes in certain fonts, so it does not have to 
find anything. But of course that makes for a very limited font 
capability, which is why I use FTGL.

(2) I just realized that that error happens if the value (3, 7) is not 
one of the predefined values:

/*
 * Matches a font ID with a SFG_Font structure pointer.
 * This was changed to match the GLUT header style.
 */
static SFG_Font* fghFontByID( void* font )
{
  /*
   * Try matching the font ID and the font data structure
   */
  if( font == GLUT_BITMAP_8_BY_13        ) return( &fgFontFixed8x13    );
  if( font == GLUT_BITMAP_9_BY_15        ) return( &fgFontFixed9x15    );
  if( font == GLUT_BITMAP_HELVETICA_10   ) return( &fgFontHelvetica10  );
  if( font == GLUT_BITMAP_HELVETICA_12   ) return( &fgFontHelvetica12  );
  if( font == GLUT_BITMAP_HELVETICA_18   ) return( &fgFontHelvetica18  );
  if( font == GLUT_BITMAP_TIMES_ROMAN_10 ) return( &fgFontTimesRoman10 );
  if( font == GLUT_BITMAP_TIMES_ROMAN_24 ) return( &fgFontTimesRoman24 );

  /*
   * This probably is the library user's fault
   */
  fgError( "font 0x%08x not found", font );

  return 0;
}

ie, it must be falling through that sequence. But the error /says/ "3" 
or "7" (in hex) which are valid, so I am wondering what code you have 
for this function in your version, and what version of Freeglut you 
have. I am running FG 1.3, which is about the latest. They have been 
doing a lot of work on Freeglut since getting picked up last year by RedHat.

Finally (3), I hate to suggest this, but the Cello demos do not use Glut 
fonts. If the problem is specific to the glut fonts, you might get away 
with skipping lesson-14 and trying the rest of the build. Then if that 
does not work we come back to this and see if there is just some huge 
FFI issue that is wrong.

kenny

-- 
Home? http://tilton-technology.com
Cells? http://www.common-lisp.net/project/cells/
Cello? http://www.common-lisp.net/project/cello/
Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film 
Your Project Here! http://alu.cliki.net/Industry%20Application






More information about the cello-devel mailing list