Stefan Hellwig | 1 May 2004 15:09
Picon

[PATCH] OpenGL configure check for Digikam Plugins

Dear all,

As you all know there are compile problems with the slideshow plugin on 
some systems because the plugin needs OpenGL support to compile and relies 
on the fact that Qt is compiled with OpenGL support. However, that's not 
the case for all systems (e.g. if you use Gentoo and didn't enable the 
"opengl" use flag before emerging Qt) and therefore the compilation of the 
slideshow plugin fails.

The attached patch adds two more flags to the "configure" of the digikam 
plugins: "--enable-opengl" and "--with-mesa". The first one enables 
(external) OpenGL support and the second one can be used if someone 
prefers to use the Mesa OpenGL libraries.

If you don't provide the "--enable-opengl" flag, configure notifies the 
user that the slideshow plugin needs on OpenGL support in Qt (this is the 
default).

I tested all combinations on my machine and it seems to work fine. Please 
note that almost the entire configure macro (MDL_HAVE_OPENGL) is NOT my 
"invention"! I found the macro on ac-archive.sourceforge.net and modified 
it to match the Digikam Plugins requirements (see the comments in the 
patched configure.in.in file).

The patch has been created against the latest CVS code of the Digikam 
Plugins, by the way.

I would kindly ask you to try it out and let me know what you think. This 
is the first version of the patch so there's probably room for 
improvements. If you think this is useful you/we may also make it 
(Continue reading)

Gilles Caulier | 1 May 2004 18:32
Picon
Favicon

Re: [PATCH] OpenGL configure check for Digikam Plugins

Le Samedi 1 Mai 2004 13:09, Stefan Hellwig a écrit :
> Dear all,
>
> As you all know there are compile problems with the slideshow plugin on
> some systems because the plugin needs OpenGL support to compile and relies
> on the fact that Qt is compiled with OpenGL support. However, that's not
> the case for all systems (e.g. if you use Gentoo and didn't enable the
> "opengl" use flag before emerging Qt) and therefore the compilation of the
> slideshow plugin fails.
>
> The attached patch adds two more flags to the "configure" of the digikam
> plugins: "--enable-opengl" and "--with-mesa". The first one enables
> (external) OpenGL support and the second one can be used if someone
> prefers to use the Mesa OpenGL libraries.
>
> If you don't provide the "--enable-opengl" flag, configure notifies the
> user that the slideshow plugin needs on OpenGL support in Qt (this is the
> default).
>
> I tested all combinations on my machine and it seems to work fine. Please
> note that almost the entire configure macro (MDL_HAVE_OPENGL) is NOT my
> "invention"! I found the macro on ac-archive.sourceforge.net and modified
> it to match the Digikam Plugins requirements (see the comments in the
> patched configure.in.in file).
>
> The patch has been created against the latest CVS code of the Digikam
> Plugins, by the way.
>
> I would kindly ask you to try it out and let me know what you think. This
> is the first version of the patch so there's probably room for
(Continue reading)

Gilles Caulier | 2 May 2004 20:43
Picon
Favicon

Re: [PATCH] OpenGL configure check for Digikam Plugins

Le Samedi 1 Mai 2004 13:09, Stefan Hellwig a écrit :
> Dear all,
>
> As you all know there are compile problems with the slideshow plugin on
> some systems because the plugin needs OpenGL support to compile and relies
> on the fact that Qt is compiled with OpenGL support. However, that's not
> the case for all systems (e.g. if you use Gentoo and didn't enable the
> "opengl" use flag before emerging Qt) and therefore the compilation of the
> slideshow plugin fails.
>
> The attached patch adds two more flags to the "configure" of the digikam
> plugins: "--enable-opengl" and "--with-mesa". The first one enables
> (external) OpenGL support and the second one can be used if someone
> prefers to use the Mesa OpenGL libraries.
>
> If you don't provide the "--enable-opengl" flag, configure notifies the
> user that the slideshow plugin needs on OpenGL support in Qt (this is the
> default).
>
> I tested all combinations on my machine and it seems to work fine. Please
> note that almost the entire configure macro (MDL_HAVE_OPENGL) is NOT my
> "invention"! I found the macro on ac-archive.sourceforge.net and modified
> it to match the Digikam Plugins requirements (see the comments in the
> patched configure.in.in file).
>
> The patch has been created against the latest CVS code of the Digikam
> Plugins, by the way.
>
> I would kindly ask you to try it out and let me know what you think. This
> is the first version of the patch so there's probably room for
(Continue reading)

Jesper K. Pedersen | 2 May 2004 22:51
Picon
Favicon

Re: features of the plugins

WHATWHATWHAT?
I think this was an utterly old email queued on my laptop.
Jus forget all about it.

On Wednesday 10 March 2004 20:37, Jesper K. Pedersen wrote:
| On Wednesday 03 March 2004 13:33, Renchi Raju wrote:
| > On Tue, 2 Mar 2004, Jesper K. Pedersen wrote:
| > > | there are
| > > | very few accessor functions a plugin needs from the application, and
| > > | if one has all of them covered in the interface class, we don't need
| > > | to worry about binary compatibility.
| > >
| > > This is just a matter of imagination. I'm sure I can come up with
| > > interfaces that don't even make any sense in any application but
| > > KimDaBa, but which might be important to KimDaBa.
| >
| > that is the purpose of this discussion. application developers come up
| > with what functions they want and it will be incorporated into the
| > interface class.
|
| I'm not sure if you understand me, so let me just try to elaborate.
| Imagine kipi becomes a great success, so we have say 50 plugins.
| Unrealistic? I don't know that depends on the amount of users, plus the
| flexibility we offer.
|
| Now imagine what digikam, showimg, viewimg, and KimDaBa looks like in say 2
| years. By then I'm very sure they want to offer plugins interfaces which we
| can not even with our best intent foresee now.
|
| By then we will have to ask each of the plugin developers to recompile and
(Continue reading)

Gilles Caulier | 4 May 2004 10:02
Picon
Favicon

Re: [PATCH] OpenGL configure check for Digikam Plugins

Stefan, I have some linking problem now after to updated the admin directory 
from KDE CVS. This is the konsole output :

* Making all in slideshow 
* /bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor 
-Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align 
-Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 
-Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new 
-fno-common -o digikamplugin_slideshow.la -rpath /usr/lib/kde3 -module 
-avoid-version -module -no-undefined -Wl,--no-undefined 
-Wl,--allow-shlib-undefined -R /usr/lib -R /usr/lib/qt3//lib -R 
/usr/X11R6/lib -L/usr/X11R6/lib -L/usr/lib/qt3//lib -L/usr/lib 
plugin_slideshow.lo slideshow.lo slideshowconfig.lo imlibiface.lo 
slideshowgl.lo plugin_slideshow.moc.lo slideshowconfig.moc.lo 
slideshowgl.moc.lo slideshow.moc.lo -lkparts -ldigikam -lImlib -ljpeg -ltiff 
-lungif -lpng -lz -lm -lXext -L/usr/X11R6/lib -lSM -lICE -lXext -lX11  
* .libs/slideshowgl.o(.text+0xca9): In function `SlideShowGL::initializeGL()': 
* : undefined reference to `glEnable' 
* .libs/slideshowgl.o(.text+0xcbe): In function `SlideShowGL::initializeGL()': 
* : undefined reference to `glClearColor' 
* .libs/slideshowgl.o(.text+0xccb): In function `SlideShowGL::initializeGL()': 
* : undefined reference to `glEnable' 
* .libs/slideshowgl.o(.text+0xcdc): In function `SlideShowGL::initializeGL()': 
* : undefined reference to `glBlendFunc' 
* .libs/slideshowgl.o(.text+0xcea): In function `SlideShowGL::initializeGL()': 
* : undefined reference to `glClearDepth' 
* .libs/slideshowgl.o(.text+0xd1d): In function `SlideShowGL::paintGL()': 
* : undefined reference to `glDisable' 
* .libs/slideshowgl.o(.text+0xd29): In function `SlideShowGL::paintGL()': 
* : undefined reference to `glClear' 
(Continue reading)

Gilles Caulier | 4 May 2004 10:06
Picon
Favicon

Re: Re: [PATCH] OpenGL configure check for Digikam Plugins


Note : I haven't used OpenGL options for .configure script ! 

regards
--

-- 
Gilles Caulier

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
Stefan Hellwig | 4 May 2004 18:30
Picon

Re: Re: [PATCH] OpenGL configure check for Digikam Plugins

Hi!

On Tuesday 04 May 2004 10:02, Gilles Caulier wrote:
> [...]
> -lX11 * .libs/slideshowgl.o(.text+0xca9): In function
> `SlideShowGL::initializeGL()': * : undefined reference to `glEnable'
> [...]

This is what people usually get when they link against a Qt library which 
is not linked/compiled with OpenGL support. Did you update your Qt library 
recently? When you don't give the "--enable-opengl" to configure it 
assumes that your Qt has OpenGL support (like it always did)... I'll check 
the current CVS code again to make sure it works. 

Please remember that I don't have Qt with OpenGL support so I always get 
these errors you reported above (if I don't use "--enable-opengl")...

Regards, Stefan.

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
Stefan Hellwig | 4 May 2004 23:05
Picon

Re: Re: [PATCH] OpenGL configure check for Digikam Plugins

Hi!

On Tuesday 04 May 2004 21:10, you wrote:
> It's work with this option, but before your patch and the 'admin' update
> from KDE CVS, Slideshow plugin can be built without problem. Typically,
> my configuration must use the .configure script without option about
> OpenGl...

Hm... That's really strange because the additional macro shouldn't change
the way the code is compiled if the --enable-opengl option is not used.
Maybe the "admin" directory change introduced a change?! I really don't
know and unfortunately I can't test this without recompiling my Qt...

Since you're just linking agains libdigikam (-ldigikam) and not against Qt
directly, can you check if your latest libdigikam is still linked against
the correct Qt (ldd $KDEDIR/lib/libdigikam.so | grep qt) ?

Regards, Stefan.

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
Gilles Caulier | 5 May 2004 00:20
Picon
Favicon

Re: Re: [PATCH] OpenGL configure check for Digikam Plugins

Le Mardi 4 Mai 2004 17:27, Stefan Hellwig a écrit :
> Hi!
>
> On Tuesday 04 May 2004 21:10, you wrote:
> > It's work with this option, but before your patch and the 'admin' update
> > from KDE CVS, Slideshow plugin can be built without problem. Typically,
> > my configuration must use the .configure script without option about
> > OpenGl...
>
> Hm... That's really strange because the additional macro shouldn't change
> the way the code is compiled if the --enable-opengl option is not used.
> Maybe the "admin" directory change introduced a change?! I really don't
> know and unfortunately I can't test this without recompiling my Qt...
>
> Since you're just linking agains libdigikam (-ldigikam) and not against Qt
> directly, can you check if your latest libdigikam is still linked against
> the correct Qt (ldd $KDEDIR/lib/libdigikam.so | grep qt) ?

On my MDK 9.2 with Qt 3.1.0 :

- With the old .configure and 'admin' directory :

[gilles@... gilles]$ ldd $KDEDIR/lib/libdigikam.so | grep qt
        libqt-mt.so.3 => /usr/lib/qt3//lib/libqt-mt.so.3 (0x407f9000)
[gilles@... gilles]$

- With the new .configure and 'admin' directory using --enable-opengl option :

[gilles@... gilles]$ ldd $KDEDIR/lib/libdigikam.so | grep qt
        libqt-mt.so.3 => /usr/lib/qt3//lib/libqt-mt.so.3 (0x407f9000)
(Continue reading)

Jesper K. Pedersen | 5 May 2004 09:57
Picon
Favicon

Re: Re: [PATCH] OpenGL configure check for Digikam Plugins

On Wednesday 05 May 2004 00:20, Gilles Caulier wrote:
| Le Mardi 4 Mai 2004 17:27, Stefan Hellwig a écrit :
| > Hi!
| >
| > On Tuesday 04 May 2004 21:10, you wrote:
| > > It's work with this option, but before your patch and the 'admin'
| > > update from KDE CVS, Slideshow plugin can be built without problem.
| > > Typically, my configuration must use the .configure script without
| > > option about OpenGl...
| >
| > Hm... That's really strange because the additional macro shouldn't change
| > the way the code is compiled if the --enable-opengl option is not used.
| > Maybe the "admin" directory change introduced a change?! I really don't
| > know and unfortunately I can't test this without recompiling my Qt...
| >
| > Since you're just linking agains libdigikam (-ldigikam) and not against
| > Qt directly, can you check if your latest libdigikam is still linked
| > against the correct Qt (ldd $KDEDIR/lib/libdigikam.so | grep qt) ?
|
| On my MDK 9.2 with Qt 3.1.0 :
|
| - With the old .configure and 'admin' directory :
|
| [gilles@... gilles]$ ldd $KDEDIR/lib/libdigikam.so | grep qt
|         libqt-mt.so.3 => /usr/lib/qt3//lib/libqt-mt.so.3 (0x407f9000)
| [gilles@... gilles]$
|
| - With the new .configure and 'admin' directory using --enable-opengl
| option :
|
(Continue reading)


Gmane