Re: [osol-discuss] Building QT-4.3.3 with OpenGL enabled

2008-01-18 Thread russell aspinwall
How do you specify the -I include for the Mesa directory so that the build can 
take place, as it automatically appends GL/include file . eg

GL/gl.h
GL/glu.h

Attempting to build with the NVIDIA include indicates the file is not present 
it looks for GL/glu.h which is not provided.
If NVIDIA provides its include files in /usr/X11/include/NVIDIA/GL and the you 
specify the include directory as -I/usr/X11/include/NVIDIA, then surely the 
Mesa include should follow the same convention of -I/usr/X11/include/mesa, the 
#include GL/glu.h is added. This would mandate the Mesa include files to be 
in a /usr/X11/include/mesa/GL directory and not /usr/X11/include/mesa.
A minor inconvenience to programmers who are constantly developing and building 
code in their build environment and are use to the idiosyncrasy of the 
OpenSolaris/Solaris.
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] Building QT-4.3.3 with OpenGL enabled

2008-01-17 Thread russell aspinwall
Hi,

When I  try to build Qt-4.3.3 it fails as it requires OpenGL v1.2.1 or later 
but it also complains that the GL/glu.h is missing.

Qt tests if OpenGL can be compiled in automatically, running the test in 
config.tests/x11/opengl
when building with NVIDA and Mesa the results are below:-

$ CC=cc CXX=CC F77=f90 ./configure --prefix=/opt/gnu -I/usr/X11/include/NVIDIA 
-L/usr/X11/lib/NVIDIA
$ cd /tmp/qt-x11-opensource-src-4.3.3/config.tests/x11/opengl
$ make
CC -c -O2  -I../../../mkspecs/solaris-cc -I. -I/usr/X11/include/NVIDIA 
-I/usr/openwin/share/include -I/usr/openwin/share/include -I. 
-I/usr/sfw/include -o opengl.o opengl.cpp
opengl.cpp, line 2: Error: Could not open include fileGL/glu.h.
opengl.cpp, line 5: Error: #error Required GLU version 1.2 not found..
make: *** [opengl.o] Error 1

$ cd /tmp/qt*
$ gmake confclean

$ CC=cc CXX=CC F77=f90 ./configure --prefix=/opt/gnu -I/usr/X11/include/mesa 
-L/usr/X11/lib/mesa
$ cd /tmp/qt-x11-opensource-src-4.3.3/config.tests/x11/opengl
$  make
CC -c -O2  -I../../../mkspecs/solaris-cc -I. -I/usr/X11/include/mesa 
-I/usr/openwin/share/include -I/usr/openwin/share/include -I. 
-I/usr/sfw/include -o opengl.o opengl.cpp
opengl.cpp, line 1: Error: Could not open include fileGL/gl.h.
opengl.cpp, line 2: Error: Could not open include fileGL/glu.h.
opengl.cpp, line 5: Error: #error Required GLU version 1.2 not found..
make: *** [opengl.o] Error 1

Fixing /usr/X11/include/mesa by adding GL dir and copying files as root then 
trying make again

$ su
# cd /usr/X11/include/mesa
# mkdir GL
# chgrp bin GL
# cp -p * GL
# exit
$  make
CC -c -O2  -I../../../mkspecs/solaris-cc -I. -I/usr/X11/include/mesa 
-I/usr/openwin/share/include -I/usr/openwin/share/include -I. 
-I/usr/sfw/include -o opengl.o opengl.cpp
CC -R/usr/lib -R/opt/gnu/lib -R/opt/gnu/lib -o opengl opengl.o
-L/usr/sfw/lib -L/usr/openwin/lib -L/usr/X11/lib/mesa -L/usr/openwin/lib -lGL 
-lGLU -lXext -lX11 -lresolv -lsocket -lnsl

Qt-4.3.3 will compile with OpenGL using MESA, however NVIDIA GL will still 
fail. Can NVIDIA be persuaded to fix the include files?
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] Building QT-4.3.3 with OpenGL enabled

2008-01-17 Thread russell aspinwall
Hi,

After the fixing the Mesa GL include problem, Qt-4.3.3 autodetects OpenGL, then 
building Qt takes a while. Once installed I tried to run

$  qtdemo
ld.so.1: qtdemo: fatal: libXrender.so.1: open failed: No such file or directory
Killed

$ echo $LD_LIBRARY_PATH
:/usr/openwin/lib:/opt/gnu/lib

$ 
LD_LIBRARY_PATH=:/usr/openwin/lib:/usr/openwin/sfw/lib:/usr/sfw/lib:/opt/gnu/lib:/usr/X11/lib/mesa
 ; export LD_LIBRARY_PATH

$ qtdemo
application runs
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] Building QT-4.3.3 with OpenGL enabled

2008-01-17 Thread russell aspinwall
Hi,

While Qtdemo does run, not all the demos run fully due to the limitations of 
the Mesa library.
Getting NVIDIA to provide the correct include and library files.

It would be also useful if the location of the libraries could be standardised 
into /usr/X11/lib.

I hope now to build Stellarium 0.9.0 as it was the Qt OpenGl that was stopping 
me.
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] Building QT-4.3.3 with OpenGL enabled

2008-01-17 Thread Alan Coopersmith
russell aspinwall wrote:
 Hi,
 
 After the fixing the Mesa GL include problem, Qt-4.3.3 autodetects OpenGL, 
 then building Qt takes a while. Once installed I tried to run
 
 $  qtdemo
 ld.so.1: qtdemo: fatal: libXrender.so.1: open failed: No such file or 
 directory
 Killed
 
 $ echo $LD_LIBRARY_PATH
 :/usr/openwin/lib:/opt/gnu/lib
 
 $ 
 LD_LIBRARY_PATH=:/usr/openwin/lib:/usr/openwin/sfw/lib:/usr/sfw/lib:/opt/gnu/lib:/usr/X11/lib/mesa
  ; export LD_LIBRARY_PATH

Having LD_LIBRARY_PATH set in your environment is a sure way to
break many applications - if you absolutely need it, set it only
for the applications that need it in wrapper scripts, not for
everything.


-- 
-Alan Coopersmith-   [EMAIL PROTECTED]
 Sun Microsystems, Inc. - X Window System Engineering
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] Building QT-4.3.3 with OpenGL enabled

2008-01-17 Thread russell aspinwall
Hi Alan,

I know setting LD_LIBRARY_PATH can break applications but that was the quickest 
way to get qtdemo to find the libraries in /usr/openwin/sfw/lib. Should I need 
to write a wrapper script to set the environment to run the qtdemo? Maybe if 
the X library locations can be rationalised to /usr/X11/lib then it would not 
be necessary. 

Has the /usr/X11/include/mesa/GL directory fix already been applied to 
OpenSolaris?
It would be great to be able to use the NVIDIA GL but many of the include files 
are not supplied to offer full Qt + OpenGL functionality so all the Qt demo 
OpenGL demos would run completely.
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] Building QT-4.3.3 with OpenGL enabled

2008-01-17 Thread Alan Coopersmith

russell aspinwall wrote:
 Maybe if the X library locations can be rationalised to /usr/X11/lib then it 
 would not be necessary. 

We're working on it, and have accelerated it as part of the work
we need to do for X in Indiana.

 Has the /usr/X11/include/mesa/GL directory fix already been applied to 
 OpenSolaris?

I don't know of any bug reports filed or fixes needed there.


-- 
-Alan Coopersmith-   [EMAIL PROTECTED]
 Sun Microsystems, Inc. - X Window System Engineering

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] Building QT-4.3.3 with OpenGL enabled

2008-01-17 Thread James Carlson
russell aspinwall writes:
 I know setting LD_LIBRARY_PATH can break applications but that was the 
 quickest way to get qtdemo to find the libraries in /usr/openwin/sfw/lib. 
 Should I need to write a wrapper script to set the environment to run the 
 qtdemo? Maybe if the X library locations can be rationalised to /usr/X11/lib 
 then it would not be necessary. 

The usual way to deal with this problem is with the linker's -R
option.  In the same place where you specified this:

-L/usr/openwin/sfw/lib

add this:

-R/usr/openwin/sfw/lib

and you should then not need to use the LD_LIBRARY_PATH hack.

-- 
James Carlson, Solaris Networking  [EMAIL PROTECTED]
Sun Microsystems / 35 Network Drive71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


[osol-discuss] Building QT-4.3.3 with OpenGL enabled

2008-01-16 Thread russell aspinwall
Hi,

I have been trying to build Qt-4.3.3-open-source (without OpenGL there is no 
problem) with OpenGL support. As I have a Geforce 8600 card and using the 
NVIDIA-Solaris-x86-169.07 driver, I thought it would be relatively easy on 
Solaris 10 8/07 which I know is an old build.
Have the problems I have been experiencing been resolved in OpenSolaris?

The NVIDIA drivers have include files in /usr/X11/include/GL  and 
/usr/X11/include/NVIDIA/GL gl.h (opengl 1.1), glext.h (opengl 1.2.1), glx.h 
(v1.2), glxext.h (v1.2.1).

When building qt-4.3.3 as follows (which requires a minimum of OpenGL v1.2.1):

CC=cc CXX=CC F77=f90 ./configure --prefix=/opt/gnu -I/usr/X11/include/NVIDIA 
-L/usr/X11/lib/NVIDIA

The #include GL/gl.h appends the /usr/X11/include/NVIDIA/  with GL/gl.h and 
finds the files,
however with the Mesa option this can not work as the mesa library does not 
contain a GL subdirectory ie.

 CC=cc CXX=CC F77=f90 ./configure --prefix=/opt/gnu -I/usr/X11/include/mesa 
-L/usr/X11/lib/mesa

The #include GL/gl.h appends the /usr/X11/include/mesa with GL/gl.h but the 
actual file is located in /usr/X11/include/mesa/gl.h but it should be 
/usr/X11/include/mesa/GL/gl.h
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org