[overture] Re: cg.v24 compilation problem using mesa7.2

  • From: "Kyle K. Chand" <chand1@xxxxxxxx>
  • To: "overture@xxxxxxxxxxxxx" <overture@xxxxxxxxxxxxx>
  • Date: Fri, 20 Jul 2012 09:34:51 -0700

Barak and Bill:

I think the problem is that in the Overture build of Overture, the OpenGL path and libraries come before /usr/lib64, whereas in the cg build they come after. In the Overture build the linker sees the libOSMesa you intend, but in the cg build it first searches /usr/lib64 and finds the libOSMesa in that directory. I bet if you did an:

nm $OpenGL/lib64/libOSMesa.so | grep _mesa_copy_context
you will find the symbol, but if you did
nm /usr/lib64/libOSMesa.so | grep _mesa_copy_context
you will not.

What is the fix? Well, you will need to change cg/common/make so that the lines that set LIBS looks like:
LIBS += $(OGMG_LIBS) \
        $(OVERTURE_LIBRARIES) \
        $(OV_OPENGL_LIBRARIES) \
        $(OV_COMPILER_LIBS) \
        $(OV_HDF_LIBRARIES) \
        $(PETSC_LIBS) \
        $(APP_LIBRARIES) \
        $(FLIBS) \
        $(OV_MOTIF_LIBRARIES) \
        $(OV_X_LIBRARIES) \
        $(OV_PERL_LIBRARIES)

basically move the OpenGL libraries before the libs that set -L/usr/ lib64

Well, at least I hope that is it...
Note, because of the /usr/lib, you will likely get the "incompatible library" warning, but that is just a warning, it does not use those libraries.

Kyle

mailto: chand1@xxxxxxxx
phoneto: (925) 422 7740



On Jul 20, 2012, at 6:07 AM, Bill Henshaw wrote:

Barak:
   Ok, I was mistaken. But as you can see here:

g++ -fPIC -I"`pwd`/.."/include -I. -DUSE_MESA -I/home/galanti/ COMPUTATION/Overture/A++P++-0.8.0/A++/install//include -I/home/ galanti/COMPUTATION/Overture/MESA/Mesa-7.2/include -I/usr/include -DBL_USE_DOUBLE -DBL_Solaris -I/usr/lib/perl5/5.14.2/x86_64-linux- thread-multi/CORE -g -o ogen ogenDriver.o ogenFunction.o -Wl,- rpath,"`pwd`/.."/lib -L"`pwd`/.."/lib -lOverture -lOverture_static -Wl,-rpath,/usr/lib -L/usr/lib -lhdf5 -ljpeg -lz -Wl,-rpath,/home/ galanti/COMPUTATION/Overture/A++P++-0.8.0/A++/install//lib -L/home/ galanti/COMPUTATION/Overture/A++P++-0.8.0/A++/install//lib -lApp -lApp_static -lgfortran -Wl,-rpath,/usr/lib/perl5/5.14.2/x86_64- linux-thread-multi/CORE -L/usr/lib/perl5/5.14.2/x86_64-linux-thread- multi/CORE -lperl -lm -ldl -lcrypt -lpthread -Wl,-rpath,/home/galanti/COMPUTATION/Overture/MESA/Mesa-7.2/lib64 -L/ home/galanti/COMPUTATION/Overture/MESA/Mesa-7.2/lib64 -lGL -lGLU - lOSMesa -Wl,-rpath,/usr/lib64 -L/usr/lib64 -lXm -L/usr/lib64
-lXpm -lXp -lXt -lXmu

Overture is looking in /usr/lib for the hdf5 library:
    -Wl,-rpath,/usr/lib -L/usr/lib -lhdf5 -ljpeg -lz
and this is causing trouble since the linker finds other libraries in /usr/lib which is should not
be finding.

I think you can change Overture/config/MakeDefs.linux line:
HDF_LIBS = $(OV_RPATH)$(HDF)/lib -L$(HDF)/lib -lmfhdf -ldf -ljpeg - lz
to
HDF_LIBS = $(OV_RPATH)$(HDF)/lib64 -L$(HDF)/lib64 -lmfhdf -ldf - ljpeg -lz

You will need to run configure again in the Overture directory and make.

...Bill


On 07/20/2012 01:34 AM, galanti@xxxxxxxxxxxx wrote:
Hi Bill,
Thank you for the reply. I am sorry, but the hdf library is not in lib,
but instead in lib64 (and it was automatically installed in my system
using yast (opensuse)). If you check the in the instructions, they are
referring to the lib and not to lib64 (see:
https://computation.llnl.gov/casc/Overture/henshaw/install/ index.html) The problem appeared when I first time tried to compile Overture. I set the environment variable for HDF as /usr. The make file would look for HDF library in lib (which I my case are in lib64). So the alternatives suggest
to use the option useHDF5 (which worked!).
So I am not sure now what to do...
Many many thanks for your help.
Barak

Barak:

Thanks for the info on the load line for ogen. Now we know what does work.

Note that _mesa_copy_content must have been found when you built ogen.

To begin with I suggest that you move the hdf libraries out of
/usr/lib and into a separate directory or into /usr/lib64. I guess
that when you built hdf you installed in in /usr/lib -- this was
not a good idea as it turns out.

Overture should not be looking for anything in /usr/lib. This
should get rid of the loader warnings:

/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/ bin/ld:
skipping incompatible /usr/lib/libGLU.so when searching for -lGLU

The problem we need to avoid is that there are still OpenGL libraries in
/usr/lib64 and we need
to make sure that when you build "cg" that you do not accidently link to
these versions
of OpenGL when you need to link to the Mesa 7.2 versions. This may require
rearranging the
order of the libraries on the link line.


...Bill



On 07/19/2012 01:16 PM, galanti@xxxxxxxxxxxx wrote:
Hi,
I misunderstood your message. Here is what I get when building ogen (see
in the attached file).
Thanks.
Barak


Barak:
I am confused since if Overture built then the cg routines should
also
build. This is why I wanted to see what the loader line looks like
when you build ogen.
     The problem seems to be related to the fact that you link to
some libraries in /usr/lib/ (which usually holds the 32 bit libraries)
as opposed to /usr/lib64 (which holds the 64 bit libraries).


...Bill



On 07/19/2012 08:19 AM, galanti@xxxxxxxxxxxx wrote:
Hi Bill,
Indeed the Overture is compiled properly. I can open the graphics
(ogen).
The problem is when I am compiling cg,c24. It stops in the directory
common (in the file checkCheckFiles.C) which needs something like
_mesa_copy_content (and I could find it in the library GL (for the
version
7.2).


Thanks,
Barak


Barak:
Am I correct that Overture compiled properly and the graphics
worked?
When you built Overture what did the loader line look like when you
built
ogen -- you can goto to Overture/bin/, remove ogen and type make to
rebuild it.
Here is what I get:

g++ -fPIC -I"`pwd`/.."/include -I.   -DUSE_MESA
-I/home/henshaw.0/A++P++/A++P++-4.3.2-64/A++/install/include
-I/home/henshaw.0/software/OpenGL/Mesa-7.2.intel.gcc4.3.2/include
-I/usr/include
-DBL_USE_DOUBLE -DBL_Solaris
-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -g - o ogen
ogenDriver.o ogenFunction.o  -Wl,-rpath,"`pwd`/.."/lib
-L"`pwd`/.."/lib
-lOverture -lOverture_static
-Wl,-rpath,/usr/apps/gcc/4.3.2/lib64 -L/usr/apps/gcc/4.3.2/lib64
-Wl,-rpath,/home/henshaw.0/software/hdf/hdf5-1.6.5-gcc4.3.2-64/ lib
-L/home/henshaw.0/software/hdf/hdf5-1.6.5-gcc4.3.2-64/lib -lhdf5
-ljpeg -lz
-Wl,-rpath,/home/henshaw.0/A++P++/A++P++-4.3.2-64/A++/install/lib
-L/home/henshaw.0/A++P++/A++P++-4.3.2-64/A++/install/lib -lApp
-lApp_static
-Wl,-rpath,/nfs/apps/pgi/7.0-4/linux86-64/7.0-4/lib
-L/nfs/apps/pgi/7.0-4/linux86-64/7.0-4/lib -lpgftnrtl -lpgmp - lpgc
-lrt
-lstd -Wl,-rpath,/usr/lib64/perl5/5.8.8/x86_64-linux-thread- multi/CORE
-L/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -lperl
-lresolv
-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
-Wl,-rpath,/home/henshaw.0/software/OpenGL/ Mesa-7.2.intel.gcc4.3.2/lib64 -L/home/henshaw.0/software/OpenGL/Mesa-7.2.intel.gcc4.3.2/lib64 -lGL
-lGLU
-lOSMesa -Wl,-rpath,/usr/lib64 -L/usr/lib64 -lXm -L/usr/lib64 - lXpm
-lXp
-lXt -lXmu -lXi -lXext -lX11 -lm


...Bill


On 07/18/2012 02:44 PM, galanti@xxxxxxxxxxxx wrote:
Hi Bill,
Thank you. I have followed your last message, unfortunately, the
compilation does not succeed.
See the attached file, which is the log of the compilation of cg.v24:
Many thanks,
Barak





This mail was sent via Mail-SeCure System.





************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals&
computer viruses.
************************************************************************************




This mail was received via Mail-SeCure System.





************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals&
computer
viruses.
************************************************************************************




This mail was sent via Mail-SeCure System.





************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals&
computer viruses.
************************************************************************************





This mail was received via Mail-SeCure System.





************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals& computer
viruses.
************************************************************************************






This mail was sent via Mail-SeCure System.





************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals& computer viruses.
************************************************************************************








Other related posts: