Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Open CASCADEShowroomGet Open CASCADEDeveloper CornerSupportAbout us
Technical overview
Areas of use
Advantages
Public license
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
System requirements
What's new
Download Center
CD-ROM
Documentation
Getting started
Forum
Open Source community
Training and e-learning
A la Carte Support
Value-added software
Client Area
Company Profile
Contacts and Locations
Customers
News
Home / Developer Corner / Forum / OPenCascade6.2 compilation error on Ubuntu 8.04

Forum

OPenCascade6.2 compilation error on Ubuntu 8.04
Venugopal Gudimetla 2008-05-22 13:19
Hi,
I am trying to install OpenCascade6.2 on Ubuntu Linux. I got a compilation error :
../../../src/Draw/Draw.cxx:317: error: 'Tcl_DString' does not name a type
../../../src/Draw/Draw.cxx:321: error: 'command' was not declared in this scope
make[2]: *** [Draw.lo] Error 1
I have Tcl installed, But I don't know how I can rectify this problem, could any of you please help ?

Thanks,
Venu
Hugues 2008-05-22 19:37
How do you install OpenCascade ?

Personally I have successfully installed Occ on Ubuntu 8.04, g++ 4.2.3.
Here are the steps I followed :
1. install package sun-java6-bin (or later), type : sudo apt-get install sun-java6-bin
3. cd in $occdir/Linux
4. type : java -cp setup.jar run

And that should be done.
Venugopal Gudimetla 2008-05-22 21:28

Hi Hugues,

I was following a diffeent route, I am not sure if what I am doing is the right way. But I did these steps:
1. in ros dir: ./configure
2. make

I had problems initially compiling, but many modules got built after fixing couple of problems, except when I got that error.

If what I am doing is wrong, could you please tell me as what modules will I need to install for CAD application development? and I will follow your steps of installation.
Thanks,
Venu
Hugues 2008-05-22 22:38
I think you should use the OpenCascade's java installer, it makes setup very easy.
That done, check if you can compile/link a small project that is using OpenCascade's libs.
If you get compilation errors, define these compiler directives :
HAVE_CONFIG_H
HAVE_FSTREAM
HAVE_IOSTREAM
HAVE_LIMITS_H

You will surely have to link against these libs :
TKBrep
TKernel
TKG2d
TKG3d
TKGeomAlgo
TKGeomBase
TKMath
TKOpenGl
TKPrim
TKService
TKV2d
TKV3d
TKXSBase

And maybe IGES and STEP packages, if your application needs them ...

After that if you have a strange linking error due to a missing C++ standard library (libstdc++.so.5), you might try to make a link to your current version of libstdc++ (take a look in your /usr/lib folder).
link -s /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so.5 (assuming version 6 of your current libstdc++)
Venugopal Gudimetla 2008-05-23 00:39
Hugues, Thanks a lot for your help. I should be able to make it work. I tried installing using set.jar, it worked! along with examples.
Adam Powell 2008-05-28 02:48
You can also try my .deb packages for OpenCascade:
http://lyre.mit.edu/~powell/opencascade/
6.2-3 is the latest version, I uploaded it to the Debian NEW queue a week and a half ago so I should have a reply soon... I'm hoping it will get into Debian Lenny, and Ubuntu Intrepid Ibex.

If you're on an amd64 machine, you can install them directly, otherwise get the .orig.tar.gz, .diff.gz and .dsc files and do:
dpkg-source -x opencascade_6.2-3.dsc
cd opencascade-6.2
dpkg-buildpackage
That will either build the package or tell you what other packages you need to install in order to do so.

I believe it works on Ubuntu Hardy Heron.

-Adam
Venugopal Gudimetla 2008-05-29 06:46

Thanks Adam, I tried your deb package too, I was able to build it. As a matter of fact, I made a mistake while building, I didn't setup my environment variables by running env.[ksh csh] which is why it wasn't able to find TCL/TK include files and libs. Your package was helpful as I was able to compile and install it on Ubuntu 8.04.I could in fact install it as it was as you indicated, but I had problems with libstdc++.so.6. I guess your binaries/libraries were built using libstdc++.so.5, I had lib clashing problems on my system. And even though I ran ldconfig, I wasn't able to resolve my problem, hence the need for a build.
Regards,
Venu
Adam Powell 2008-06-02 17:31
Hello Venu,

It's odd that you had trouble with libstdc++, given the dependencies of the packages. (I don't think my system even has libstdc++.so.5.) The library has:

Depends: libc6 (>= 2.7-1), libgcc1 (>= 1:4.1.1-21), libgl1-mesa-glx | libgl1, libglu1-mesa | libglu1, libstdc++6 (>= 4.2.1-4), libx11-6, libxext6, libxmu6, tcl8.4 (>= 8.4.16), tk8.4 (>= 8.4.16)

I've heard other success reports on Ubuntu 8.04, and want this to be installable there. Can you post or send me (hazelsct@debian.org) the error message you saw when trying to install this?

Thanks,
Adam
Venugopal Gudimetla 2008-06-02 22:20
Hi Adam, I shall try to recreate the problem again, one reason could be that I have both libstdc++.so.6 and libstdc++.so.5 on my machine in /usr/lib. The Debain package was compiled using libstdc++.so.5? so I had to fool my linker to accept libstdc++.so.6 as libstdc++.so.5 . But I shall mail you the error once I recreate it.
Venu
Adam Powell 2008-06-05 16:41
No, the Debian package was compiled using libstdc++.so.6.

I just checked every lib file in the package using ldd, and they all point to libstdc++.so.6.

Why do you think it is linked to .5? What does ldd tell you about the lib files in my package?
Venugopal Gudimetla 2008-06-08 23:45
Hi Powell,
You are correct, I checked the your built libraries, they all point to libstdc++so.6. I was bit confused, the original OCC libraries that I downloaded were pointing to libstdc++.so.5. Since I downloaded your built package and OCC at the same time, It led my confusion. Indeed it is your libraries that I am using now. I had trouble installing official OCC because of the library version differences. Everytime I run OCC examples using official built libraries I get a message :

"/usr/bin/ld: warning: libstdc++.so.5, needed by /opt/OpenCASCADE6.2.0/ros/Linux/lib/libTKernel.so, may conflict with libstdc++.so.6"

However, I don't this message with your built and I don't have any problems now.
Thanks,
Venu
 
 
Latest news
  • Open CASCADE Technology 6.3
  • SolidWorks Import by Datakit
  • UG NX Import by Datakit

  • © Open CASCADE 2000 - 2008  |  Search  |  Contacts