More on solving the libstdc++-libc6.1-1.so.2 issue for Opencascade for Gutsy Gibbon

April 9th, 2008

Ok… I was reflecting on last nights failure of installing the OCC documentation files.

  • I’m pretty sure, I have java setup correctly but am not positive.
  • The documentation should have have dumped into /opt/OCCTDocumentation6.2.0 directory. This didn’t happen.
    I wonder if I needed to put a sudo before entering the command line.. (worth a try)

jonas@jonas-desktop:~$ cd Opencascade_documentation
jonas@jonas-desktop:~/Opencascade_documentation$ csh
% ls
Autorun.inf install.bat OpenCASCADE_doc.tgz readme.htm
images install.csh package
% sudo csh -x install.csh
[sudo] password for jonas:
setenv JAVAHOME .
set OS_NAME=`uname`
uname
if ( Linux == SunOS ) then
if ( Linux == Linux ) then
./package/setupLinux.bin
InstallShield Wizard

Initializing InstallShield Wizard…

Preparing Java(tm) Virtual Machine…
……………………………..
……………………………..
……………………………..
……………………………..
……………………………..
……………………………..
……………………………..
……………………………..
……………………………..
.endif
% bash
jonas@jonas-desktop:~/Opencascade_documentation$ cd ..
jonas@jonas-desktop:~$ cd /
jonas@jonas-desktop:/$ ls
bin cdrom etc initrd lib media opt root srv tmp var
boot dev home initrd.img lost+found mnt proc sbin sys usr vmlinuz
jonas@jonas-desktop:/$ cd opt
jonas@jonas-desktop:/opt$ ls
jonas@jonas-desktop:/opt$ cd ..
———————————————————————————
Ok then… sudo didn’t have an effect but it still isn’t a bad thing to try.
Test #2, Did I screwed something configuring java.. On 30 Mar 08 I found some instructions on configuring Java that I deviated from in place of others that I liked better… Might as give them a try and see what happens:
Here’s the link:http://ubuntuforums.org/archive/index.php/t-556314.html
which got the info the french ubuntu site:http://doc.ubuntu-fr.org/opencascade
(1) Install c shell
sudo apt-get install csh
(2) Install Sun Java 6
sudo apt-get install sun-java6-jdk
(3) Make sure, Sun Java 6 is used:
sudo update-alternatives –config java
Set as default the one entry that contains this string:
java-6-sun
Results:
jonas@jonas-desktop:~$ sudo apt-get install sun-java6-jdk
Reading package lists… Done
Building dependency tree
Reading state information… Done
sun-java6-jdk is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
jonas@jonas-desktop:~$ sudo update-alternatives –config java
update-alternatives: unknown argument `–config’
jonas@jonas-desktop:~$ sudo update-alternatives config java
update-alternatives: unknown argument `config’
jonas@jonas-desktop:~$ man update-alternatives
jonas@jonas-desktop:~$

———————————
Need to think about this one a bit. I think I may have screwed up Java….
Time for American Idol….

Solving the libstdc++-libc6.1-1.so.2 issue for Opencascade for Gutsy Gibbon

April 8th, 2008

Ok… Researching this it seems that everyone and there uncle seems to have had this issue trying to install Opencascade on Ubuntu….
I guess this is my attempt.
Looking over the numerous threads spread across the internet this is the one it thought I pursue first:

At the bottom of the thread was this:http://www.opencascade.org/org/forum/thread_11215/
“Just FYI, this also works on Ubuntu Feisty. You also need to install libstdc++2.10-glibc2.2 then create a symbolic link from /usr/lib/libstdc++-libc6.2-2.so.3 to /usr/lib/libstdc++-libc6.1-1.so.2.
EH”
So checking stuff out.

jonas@jonas-desktop:~$ sudo updatedb
[sudo] password for jonas:
jonas@jonas-desktop:~$ locate /usr/lib/libstdc++-libc6.2-2.so.3
/usr/lib/libstdc++-libc6.2-2.so.3
jonas@jonas-desktop:~$ cd /usr/lib/libstdc++-libc6.2-2.so.3
bash: cd: /usr/lib/libstdc++-libc6.2-2.so.3: Not a directory
jonas@jonas-desktop:~$ cd /usr/lib
jonas@jonas-desktop:/usr/lib$ ls -a libstdc++-libc6.2-2.so.3
libstdc++-libc6.2-2.so.3
jonas@jonas-desktop:/usr/lib$

This has me befuddled at the moment…It appears that libstdc++-libc6.2-2.so.3 is not a folder. So what is it?? I sure there’s a way from spitting this out from the command line but using the file browser this appears to a link to a shared library( /usr/lib/libstdc++-3-libc6.2-2-2.10.0.so to be precise) Ok so I think the command line I need to to the link is:

sudo ln -s libstdc++-libc6.2-2.so.3 /usr/lib/libstdc++-libc6.1-1.so.2

Results are:

jonas@jonas-desktop:~$ sudo ln -s libstdc++-libc6.2-2.so.3 /usr/lib/libstdc++-libc6.1-1.so.2
[sudo] password for jonas:
jonas@jonas-desktop:~$ sudo updatedb
jonas@jonas-desktop:~$ locate /usr/lib/libstdc++-libc6.1-1.so.2
/usr/lib/libstdc++-libc6.1-1.so.2
jonas@jonas-desktop:~$

It looks like it took… Know the test is to run the document installation script again and see what happens:
jonas@jonas-desktop:~$ cd Opencascade_documentation
jonas@jonas-desktop:~/Opencascade_documentation$ csh
% ls
Autorun.inf images install.bat install.csh OpenCASCADE_doc.tgz package readme.htm
% cd -x install.csh
Usage: cd [-lvn] [<dir>].
% csh -x install.csh
setenv JAVAHOME .
set OS_NAME=`uname`
uname
if ( Linux == SunOS ) then
if ( Linux == Linux ) then
./package/setupLinux.bin
InstallShield Wizard

Initializing InstallShield Wizard…

Preparing Java(tm) Virtual Machine…
……………………………..
……………………………..
……………………………..
……………………………..
……………………………..
……………………………..
……………………………..
……………………………..
……………………………..
..endif
%

I guess it took..
According to the readme.htm file in the download the documentation should have dumped into /opt/OCCTDocumentation6.2.0 directory
Well it didn’t…. I did a updatedb and tried to locate OCC and well here are the results.
jonas@jonas-desktop:~/Opencascade_documentation$ locate occ
/usr/share/pixmaps/faces/soccerball.png
/usr/share/pixmaps/pidgin/emotes/default/soccerball.png
jonas@jonas-desktop:~/Opencascade_documentation$ locate OCC
/home/jonas/Desktop/OCC50_Overview.pdf
jonas@jonas-desktop:~/Opencascade_documentation$

The pdf was something I found earlier…. Ah Heck…. It didn’t error out but it didn’t do what it was supposed to do.. Time for more research….. To quote the penguins from the movie Madagascar when they reach the Antarctic… Well… this sucks…. Time for bed..

Downloading opencascade

April 6th, 2008

Ok… now that I feel confident that Java 6 is configured properly in my bash and C-shell, on to the next step.
I set up a file in my home directory:
jonas@jonas-desktop:~$ cd ..
jonas@jonas-desktop:/home$ ls
jonas
jonas@jonas-desktop:/home$ cd jonas
jonas@jonas-desktop:~$ mkdir opencascade_downloads

jonas@jonas-desktop:~$

I went to the website:http://www.opencascade.org/getocc/download/

Btw… Your going to need to registered on the open cascade site for this to work.

Options displayed should be:
Download:
Open CASCADE latest public version
Open CASCADE animated demonstrations
Sample Open CASCADE models
Clicked on Open CASCADE latest public version
The option I was interested in was the one for linux:
download for Linux users, tgz archive:

OpenCASCADE_Linux.tgz (183 Mb)
This is going to take a while more later…

I also downloaded the documentation into a separe folder and unpacked it.  I ran install csh and here are some of the issues I had:
jjonas@jonas-desktop:~$ ls
Desktop    Examples  Opencascade_documentation  Pictures  Templates
Documents  Music     opencascade_downloads      Public    Videos
jonas@jonas-desktop:~$ cd Opencascade_documentation
jonas@jonas-desktop:~/Opencascade_documentation$
jonas@jonas-desktop:~/Opencascade_documentation$ ls
Autorun.inf  install.bat  OpenCASCADE_doc.tgz  readme.htm
images       install.csh  package
jonas@jonas-desktop:~/Opencascade_documentation$ csh
% ls
Autorun.inf  install.bat  OpenCASCADE_doc.tgz  readme.htm
images       install.csh  package
% csh -x install
install: No such file or directory.
% cd -x install.csh
Usage: cd [-lvn] [<dir>].
% csh -x install.csh
setenv JAVAHOME .
set OS_NAME=`uname`
uname
if ( Linux == SunOS ) then
if ( Linux == Linux ) then
./package/setupLinux.bin
InstallShield Wizard

Initializing InstallShield Wizard…

Preparing Java(tm) Virtual Machine…
……………………………..
……………………………..
……………………………..
……………………………..
……………………………..
……………………………..
……………………………..
……………………………..
……………………………..
/tmp/isjPX8Exg/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory

endif
%

More research and a few more threads to look at:
http://www.opencascade.org/org/forum/thread_11094/

http://ubuntuforums.org/showthread.php?t=482855

http://www.mail-archive.com/ubuntu-devel-discuss@lists.ubuntu.com/msg00409.html

Even more on setting up enviroment values for C-shell for Java 6

April 6th, 2008

Ok, I still think I got good advise on plotting my course from :http://www.antbook.org/display/antbook/Installing+Java+6+on+Ubuntu+7.04 the problem seems to be in the details. (For some reason, this link keeps goes dead and then comes back). At this point, I think I can either put my configuration data either in /etc or /home/jonas. Further options are either to put in login or cshrc. I was going to put the set my environment variables in /ect/csh.cshrc and run an experiment all in one terminal session, but I ran across something in the man pages in csh which made me change my mind:
-l The shell is a login shell (only applicable if -l is the only flag specified).

-m Read .cshrc, regardless of its owner and group. This option is dangerous and should only be used by su(1).
I have no idea why this is dangerous, but at this point for where I’m at, it’s good enough for me.
Ok, here’s my experiment:
Fire up the terminal
Switch to c-shell using csh
run the “set” command (which btw doesn’t have a man page,go figure) to see what’s going on.
use sudo gedit to create /etc/csh.login and enter the following into the file:
setenv JAVA_HOME /usr/java/jdk
setenv JDK_HOME $JAVA_HOME
set -l path = ( $path $JAVA_HOME/bin )
check to see if its actual where I think it is
execute csh -l (which I think re-executes the login scripts)
execute set and see what displays.
[added on the fly go back to bash then back to csh with the same terminal session and execute “set”]

here are the results:
jonas@jonas-desktop:~$ csh
% set
argv ()
cwd /home/jonas
home /home/jonas
path (/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games /usr/java/jdk/bin)
prompt %
prompt2 ?
shell /bin/csh
status 0
term xterm
user jonas
% sudo gedit /etc/csh.login
[sudo] password for jonas:
% ls -a /etc/csh.login
/etc/csh.login
% csh -l
set: Variable name must begin with a letter.

% set
argv ()
cwd /home/jonas
home /home/jonas
path (/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games /usr/java/jdk/bin)
prompt %
prompt2 ?
shell /bin/csh
status 0
term xterm
user jonas
% bash
jonas@jonas-desktop:~$ csh
% set
argv ()
cwd /home/jonas
home /home/jonas
path (/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games /usr/java/jdk/bin /usr/java/jdk/bin)
prompt %
prompt2 ?
shell /bin/csh
status 0
term xterm
user jonas
%
Observations: Something didn’t work here or I’m not understanding something.
It looks like /usr/java/jdk/bin is in there twice…. I guess I don’t need:
set -l path = ( $path $JAVA_HOME/bin )
Now did I just permantly add this to my path? Next experiment, kill the file, shutdown and restart and see what happens.
According to antboy’s instructions (starting to get ticked here) when I executed set I should have seen:
JAVA_HOME =/usr/java/jdk
JDK_HOME =/usr/java/jdk
Which I don’t. Time for some more research.
Ok I found some useful information on enviroment variables here: https://help.ubuntu.com/community/EnvironmentVariables

printenv will display all environment variables. printenv JAVA_HOME will just display directory… (which it does). Ok… time to remove the login file (sudo rm /etc/csh.login) , shut down and restart to see if I permanently affected the path.
Ok… I just shut down and restart and here is what I got:
jonas@jonas-desktop:~$ csh
% set
argv ()
cwd /home/jonas
home /home/jonas
path (/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games /usr/java/jdk/bin)
prompt %
prompt2 ?
shell /bin/csh
status 0
term xterm
user jonas
% printenv JAVA_HOME
/usr/java/jdk
% printenv JDK_HOME
/usr/java/jdk
%

This seems to be exactly what I need. Without even creating a cshrc or login file, so I guess I’m good.Now the question I’m asking myself is: was this an excerise in futility? (I did learn a whole bunch of stuff that I didn’t know before, so I guess on that level it wasn’t)The original antbook article show how to link Java6 library. The question I’m asking myself is would the initial install have done that out of the box?? If I wind up reloading the OS from scratch I will make it a point to research this, otherwise its a mystery… All systems go for loading the opencascade library next…….

Setting up enviroment values for C-shell

April 5th, 2008

I feel like the guy whose been sort of lost driving and has been sort of reluctant to ask for directions. I keep thinking I’m almost there, but I at a point where I’m posting this on the ubuntu forum. A summary of how I got to where I’m at.

I managed to set the environment variables to the bash shell successfully per his instructions but got real confused trying to set this up for the C-shell.
In this guys instructions he talks about the “simple matter” about adding Java properties to the file: /etc/csh/login.d/java
In my personal logic leads me to think that the /etc/csh/login.d would have been created at install or when I fire up csh in terminal. I suppose I could brute for and create the sub-folders, but my gut tells me that will not work. Am I wrong? I guess these are the questions I have:

  • Is /etc/csh/login.d/ something that csh recognize out of the box?
    • Do I need to manually create the folder for the file /etc/csh/login.d/java?
      I found: The C shell tutor which talks about .cshrc .login .logout

    I think all I need to do is to plot the setenv stuff is .cshrc
    Is that correct?? Where is .cshrc located?

I posted this on Ubuntu forums…. See what happens http://ubuntuforums.org/showthread.php?t=745954

I suppose I should probably update the database and see if I can answer my own questions. To create a database with the file names in the terminal go sudo updatedb, and after that Locate filename

jonas@jonas-desktop:~$ sudo updatedb
[sudo] password for jonas:
jonas@jonas-desktop:~$ locate .cshrc
jonas@jonas-desktop:~$ locate cshrc
jonas@jonas-desktop:~$
It doesn’t seem to be there…..more research req’d hopefully someone takes pity on me.

Installing Java on Ubuntu… cont.

April 4th, 2008

Ok… I got environment variables set up for the Bash shell
I need to run some C-shell scripts so I might as well get the environment variables setup for java for the C-shell.

I was looking for some pointers,not the C type err..advice… I sort of like this link. (although that would be the name of a good post. Pointers on Pointers…. Anyway…. I wish I would have run across this link a couple of days ago…
User Environment Variable (PATH) HOWTO
Thats as far a I got tonight.

There is also a lot of good info if from terminal you go:
man csh
I considering may take an offramp on getting opencascade running and just research this Bash[Shell] and C-Shell a little bit.

Installing Java on Ubuntu… cont.

April 3rd, 2008

Continuing from yesterday. I pulled these up from antbook.org
the other recommend galternatives for alternative implementations that’s available.. Sounds cool I guess I give it a try.
sudo apt-get install galternatives
you can fire it up by typing galternatives in the terminal..
I played around with it.. Looks interesting.

According to these instructions the author suggests setting up symlink that points to:usr/lib/jvm/java-6-sun

from terminal you need to get to the root:

cd /
sudo mkdir /usr/java
sudo ln -s /usr/lib/jvm/java-6-sun /usr/java/jdk
If I understand the rational to this, I can switch to different jdk’s and and not screw around with resetting environment variables.
As I recall, I had Opencascade install melting down on the install because I wasn’t using the C-shell and BASH shells correctly.
According to the instructions I need to JDK declarations to the tail end of /etc/bash.bashrc:
export JAVA_HOME=/usr/java/jdk
export JDK_HOME=$JAVA_HOME
export PATH=$PATH:$JAVA_HOME/bin
It think I understand what’s going on here, but not positive.
Btw. It just took me about an hour to figure out but the don’t but spaces around the equal sign doh!!.. (Learn something new every day)

Now I need to create a file to set up a file for csh:
But first. Time for bed…

Btw… I called it right on American Idol…

More on Installing Java 6 on Ubuntu

April 2nd, 2008

Allright…. got a few minutes before bed…

I really like the instructions on this link: http://www.antbook.org/display/antbook/Installing+Java+6+on+Ubuntu+7.04

But…. either the sight is down your I need Java 6 installed on this page to view the page on how to install Java 6…. Hmmm… I guess I got time to fire up the XP machine and flip the switch on the KVM test with explorer and firebox… I guess the sight must be down.. Good thing I have hard copy.
I’m paraphrasing Steve Loughran’s post here:
Open office which comes with Ubuntu out of the box need gcj the gnu classpath JVM. This guy’s approach is to do a Java brain transplant…. Out with the GNU Java and in with SUN… His recommendation is you can do this via synaptic simultaneously without fighting the system…
No other instructions seem to have worked painlessly so far so lets try these:
Fire up Synaptic and search for the term java.

(Ah heck…… I still have a flag on sun-java6 flag for uninstall. When I apply it. I get this message:
“E: sun-java6-bin: Package is in a very bad inconsistent state – you should”
I should what?? When I googled this the hits seem to indicate that I should install than uninstall this package… Allright lets give that a try… It seems like mark for upgrade is only option.. Hey… a gui liscense box that actually works. Ok… lets try uninstall and remove completely including config files…. (whats the worst thing that can happen) … I guess I should save this eh?? It seems like I’m back to the beginning now..
At this point, I’m going to do a windows thing and shut everything down and reboot…
refire synaptic.
Flag for installation:
sun-java6-jdk (This automatically flags the bin and JRE)
sun-java6-fonts
sun-java6-plugin
(This is probably above beyond whats required for OCC)
scroll up Flag for removal
gcj-4.2base (instructions where old they said 4.1)
Synaptic also says it will remove:
gij
gij-4.2
libgcj-bc
libgcj-8-1
I hope this guy knows what he’s doing … here goes.
I wanted to past the result the synaptic package managers details but control-V doesn’t seem to work. It appears that all is well. Hmmm. The things that weird here is it didn’t pop up a license agreement.
Looks like I have a few more things to do according to the article…
Time for bed…

Problems installing Java 6 on Ubuntu

April 2nd, 2008

Lets see I can get this done before American Idol tonight.
Ok.. I was following the sequence of what I needed to get installed prior to running Open Cascade on Ubuntu and I had a bit of a meltdown when I tried to install the Java 6 library. From some of the things I’ve been seeing on the net, apparently I’m not alone. I looked at three references from the net that looked sort of interesting:
http://ubuntuforums.org/showthread.php?t=422692


http://www.ubuntugeek.com/how-to-install-java-runtime-environment-jre-in-ubuntu.html


http://www.antbook.org/display/antbook/Installing+Java+6+on+Ubuntu+7.04

I had printed this links from win 2000 machine running Explorer and I’m amazed how much richer they are looking at these pages in Ubuntu running on firefox. I wonder if the opposite is true. Of course, the link I really liked the antbook doesn’t seem to be working at the moment.
It uses synaptic to simultaneously take off the non-sun Java and install the Sun version.
Anyway Idol just started and I missed Brook. Darn it…
I think that I missed some magic Keystroke combination, doing what I did.
Perhaps I can find it on my output while reading Idol…
Need to figure out how to undo my partial install. I think I can do it through synaptic.
I fired up synaptic this message popped up:
E: dpkg was interrupted, you must manually run ‘dpkg –configure -a’ to correct the problem.
E: _cache->open() failed, please report.

Then I went into terminal and did the following:

jonas@jonas-desktop:~$ cd\\
bash: cd\: command not found
jonas@jonas-desktop:~$ cd..
bash: cd..: command not found
jonas@jonas-desktop:~$ cd ..
jonas@jonas-desktop:/home$ cd ..
jonas@jonas-desktop:/$ cd ..
jonas@jonas-desktop:/$ cd ..
jonas@jonas-desktop:/$ sudo dpkg –configure -a
[sudo] password for jonas:
Setting up java-common (0.26ubuntu1) …

Setting up odbcinst1debian1 (2.2.11-16) …

Setting up unixodbc (2.2.11-16) …

Setting up gcc-3.3-base (1:3.3.6-15ubuntu2) …
Setting up libstdc++5 (1:3.3.6-15ubuntu2) …

Processing triggers for libc6 …
ldconfig deferred processing now taking place
jonas@jonas-desktop:/$

Clicked the box not I got a message about a broken package. Something about needing the broken filter…

American Idol prediction. Ramielle or Christie will be voted off.

Ok ran the filter it popped up. Sun-java6-bin as broken. I ran a search on just java and it looks like nothing else java6 is loaded. I marked it for complete removal and applied the changes, hopefully I’m back to where I was. When I get a chance I want to use the antbook suggestion on how to load and see what happens.

Getting the house in order before loading Opencascade

March 31st, 2008

This is my 3’rd time that I’ve loaded the OS and started from scratch. This sort of reminds me of the movie the Matrix. Anyhow…. I’ve taken risks to see what would happen and basically couldn’t get out of the deep hole I dug. This is not a big deal when your doing this for fun but would not be fun under the gun on the clock.
Since I wiped the drive and haven’t downloaded OCC yet, I don’t have the installation instructions in front of me at the moment. As I recall they really screwed me up the last time around. I think the main thing was that the scripts that where called out required shells different from the default unbuntu bash (the GNU Bourne-Again Shell). The instructions called out to execute [ ] which requires C-shell to execute.
You’ll need to install the C-shell. To open a terminal session select Application ▸ Accessories ▸Terminal
Enter the follow:
sudo apt-get install csh
you’ll get a prompt for a password and some blah blah stuff. Answer as appriopriate. (I noticed something weird here. I tried to cut and past from my previous post into the terminal. Keystroking CTRL-C from firefox works but CTRL-V to the Terminal win does not. But, Edit▸Paste from the terminal header does work. Go figure. )
Next step
Install Sun Java 6
sudo apt-get install sun-java6-jdk
I’m on the low end of ATT dsl, so this is going to take a few minutes.
(I was screwing around listen to Nelson Manela video that comes with Ubuntu and you seem to get a license stuff at the end. So I hope I didn’t screw something up when I was bouncing between windows. If you highlight the ok line, it will let you scroll the agreement. Yikes there seems no easy way to get out of this..)
@#$@^ I just googled the command script and found this: http://www.ubuntugeek.com/how-to-install-java-runtime-environment-jre-in-ubuntu.html
Darn.. Darn.. Darn.. I don’t know if I did this because I was watching Nelson or if something goofy happen… I did a terminal reset and the screen when bizarre…. It seems like others have had issues also from the above link.. I need to investigate this further tomorrow.