LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

The libOSMesa nightmare

Highlighted
Hello,

We are working on a Linux version of our software which we can distribute, but the runtime engine of LabVIEW 8.0.1 keeps on giving us problems. On different suse distributions (9.2, 10.1) we keep on getting undefined reference errors on startup regarding the libOSMesa.so.4 :

/usr/lib/libOSMesa.so.4: undefined symbol: _glapi_get_proc_address on Suse 9.2
/usr/lib/libOSMesa.so.4: undefined symbol: _glapi_DispatchTSD on Suse 10.1

All Nvidia systems, and no problem on my Suse 10.1 system with an ATI graphical card.

I read about some work-arounds, but is there a general solution for this ? Is there nog runtime avalaible without this Mesa stuff, since our application does not use OpenGL or any 3D style control/indicators anyway ?

0 Kudos
Message 1 of 10
(4,236 Views)
Yes the differences in libOSMesa.so.4 versions is really a nightmare.  One solution is to not install the Nvidia graphics driver.  There is another solution...

LabVIEW 8.0 includes a version of Mesa that will work.  It can be found at:

/usr/local/natinst/LabVIEW-8.0/linux/libLVMesa.so.4

If you rename, or link this file to libOSMesa.so.4 in the same directory then LabVIEW will use it instead of your system's version.  If you rename and place this file in:

/usr/local/lib/linux/

then the LabVIEW Run-time Engine will use it instead of your system's version.

You can redistribute this file according to the GPL License, and the source code can be found at:

ftp://ftp.ni.com/support/misc/thirdparty/mesa-src

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 2 of 10
(4,210 Views)
Thank you for that tip, I will try it on our systems on Monday.
0 Kudos
Message 3 of 10
(4,191 Views)
I tried your suggestion, but I keep on getting the same error. The problem is the run time engine searches for this so in /usr/lib. There is already the original version at that position. I could override it with your suggestion, but I am afraid not many people would like to replace there library with another one, at the risk of having other programs stop functioning properly.

Is there a way to force the runtime engine to look in /usr/lib/local/linux ? I even had to create this folder myself by the way.
0 Kudos
Message 4 of 10
(4,157 Views)
It should first look in /usr/local/lib/linux/ then /usr/lib/.  Did you rename the file to libOSMesa.so.4?  Are the permissions set correctly?  I should look something like:

-r-xr-xr-x 1 root root 980616 2006-07-14 14:03 /usr/local/lib/linux/libOSMesa.so.4

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 5 of 10
(4,148 Views)
I made the stupid mistake of not renaming the file from libLVMesa.so.4 to libOSMesa.so.4. Thank you for the help, it now works perfectly.
0 Kudos
Message 6 of 10
(4,146 Views)
When I attempt to execute Test Panel I get the following errors:

larry@linux-600m:/usr/local/bin> DAQmxTestPanels
Can't load LabVIEW runtime library /usr/local/lib/liblvrt.so.8.0
/usr/local/lib/linux/libOSMesa.so.4: undefined symbol: _glapi_add_entrypoint
larry@linux-600m:/usr/local/bin>

So far I loaded LabVIEW 8.5.1,
NI-DAQmx Base 3.2, NI-VISA 4.4, NI-KAL 1.8, and NI-DAQmx 8.0.  The operating system is Open SUSE 10.3. 

I tried to compile from source code
libLVMesa.so.4 from ftp://ftp.ni.com/support/misc/thirdparty/mesa-src

I unzipped mesa30lv.zip in my home directory.  I then attempted to compile by: make  mklinux 

Then there were a bunch of errors and ultimately:

X/glxapi.c:355: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘
glXReleaseBuffersMESA’
X/glxapi.c:368: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘
glXCreateGLXPixmapMESA’
make[2]: *** [X/glxapi.o] Error 1
make[1]: *** [mklinux] Error 2
make: *** [mklinux] Error 2
larry@linux-600m:~/hs/labview/mesa/mesa>

I have attached the output of the attempt to compile.

So one thing is can you send the file libLVMesa.so.4 to me or tell me what I did wrong when I attempted to compile?  Second do I understand correctly that I then need to put the file libLVMesa.so.4 in the directory /usr/local/lib/linux/ and the create a symbolic link linking libOSMesa.so.4 to the file libLVMesa.so.4?  Also I created the directory /usr/local/lib/linux/ as there was not one there.

Thank you



0 Kudos
Message 7 of 10
(3,475 Views)

Hello Larry_s,

 

It looks like the above users weren't trying to compile the libLVMesa.so.4 file--they were just replacing the other version.  Did you try just swapping these files out?

 

If not, give that a try.  If there's still an issue I'll try it out myself and let you know.

 

Cheers,

Brooks
0 Kudos
Message 8 of 10
(3,420 Views)
I do not have the file libLVMesa.so.4 nor have a way to get it.  We are just trying the Linux LabVIEW program now so all of our other versions which we have many are all Windows versions.  This is why I was trying to compile to obtain the driver libLVMesa.so.4 as I do not have a way to get it.  I am assuming that the Windows CDs for LabVIEW 8.0 we have do not have this driver on them anywhere. 
0 Kudos
Message 9 of 10
(3,411 Views)

I had a similar problem....I couldn't use the test panel on a Linux box (Fedora Core 10) without LabView installed.  Here's what works:

 

-Install NI-DAQmx (I used 8.0.1)...this requires gcc, kernel-devel, make, and possibly other packages as well

-Download the Mesa graphics library (open source):  ftp://ftp.ni.com/support/misc/thirdparty/mesa-src/

-Extract the library, then extract the file inside called mesa30lv.zip

   tar -xz mesa4.tar.gz ./mesa/

   cd ./mesa/

   unzip mesa30lv.zip ./some_path/

 

-In the directory you extracted mesa30lv.zip to, you will need to then run the make file to compile them into share objects [libraries]:

   cd ./some_path/

   make lv-linux

 

-Then,  copy the shared object file to where the test panel application expects to find the library:

   cp libLVMesaGL.so.3.0 /usr/local/lib/linux/libOSMesa.so.4

 

Voila, the test panel app works like a champ now : )

0 Kudos
Message 10 of 10
(2,972 Views)