[gtkada] Configure doesn't find openGL
Pascal
p.p14 at orange.fr
Sun Sep 4 11:55:12 CEST 2016
Hello Roger,
You're right.
Well, I forgot the modifications I did, see attached diff file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gtkada-3.8.2-src-x.diff
Type: application/octet-stream
Size: 7307 bytes
Desc: not available
URL: </pipermail/gtkada/attachments/20160904/9b494c4c/attachment-0001.obj>
-------------- next part --------------
It was done for GTKAda 3.8.2.
Not all modifications are related with OpenGL.
I don't remember if it was related to your issue.
Thus, let try and keep us informed ;-)
HTH, Pascal.
http://blady.pagesperso-orange.fr
> Le 4 sept. 2016 ? 06:32, Roger Mc Murtrie <rogermc at grapevine.com.au> a ?crit :
>
> Thanks Pascal,
> I finally managed to get configure to work with OpenGL using:
> CC='/usr/bin/gcc -g -O0' ./configure --enable-build=Debug --with-GL=GL --with-GL-prefix=/usr/X11 --disable-shared
> However, to do this I had to change
> GL_LDOPTS="-L$with_GL_prefix/lib64 to GL_LDOPTS="-L$with_GL_prefix/lib
> as my system does not have a lib64 folder in /usr/X11.
>
> make then proceeded OK until:
>
> gcc -c -fPIC -gnat05 -gnatQ -gnatwae -gnatay -g -O0 -Werror=format-security gl_h.adb
> In file included from /Ada_Source/gtkada/src/opengl/gtkglarea.c:22:
> /ada_source/gtkada/src/opengl/gdkgl.h:74:9: warning: 'GDK_TYPE_GL_CONTEXT' macro redefined [-Wmacro-redefined]
> In file included from #define GDK_TYPE_GL_CONTEXT (gdk_gl_context_get_type())
> ^
> /usr/local/Cellar/gtk+3/3.20.6/include/gtk-3.0/gdk/gdkglcontext.h:33:9: note: previous definition is /Ada_Source/gtkada/src/opengl/gdkgl.c here:
> 23:
> /ada_source/gtkada/src/opengl/gdkgl.h:74:9: warning: 'GDK_TYPE_GL_CONTEXT' macro redefined [-Wmacro-redefined]#define GDK_TYPE_GL_CONTEXT (gdk_gl_context_get_type ())
>
> ^
> #define GDK_TYPE_GL_CONTEXT (gdk_gl_context_get_type())
> ^
> /usr/local/Cellar/gtk+3/3.20.6/include/gtk-3.0/gdk/gdkglcontext.h:33:9: note: previous definition is here
> #define GDK_TYPE_GL_CONTEXT (gdk_gl_context_get_type ())
> ^
> gcc -c -fPIC -gnat05 -gnatQ -gnatwae -gnatay -g -O0 -Werror=format-security gdk-gl.adb
> /Ada_Source/gtkada/src/opengl/gdkgl.c:270:3: error: use of undeclared identifier 'context'
> context = g_object_new(GDK_TYPE_GL_CONTEXT, NULL);
> ^
> /Ada_Source/gtkada/src/opengl/gdkgl.c:271:8: error: use of undeclared identifier 'context'
> if (!context)
> ^
> /Ada_Source/gtkada/src/opengl/gdkgl.c:313:10: error: use of undeclared identifier 'context'
> return context;
> ^
> 1 warning and 3 errors generated.
> In file included from /Ada_Source/gtkada/src/opengl/gtkglarea.c:23:
> In file included from /ada_source/gtkada/src/opengl/gtkglarea.h:26:
> In file included from /usr/local/Cellar/gtk+3/3.20.6/include/gtk-3.0/gtk/gtk.h:286:
> /usr/local/Cellar/gtk+3/3.20.6/include/gtk-3.0/gtk/gtk-autocleanups.h:86:31: error: unknown type name 'GtkGLArea'
> G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkGLArea, g_object_unref)
> ^
> /usr/local/Cellar/gtk+3/3.20.6/include/gtk-3.0/gtk/gtk-autocleanups.h:86:31: error: unknown type name 'GtkGLArea'
> /Ada_Source/gtkada/src/opengl/gtkglarea.c:75:3: warning: 'gtk_widget_set_double_buffered' is deprecated [-Wdeprecated-declarations]
> gtk_widget_set_double_buffered(GTK_WIDGET(gl_area), FALSE);
> ^
> /usr/local/Cellar/gtk+3/3.20.6/include/gtk-3.0/gtk/gtkwidget.h:883:23: note: 'gtk_widget_set_double_buffered' has been explicitly marked deprecated here
> void gtk_widget_set_double_buffered (GtkWidget *widget,
> ^
> 2 warnings and 2 errors generated.
>
> compilation of gdkgl.c failed
> compilation of gtkglarea.c failed
>
> Seems to be a conflict between definitions of GDK_TYPE_GL_CONTEXT in GtkAda and gtk+3?
>
> Regards,
> Roger
>
>
>> On 3 Sep 2016, at 8:00 PM, gtkada-request at lists.adacore.com wrote:
>>
>> Send gtkada mailing list submissions to
>> gtkada at lists.adacore.com
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> http://lists.adacore.com/mailman/listinfo/gtkada
>> or, via email, send a message with subject or body 'help' to
>> gtkada-request at lists.adacore.com
>>
>> You can reach the person managing the list at
>> gtkada-owner at lists.adacore.com
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of gtkada digest..."
>> Today's Topics:
>>
>> 1. Re: Configure doesn't find openGL (Pascal)
>>
>> From: Pascal <p.p14 at orange.fr>
>> Subject: Re: [gtkada] Configure doesn't find openGL
>> Date: 3 September 2016 at 5:36:16 AM AEST
>> To: Emmanuel Briot <briot at adacore.com>, Roger Mc Murtrie <rogermc at grapevine.com.au>, gtkada <gtkada at lists.adacore.com>
>>
>>
>> Hello,
>>
>> That's a while I have built GTKAda with OpenGL support on MacOS.
>>
>> I did it with X11 backend:
>> $ CPPFLAGS=-I$instxada/include LDFLAGS=-L$instxada/lib ./configure CC='gcc -g -O0' --prefix=$instxada --enable-build=Debug --with-GL=GL --with-GL-prefix=/usr/X11 --disable-shared
>> (instxada=your installation directory)
>>
>> If you want native MacOS backend, try to add in GTKAda GPR file:
>> for Linker_Options use ("-g", "-bind_at_load", "-framework", "/GLUT", "-framework", "/OpenGL", "-lm", "-Wl,-no_pie");
>>
>> Keep us informed.
>>
>> HTH, Pascal.
>> http://blady.pagesperso-orange.fr
>>
>>
>>> Le 1 sept. 2016 ? 07:51, Emmanuel Briot <briot at adacore.com> a ?crit :
>>>
>>>> I can't get configure to produce a system that includes openGL.
>>>> CC=/usr/bin/gcc ./configure LDFLAGS="-framework OpenGL -L/System/Library/Frameworks/OpenGL.framework/Libraries".
>>>
>>> Take a look at the contents of config.log
>>>
>>> I am not sure we really support openGL on OSX though (or that gtk+ itself
>>> supports it correctly). The GLArea widget has not been updated in a while
>>> on the C side.
>>>
>>> Emmanuel
>>>
>>> _______________________________________________
>>> gtkada mailing list
>>> gtkada at lists.adacore.com
>>> http://lists.adacore.com/mailman/listinfo/gtkada
>>
>>
>>
>>
>> _______________________________________________
>> gtkada mailing list
>> gtkada at lists.adacore.com
>> http://lists.adacore.com/mailman/listinfo/gtkada
>
> _______________________________________________
> gtkada mailing list
> gtkada at lists.adacore.com
> http://lists.adacore.com/mailman/listinfo/gtkada
More information about the gtkada
mailing list