[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FTGL dependency on Mac OS X (was: new snapshot?)
From: |
Ben Abbott |
Subject: |
Re: FTGL dependency on Mac OS X (was: new snapshot?) |
Date: |
Tue, 10 Feb 2009 13:30:16 -0500 |
On Tuesday, February 10, 2009, at 12:03PM, "Shai Ayal" <address@hidden> wrote:
>On Mon, Feb 9, 2009 at 10:23 PM, Jonathan Stickel <address@hidden> wrote:
>> Shai Ayal wrote:
>>>
>>> On Mon, Feb 9, 2009 at 8:25 PM, Jonathan Stickel <address@hidden>
>>> wrote:
>>>>
>>>> John W. Eaton wrote:
>>>>>
>>>>> On 9-Feb-2009, Jonathan Stickel wrote:
>>>>>
>>>>> | On 2/6/09 address@hidden wrote:
>>>>> | > +. Graphics:
>>>>> | > + Refactor base_properties
>>>>> | > + Specific types for properties with improved property value
>>>>> | > checking
>>>>> | > + Implement the addprops function allow additional properties
>>>>> | > to objects
>>>>> | > + add the hggroup object that has no fixed properties for use
>>>>> | > by barseries, etc.
>>>>> | > + Add callback DeleteFcn/CreateFcn to objects
>>>>> | > + Allow listener functions to be added to objects
>>>>> | > + Clean separation of backend from property database
>>>>> | > + Implement experimental backend based on OpenGL and GUI
>>>>> | > toolkit
>>>>> | | I have been interested for some time now to hack around with the new
>>>>> | OpenGL backend. However, the FTGL text dependency was not detected |
>>>>> properly on my Mac (OS X 10.4.11). After a recent mercurial update, |
>>>>> this
>>>>> problem still exists:
>>>>> | | configure: WARNING: "FTGL library not found. Native renderer will
>>>>> not
>>>>> | have on-screen text"
>>>>> | configure: WARNING:
>>>>> | configure: WARNING: I didn't find the necessary libraries to compile
>>>>> native
>>>>> | configure: WARNING: graphics. It isn't necessary to have native
>>>>> graphics
>>>>> | configure: WARNING: but you will have to use gnuplot or you won't be
>>>>> able
>>>>> | configure: WARNING: to use any of Octave's plotting commands
>>>>> | configure: WARNING:
>>>>> | | I do have ftgl-2.1.2 installed via Macports. Anyway, it would be
>>>>> nice
>>>>> | if this could be resolved before the next snapshot. I remember quite
>>>>> a |
>>>>> long thread about this problem some time ago, but I don't remember what
>>>>> |
>>>>> the conclusion was. I am willing to help debug if someone can suggest |
>>>>> something for me to try.
>>>>>
>>>>> It's unlikely to be resolved unless it's reported, and this is the
>>>>> first I'ver heard of the problem in quite some time as I thought we
>>>>> fixed it.
>>>>>
>>>>> You could start by showing the relevant part of config.log, so we
>>>>> could see why the test fails.
>>>>>
>>>>> As I recall, I used to have to add
>>>>>
>>>>> -I/usr/include/freetype2
>>>>>
>>>>> to CPPFLAGS on my system when running configure, but I think we fixed
>>>>> that problem as it no longer seems to be required.
>>>>>
>>>> Here is what seems to be the FTGL test in config.log:
>>>>
>>>> configure:12370: checking FTGL/ftgl.h usability
>>>> configure:12387: g++ -c -I/usr/local/include -I/opt/local/include
>>>> -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include
>>>> -I/opt/local/include/freetype2 -I/opt/local/include conftest.cpp >&5
>>>> configure:12394: $? = 0
>>>> configure:12408: result: yes
>>>> configure:12412: checking FTGL/ftgl.h presence
>>>> configure:12427: g++ -E -I/opt/local/include
>>>> -I/opt/local/include/freetype2
>>>> -I/opt/local/include conftest.cpp
>>>> configure:12434: $? = 0
>>>> configure:12448: result: yes
>>>> configure:12476: checking for FTGL/ftgl.h
>>>> configure:12485: result: yes
>>>> configure:12659: checking for FTGLTextureFont in -lftgl
>>>> configure:12699: g++ -o conftest -I/usr/local/include
>>>> -I/opt/local/include
>>>> -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include
>>>> -I/opt/local/include/freetype2 -I/opt/local/include -L/usr/local/lib
>>>> -L/opt/local/lib -lmetis conftest.cpp -lhdf5 -lz -lm -Wl,-framework
>>>> -Wl,Carbon -L/usr/X11R6/lib -lGL -lGLU -L/opt/local/lib -lfreetype -lz
>>>> -Wl,-framework,CoreServices -Wl,-framework,ApplicationServices -lftgl >&5
>>>> conftest.cpp: In function 'int main()':
>>>> conftest.cpp:81: error: 'FTGLTextureFont' was not declared in this scope
>>>> conftest.cpp:81: error: expected `;' before 'font'
>>>> configure:12706: $? = 1
>>>> configure: failed program was:
>>>> | /* confdefs.h. */
>>
>> <snip>
>>>>
>>>> | }
>>>> configure:12731: result: no
>>>>
>>>>
>>> It looks like you have HAVE_FTGL_FTGL_H but not HAVE_FTGL_UPPERCASE,
>>> so only FTGL/ftgl.h gets included, and not any header with the
>>> FTGLTextureFont.
>>>
>>> can you please post the output of
>>> grep FTGLTextureFont /usr/include/FTGL/*
>>>
>>> (assuming the normal include sir is /usr/include)
>>>
>>
>> Sure. Here is what I get:
>>
>> $ cd /opt/local/include/FTGL/
>> $ grep FTGLTextureFont *
>> FTGLTextureFont.h:#ifndef __FTGLTextureFont__
>> FTGLTextureFont.h:#define __FTGLTextureFont__
>> FTGLTextureFont.h: * FTGLTextureFont is a specialisation of the FTFont class
>> for handling
>> FTGLTextureFont.h:class FTGL_EXPORT FTGLTextureFont : public FTFont
>> FTGLTextureFont.h: FTGLTextureFont( const char* fontFilePath);
>> FTGLTextureFont.h: FTGLTextureFont( const unsigned char
>> *pBufferBytes, size_t bufferSizeInBytes);
>> FTGLTextureFont.h: virtual ~FTGLTextureFont();
>> FTGLTextureFont.h:#endif // __FTGLTextureFont__
>>
>> Thanks,
>> Jonathan
>>
>
>Does the attached changeset help?
>It's an "empirical" patch in the sense that I do not really understand
>all of the cases in this #ifdef, but should do the right thing for
>Jonathan
>
>Shai
>
Nice catch Shai. If I bothered to look at the if statements the problem would
have been clear.
You did have one problem with the change. The first endif should not be removed.
Currently, in configure.in I have
707 #ifdef HAVE_FTGL_FTGL_H
708 #ifdef HAVE_FTGL_UPPERCASE
709 #include <FTGL/FTGL.h>
710 #include <FTGL/FTGLTextureFont.h>
711 #else
712 #include <FTGL/ftgl.h>
713 #include <FTGL/FTGLTextureFont.h>
714 #endif
715 #elif HAVE_FTGL_H
716 #ifdef HAVE_FTGL_UPPERCASE
717 #include <FTGL.h>
718 #include <FTGLTextureFont.h>
719 #else
720 #include <ftgl.h>
721 #endif
722 #endif], [
Previously it was
707 #ifdef HAVE_FTGL_FTGL_H
708 #ifdef HAVE_FTGL_UPPERCASE
709 #include <FTGL/FTGL.h>
710 #include <FTGL/FTGLTextureFont.h>
711 #else
712 #include <FTGL/ftgl.h>
713 #endif
714 #elif HAVE_FTGL_H
715 #ifdef HAVE_FTGL_UPPERCASE
716 #include <FTGL.h>
717 #include <FTGLTextureFont.h>
718 #else
719 #include <ftgl.h>
720 #endif
721 #endif], [
Which means FTGLTextureFont.h was not included for me. I notice there is some
possibility for the same problem at line 719. Would a better solution be ...
707 #ifdef HAVE_FTGL_FTGL_H
708 #ifdef HAVE_FTGL_UPPERCASE
709 #include <FTGL/FTGL.h>
710 #else
711 #include <FTGL/ftgl.h>
712 #endif
713 #include <FTGL/FTGLTextureFont.h>
714 #elif HAVE_FTGL_H
715 #ifdef HAVE_FTGL_UPPERCASE
716 #include <FTGL.h>
717 #else
716 #include <ftgl.h>
719 #endif
720 #include <FTGLTextureFont.h>
721 #endif], [
Ben
- Re: FTGL dependency on Mac OS X (was: new snapshot?),
Ben Abbott <=