public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* libglut-devel package conflicts with opengl package [Attn: Volker]
@ 2008-11-04 16:31 André Bleau
  2008-11-04 16:58 ` Yaakov (Cygwin Ports)
  0 siblings, 1 reply; 5+ messages in thread
From: André Bleau @ 2008-11-04 16:31 UTC (permalink / raw)
  To: cygwin-apps


Following a user problem report (http://cygwin.com/ml/cygwin/2008-11/msg00022.html), I just discovered that the last version of the libglut-devel package now installs a glut.h file in /usr/include/GL (http://sourceware.org/ml/cygwin-announce/2008-03/msg00070.html). This file takes precedance over the one in /usr/include/w32api/GL and declares the same functions but with a different calling convention. This makes the packages libglut-devel and opengl incompatible; you will have to uninstall one of them if you have both. libglut-devel is for applications that will run through and X server while opengl is for application that will use the native Windows interface, which is much faster.

History:

The opengl package contains libraries related to openGL. One of them is GLUT (GL Utility Toolkit), whose purpose is to provide an OS-independant way to get a graphic context for openGL drawing, managing windows, and accessing devices like the keyboard and the mouse. The version of GLUT in the opengl package interfaces directly with Windows, so it is very fast.

At first, the opengl package contained (among other things):
The glut32.dll, in /usr/bin
The include file glut.h, in /usr/include/GL

Concurrently, the w32api package included libglut32.a in /usr/lib/w32api . I don't know the reason for this, as it is the only part of GLUT that the w32api provides. The w32api package is a requirement for the opengl package.

Then the freeglut package was added to the distribution. Its purpose is to provide an implementation of GLUT that runs through an X server. This created some conflicts (http://cygwin.com/ml/cygwin-apps/2006-04/msg00079.html) that I resolved by creating an updated version of the opengl package (http://sourceware.org/ml/cygwin-announce/2006-04/msg00027.html) in which glut.h was moved from /usr/include/GL to /usr/include/w32api/GL.

The applications using freeglut can be compiled and linked without problems, but I now realize that native GLUT applications cannot be compiled correctly if the libglut-devel package is also installed because the glut.h that it puts in /usr/include/GL takes precedance over the one that is required in /usr/include/w32api/GL.

So, how do we solve this?

Regards,

- André Bleau, Cygwin's volunteer OpenGL package maintainer.

Please direct any question or comment about the OpenGL package to cygwin at cygwin dot com


_________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libglut-devel package conflicts with opengl package [Attn: Volker]
  2008-11-04 16:31 libglut-devel package conflicts with opengl package [Attn: Volker] André Bleau
@ 2008-11-04 16:58 ` Yaakov (Cygwin Ports)
  0 siblings, 0 replies; 5+ messages in thread
From: Yaakov (Cygwin Ports) @ 2008-11-04 16:58 UTC (permalink / raw)
  To: cygwin-apps

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

http://cygwin.com/acronyms/#PCYMTWLL

André Bleau wrote:
> The applications using freeglut can be compiled and linked without problems, 
> but I now realize that native GLUT applications cannot be compiled
> correctly if the libglut-devel package is also installed because the
glut.h
> that it puts in /usr/include/GL takes precedance over the one that is
> required in /usr/include/w32api/GL.

FYI, this won't just be limited to GLUT; with the modular X11
transition, the Mesa OpenGL includes will be in /usr/include/GL as well.

> So, how do we solve this?

Use -I/usr/include/w32api ?

Yes, it's in the default search path, but this will force it before
/usr/include.


Yaakov
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREIAAYFAkkQfxMACgkQpiWmPGlmQSOohgCgxgMN9W5VTfTP1lC9xGCAn6VV
03oAoOVxTsY8FcdmXxgH9TxYXiPqWwzV
=6yxk
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libglut-devel package conflicts with opengl package [Attn:  Volker]
  2008-11-04 18:04 André Bleau
@ 2008-11-04 18:39 ` Yaakov (Cygwin Ports)
  0 siblings, 0 replies; 5+ messages in thread
From: Yaakov (Cygwin Ports) @ 2008-11-04 18:39 UTC (permalink / raw)
  To: cygwin-apps

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

André Bleau wrote:
> This cannot work as the order of system directories cannot be changed by -I.

Oops.

> What could be done is that I update the opengl package with an additionnal directory:
> /usr/include/opengl that will contain only a symbolic link: GL -> ../w32api/GL
> 
> Then all users of the opengl package will have to update their builld system to add
> -I/usr/include/opengl

That would be a good solution.

> But I really don't like to push that sort of change down the throat of the 
> developpers that were using a package that was working well before
> some other package was added to the distribution.

Does anything in the distro actually depend on Win32 OpenGL?  I'm pretty
sure not, but there are dependencies on X11 Mesa.


Yaakov
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREIAAYFAkkQlqoACgkQpiWmPGlmQSN1OgCgi3evPgXO1GXAbgt/Pwqnc1pu
k4cAoM1FUyZsti0fq25HZ9xUZEZ0TXYA
=yhRx
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libglut-devel package conflicts with opengl package [Attn:  Volker]
@ 2008-11-04 18:04 André Bleau
  2008-11-04 18:39 ` Yaakov (Cygwin Ports)
  0 siblings, 1 reply; 5+ messages in thread
From: André Bleau @ 2008-11-04 18:04 UTC (permalink / raw)
  To: cygwin-apps


"Yaakov (Cygwin Ports)"  wrote:
> André Bleau wrote:
>> The applications using freeglut can be compiled and linked without problems, 
>> but I now realize that native GLUT applications cannot be compiled
>> correctly if the libglut-devel package is also installed because the glut.h
>> that it puts in /usr/include/GL takes precedance over the one that is
>> required in /usr/include/w32api/GL.
> 
> FYI, this won't just be limited to GLUT; with the modular X11
> transition, the Mesa OpenGL includes will be in /usr/include/GL as well.

Then we are heading into a bigger mess.

> 
>> So, how do we solve this?
> 
> Use -I/usr/include/w32api ?
> 
> Yes, it's in the default search path, but this will force it before
> /usr/include.

This cannot work as the order of system directories cannot be changed by -I . From gcc ifo:
`-I DIR'
     Add the directory DIR to the list of directories to be searched
     for header files.  Directories named by `-I' are searched before
     the standard system include directories.  If the directory DIR is
     a standard system include directory, the option is ignored to
     ensure that the default search order for system directories and
     the special treatment of system headers are not defeated .

> 
> 
> Yaakov

What could be done is that I update the opengl package with an additionnal directory:
/usr/include/opengl that will contain only a symbolic link: GL -> ../w32api/GL

Then all users of the opengl package will have to update their builld system to add
-I/usr/include/opengl

But I really don't like to push that sort of change down the throat of the developpers that 
were using a package that was working well before some other package was added to the distribution.

Regards,

- André Bleau, Cygwin's volunteer OpenGL package maintainer.

Please direct any question or comment about the OpenGL package to cygwin at cygwin dot com


_________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* libglut-devel package conflicts with opengl package [Attn: Volker]
@ 2008-11-04 16:48 André Bleau
  0 siblings, 0 replies; 5+ messages in thread
From: André Bleau @ 2008-11-04 16:48 UTC (permalink / raw)
  To: cygwin-apps


Again, with proper formating:

Following a user problem report (http://cygwin.com/ml/cygwin/2008-11/msg00022.html),
I just discovered that the last version of the libglut-devel package now installs a glut.h file 
in /usr/include/GL (http://sourceware.org/ml/cygwin-announce/2008-03/msg00070.html). This
file takes precedance over the one in /usr/include/w32api/GL and declares the same functions 
but with a different calling convention. This makes the packages libglut-devel and opengl 
incompatible; you will have to uninstall one of them if you have both. libglut-devel is for 
applications that will run through and X server while opengl is for application that will use the 
native Windows interface, which is much faster.

History:

The opengl package contains libraries related to openGL. One of them is GLUT (GL Utility 
Toolkit), whose purpose is to provide an OS-independant way to get a graphic context for 
openGL drawing, managing windows, and accessing devices like the keyboard and the mouse. 
The version of GLUT in the opengl package interfaces directly with Windows, so it is very fast.

At first, the opengl package contained (among other things):
The glut32.dll, in /usr/bin
The include file glut.h, in /usr/include/GL

Concurrently, the w32api package included libglut32.a in /usr/lib/w32api . I don't know the 
reason for this, as it is the only part of GLUT that the w32api provides. The w32api package is 
a requirement for the opengl package.

Then the freeglut package was added to the distribution. Its purpose is to provide an 
implementation of GLUT that runs through an X server. This created some conflicts 
(http://cygwin.com/ml/cygwin-apps/2006-04/msg00079.html) that I resolved by creating an 
updated version of the opengl package 
(http://sourceware.org/ml/cygwin-announce/2006-04/msg00027.html) in which glut.h was 
moved from /usr/include/GL to /usr/include/w32api/GL.

The applications using freeglut can be compiled and linked without problems, but I now realize 
that native GLUT applications cannot be compiled correctly if the libglut-devel package is also 
installed because the glut.h that it puts in /usr/include/GL takes precedance over the one that 
is required in /usr/include/w32api/GL.

So, how do we solve this?

Regards,

- André Bleau, Cygwin's volunteer OpenGL package maintainer.

Please direct any question or comment about the OpenGL package to cygwin at cygwin dot com



_________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-11-04 18:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-04 16:31 libglut-devel package conflicts with opengl package [Attn: Volker] André Bleau
2008-11-04 16:58 ` Yaakov (Cygwin Ports)
2008-11-04 16:48 André Bleau
2008-11-04 18:04 André Bleau
2008-11-04 18:39 ` Yaakov (Cygwin Ports)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).