World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 07-21-2011, 03:42 AM   #11
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,615
nlneilson is on a distinguished road
Default

Quote:
Originally Posted by garakl View Post
Neil, I would suspect your libGL.so.* driver. From your log file I see that your Ubuntu installation is using the /usr/lib/fglrx/libGL.so.1.2

I just installed Ubuntu 10.4 x64 and I have the /usr/lib/mesa/libGL.so.6.0.12092.670880

I had many issues with fglrx, especially with the graphics performance.
Did you mean 11.04 rather than 10.04?

I am attempting to run everything as 32bit as most 64bit computers will run that as well as the 32bit computers.

Almost all of my development is in Windows but want the apps to be able to run on Linux, at least Ubuntu.

When I update I just replace the gov directory, have any of the jogl .so files been changed?
__________________
Neil
http://www.nlneilson.com
nlneilson is offline   Reply With Quote
Old 07-21-2011, 05:19 AM   #12
garakl
Administrator
 
Join Date: May 2006
Location: Seattle
Posts: 250
garakl is on a distinguished road
Default

>> Did you mean 11.04 rather than 10.04?
My previous posts was related to Ubuntu 10.04 64-bit.
I'm installing Ubuntu 11.04 32-bit right now and once it is done, I will run those commands on it.

>> When I update I just replace the gov directory,
>> have any of the jogl .so files been changed?
Those commands retrieve newest World Wind Java SDK release 1.2.
I do not know what version of WWJ SDK you have, but let's just run tests in the separate folder.
garakl is offline   Reply With Quote
Old 07-21-2011, 06:18 AM   #13
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,615
nlneilson is on a distinguished road
Default

I replaced the gov directory with the one from SDK 1.2

I tried some of the commands from post #10, up to the 64bit stuff, I would like to run WWJ 32bit.

sudo apt-get install ant1.8
returned
Unable to locate package ant1.8
Couldn't find any package by regex 'ant1.8'

The rest went OK, interesting way of installing WWJ, seemed to have installed on both computers.

sudo apt-get install ant 1.8
with space between ant and 1.8
seemed to work, several lines had ...is already the newest version where I installed Eclipse that installs ant, on both computers it ended with "Broken packages"


I removed Ubuntu 11.04 and replaced with 10.10 on the new Notebook, I can change that back easy enough but also have a 64bit box with 11.04 32bit still installed.
__________________
Neil
http://www.nlneilson.com
nlneilson is offline   Reply With Quote
Old 07-21-2011, 06:33 AM   #14
garakl
Administrator
 
Join Date: May 2006
Location: Seattle
Posts: 250
garakl is on a distinguished road
Default

I'm in the middle of testing on Ubuntu 11.04 x32
I will post updated list of commands, because it turns out on 11.04 there is no ANT 1.8, but there is ANT 1.7.
Thus, the correct command will be
sudo apt-get install ant1.7
garakl is offline   Reply With Quote
Old 07-21-2011, 06:46 AM   #15
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,615
nlneilson is on a distinguished road
Default

Good! sudo apt-get install ant1.7 works
An interesting side note on this is a Toshiba 32bit with Intel 945GM was such a problem until a recent driver update I bought an HP with AMD,

The Toshiba now runs OK on Win XP and also Ubuntu 11.04.
__________________
Neil
http://www.nlneilson.com
nlneilson is offline   Reply With Quote
Old 07-21-2011, 08:27 AM   #16
garakl
Administrator
 
Join Date: May 2006
Location: Seattle
Posts: 250
garakl is on a distinguished road
Default

Here is a list of linux commands I used to install and run WorldWind application on fresh Ubuntu linux 11.04 32-bit with OpenJDK 6.

Code:
sudo apt-get install ant1.7
sudo apt-get install openjdk-6-jdk openjdk-6-jre-headless openjdk-6-jre-lib

cd ~/Desktop
mkdir WorldWind
cd WorldWind

## get latest World Wind Java SDK release
wget -O worldwind-1.2.0.zip http://builds.worldwind.arc.nasa.gov/worldwind-releases/1.2/builds/worldwind-1.2.0.zip

## extract World Wind SDK
unzip worldwind-1.2.0.zip

## get and extract JOGL natives for linux 32-bit 
wget -O gluegen-rt-natives-linux-i586.jar http://worldwind.arc.nasa.gov/java/jogl/webstart/gluegen-rt-natives-linux-i586.jar
wget -O jogl-natives-linux-i586.jar http://worldwind.arc.nasa.gov/java/jogl/webstart/jogl-natives-linux-i586.jar

unzip jogl-natives-linux-i586.jar 
unzip gluegen-rt-natives-linux-i586.jar 

## build World Wind 
ant worldwind.jarfile
ant worldwind.extensions.jarfile

## start World Wind 'InstallImageryAndElevationsDemo'
java -Xmx1024m -Dsun.java2d.noddraw=true -cp worldwind.jar:worldwindx.jar:jogl.jar:gluegen-rt.jar:gdal.jar -Djava.library.path=`pwd` gov.nasa.worldwindx.examples.dataimport.InstallImageryAndElevationsDemo
I had to make two modifications to the build.xml file:

1. add encoding="ISO-8859-1" option to the javac section.
Code:
<javac encoding="ISO-8859-1" srcdir="${worldwind.src.dir}"
2. openjdk on 32-bit platform does not install plugin.jar, so I had to use the plugin.jar that comes with WWJ
Replaced
Code:
<pathelement location="${java.home}/lib/plugin.jar"/>
with
Code:
<pathelement location="plugin.jar"/>
garakl is offline   Reply With Quote
Old 07-21-2011, 08:54 AM   #17
garakl
Administrator
 
Join Date: May 2006
Location: Seattle
Posts: 250
garakl is on a distinguished road
Default

There is defenitelly something wrong with libGL driver on Ubuntu 11.04 32-bit.

When I frist run the WWJ application, both my virtual Ubuntu machine (on Parallels) and the host (mac) did crash. I had to reboot host machine.

My Ubuntu installation (as a virtual machine under Parallels, which has best OpenGL 2.1 support comparing to VMWare or VirtualBox)
has /usr/lib/mesa/libGL.so.6.0.12092.670880 and a standard set of aliases to it in the same /usr/lib/mesa/ folder:
libGL.so -> libGL.so.1
libGL.so.1 -> libGL.so.6.0.12092.670880

Since Parallels installs their own libGL driver, I recreated aliases in the standard /usr/lib/ location like this:

Code:
cd /usr/lib
sudo ln -s /usr/lib/parallels-tools/tools/prltools/xorg.7.1/usr/lib/libGL.so.1.0.0 libGL.so
sudo ln -s libGL.so libGL.so.1
Right after this I was able to run WWJ app without any problem.

Since you do not run Ubuntu as a virtual machine, let's see what libGL.so files you have installed.

Code:
find /usr -type f -name libGL\.so*
Also, you could use this command to see which OpenGL Mesa drivers are available
Code:
sudo apt-cache search OpenGL mesa
Install Mesa DRI & GLX modules
Code:
sudo apt-get install mesa-utils libgl1-mesa-dri libgl1-mesa-glx libgl1-mesa-swx11
Search for libGL.so.* library again to make sure you have Mesa modules installed and the version (mine was /usr/lib/mesa/libGL.so.6.0.12092.670880)
Code:
find /usr -type f -name libGL\.so*
and re-create libGL.so and libGL.so.1 alaises in the /usr/lib folder
Code:
cd /usr/lib
sudo ln -s /usr/lib/mesa/libGL.so.6.0.12092.670880 libGL.so
sudo ln -s libGL.so libGL.so.1
Let me know if you have better luck with Mesa module.
garakl is offline   Reply With Quote
Old 07-21-2011, 09:20 AM   #18
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,615
nlneilson is on a distinguished road
Default

neil@ubuntu:~$ find /usr -type f -name libGL\.so*
/usr/lib/mesa/libGL.so.1.2

neil@ubuntu:~$ find /usr -type f -name libGL\.so*
/usr/lib/mesa/libGL.so.1.2
neil@ubuntu:~$ sudo apt-cache search OpenGL mesa
[sudo] password for neil:
libegl1-mesa - A free implementation of the EGL API -- runtime
libgl1-mesa-dev - A free implementation of the OpenGL API -- GLX development files
libgl1-mesa-dri - A free implementation of the OpenGL API -- DRI modules
libgl1-mesa-dri-dbg - Debugging symbols for the Mesa DRI modules
libgl1-mesa-glx - A free implementation of the OpenGL API -- GLX runtime
libgl1-mesa-swx11 - A free implementation of the OpenGL API -- runtime
libgl1-mesa-swx11-dbg - A free implementation of the OpenGL API -- debugging symbols
libgl1-mesa-swx11-dev - A free implementation of the OpenGL API -- development files
libglu1-mesa - The OpenGL utility library (GLU)
libglu1-mesa-dev - The OpenGL utility library -- development files
libosmesa6 - Mesa Off-screen rendering extension
mesa-common-dev - Developer documentation for Mesa
xscreensaver-gl - GL(Mesa) screen hacks for xscreensaver
gnubik - 3D Rubik's cube game
libgl1-mesa-dri-experimental - A free implementation of the OpenGL API -- Extra DRI modules
libgl1-mesa-dri-experimental-dbg - Debugging symbols for the experimental Mesa DRI modules
libglw1-mesa - A free implementation of the OpenGL API -- runtime
libglw1-mesa-dev - A free implementation of the OpenGL API -- development files
libvtk5.4 - Visualization Toolkit - A high level 3D visualization library
libwxgtk2.6-0 - wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime)
libwxgtk2.6-dev - wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)
xscreensaver-gl-extra - GL(Mesa) screen hacks for xscreensaver
libwxgtk2.8-0 - wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime)
libwxgtk2.8-dev - wxWidgets Cross-platform C++ GUI toolkit (GTK+ development)

neil@ubuntu:~$ sudo apt-get install mesa-utils libgl1-mesa-dri libgl1-mesa-glx libgl1-mesa-swx11
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgl1-mesa-dri is already the newest version.
libgl1-mesa-glx is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libgl1-mesa-glx : Conflicts: libgl1
libgl1-mesa-swx11 : Conflicts: libgl1
E: Broken packages

neil@ubuntu:~$ find /usr -type f -name libGL\.so*
/usr/lib/mesa/libGL.so.1.2

neil@ubuntu:~$ cd /usr/lib
neil@ubuntu:/usr/lib$ sudo ln -s /usr/lib/mesa/libGL.so.6.0.12092.670880 libGL.so
neil@ubuntu:/usr/lib$ sudo ln -s libGL.so libGL.so.1

This is on 10.10
I will go over the steps again then try and run something.

I will also do this on the computer that has 11.04
__________________
Neil
http://www.nlneilson.com
nlneilson is offline   Reply With Quote
Old 07-21-2011, 10:01 AM   #19
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,615
nlneilson is on a distinguished road
Default

neil@ubuntu:~/Desktop/WorldWind$ ant worldwind.jarfile
Buildfile: build.xml

compile:
[mkdir] Created dir: /home/neil/Desktop/WorldWind/classes
[javac] Compiling 1419 source files to /home/neil/Desktop/WorldWind/classes
[javac] /home/neil/Desktop/WorldWind/src/gov/nasa/worldwind/formats/tiff/Tiff.java:206: unmappable character for encoding UTF8
[javac] // The components are stored in separate �component planes.�
[javac] ^
[javac] /home/neil/Desktop/WorldWind/src/gov/nasa/worldwind/formats/tiff/Tiff.java:206: unmappable character for encoding UTF8
...
[javac] /home/neil/Desktop/WorldWind/src/gov/nasa/worldwindx/examples/GoToCoordinatePanel.java:218: unmappable character for encoding UTF8
[javac] // eg: 123� 34' 42"S 45� 12' 30"W
[javac] ^
[javac] 13 errors

BUILD FAILED
/home/neil/Desktop/WorldWind/build.xml:52: Compile failed; see the compiler error output for details.

It looks like the degree symbol and others are causing errors at least on 10.10
If these are all in comments I don't understand why the build would fail.
In Eclipse with ant that just shows a warning.

I will try this on 11.04

I didn't know VMware worked OK with OpenGL in Windows.
I downloaded VirtualBox but have not tried that yet, I will look at Parallel later.
__________________
Neil
http://www.nlneilson.com

Last edited by nlneilson; 07-21-2011 at 10:52 AM.
nlneilson is offline   Reply With Quote
Old 07-21-2011, 12:13 PM   #20
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,615
nlneilson is on a distinguished road
Default

Same build error as above on the computer with Ubuntu 11.04.
trying
Code:
java -Xmx1024m -Dsun.java2d.noddraw=true -cp worldwind.jar:worldwindx.jar:jogl.jar:gluegen-rt.jar:gdal.jar -Djava.library.path=`pwd` gov.nasa.worldwindx.examples.dataimport.InstallImageryAndElevationsDemo
shows the WWJ frame and layer manager OK but no globe and shows this error:
Code:
Jul 21, 2011 3:48:56 AM gov.nasa.worldwind.layers.TextureTile initializeTexture
SEVERE: Exception attempting to read texture file 
javax.media.opengl.GLException: DXTn compressed textures not supported by this graphics card
	at com.sun.opengl.util.texture.Texture.checkCompressedTextureExtensions(Texture.java:987)
This computer ran WWJ apps OK on an earlier version of Ubuntu and has a Nvidia graphics.

I installed driconf but now it doesn't recognize the Nvidia graphics.
It may be that Ubuntu is trying to eliminate the need for driconf but have not gotten the graphics issues fixed.

The 32bit computer that required driconf before does not need it now and runs the WWJ apps OK on 11.04.

Or it could be caused by the build error but beginning to doubt that.
__________________
Neil
http://www.nlneilson.com

Last edited by nlneilson; 07-21-2011 at 12:28 PM.
nlneilson is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to setup WWJ Hervé Development Help 96 03-04-2013 03:42 PM
Place Name problem in Ubuntu nlneilson Development Help 14 06-23-2012 12:52 PM
WWJ app run in Ubuntu on USB flash drive. nlneilson Development Help 18 07-04-2011 05:44 PM
WWJ - Ubuntu 10.10 nlneilson Development Help 4 10-19-2010 10:03 PM
Problem in running WWJ under Ubuntu linnuxxy Development Help 19 03-20-2009 08:10 PM


All times are GMT +1. The time now is 02:39 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.