Compiling OCC5.1 with g++ 3.2 and 3.3

I am running RH Linux 9 and FC1 and was not able to succesfully run the binary distribution so I am trying to recompile for my system(s). On RH9 I am running 3.2.2 compilers and on FC1 the 3.3.2. On RH9 I can get through the compilation process but then run into a typical lib version problem:
relocation error: /opt/OpenCASCADE5.1/ros/Linux/lib/libTKIGES.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference

With 3.3.2, the distribution's compilation exits with the first source file it encounters.

So before I spent another couple of days trying to figure out what is going on, let me ask the question if anyone has successfully compiled OpenCascade on g++ 3.2 and/or 3.3? Knowing it is possible would make all the difference in the world.

Theo

Jules's picture

Oh yes, I have successfully compiled and build with GCC3.3... although I have not been able to run it properly...

See topic: Porting Open Cascade to OS X.3

Theo's picture

Jules:

What type of run-time errors did you encounter?

Theo

Jules's picture

Well I can get draw to work, but it does not quit properly.
I can't get Extended Draw to work at all because of memory allocation issue
And I can only run it from the computer on which I installed it. When I try to use X11 ( on mac os X) from another machine to run it, it says "This isn't a Tk Application".

Any hint?

Theo's picture

Well, I haven't been able to compile it yet on gcc 3.3 on FC1. I was able to compile with 3.2 on RH9 but there I still have a shared library issue. I probably going to drop the RH9 issue and move on to FC1, so your success in compiling it gives me impetus to go and dive into the source code. Once I am as far as you are, I certainly will try to hold up my end of the bargain.

I am most interested in getting OCC running on my cluster which is based on FC1 and than to get Salome up and running and after that put a distributed system solver to work within this OCC/Salome framework.

What are you trying to accomplish on OS X?

venkat's picture

I was getting the same error on RH9/occ5.1/gcc3.2.2 built with makefiles. I rebuilt everything using the wok generated scripts and now I don't get any errors. I've also built occ5.1 on MacOS 10.2/gcc3.3 but am getting crashes.

Theo's picture

Venkat:

Would you be so kind to elaborate on the sentence:
"I rebuilt everything using the wok generated scripts...."

Right now I am trying to approach suggested by www.stellarscience.com, but their little program doesn't do UNIX yet, so I am trying to port it and see if I can make it work on FC1.

venkat's picture

It is there in the docs under the title "Building Modules". You need to use the scripts in the $CASROOT/adm/Linux directory, I know it works with gcc 3.2.2 under rh9.  Some files are missing (I know "init" for one), I had extracted it from the source files for the sun platform.

In case you are also building Salome, can I request you to send me a url for downloading med2.1.6, I am getting compile errors as I am able to get only med2.1.5 from the code aster web site.

Theo's picture

Venkat:

Just a heads up that I won't be able to work on this today. However, I can fill you in on what I am trying to do and how I go about it: I tried to compile OCC and Salome on both RH9 and FC1, and was unsuccessful with either. Now I am diving in to figure out what is the problem. I like the stellarscience approach so I am working on the Linux port of their script. This will hopefully get me a more easily navigatable code structure. Once I got that script going I will first try to get OCC compiling and working before I attempt to do the same with Salome. A parallel attack is to rebuild a drive with a Linux distribution that is supported by the current OCC, and since I value the cross platformness I was also planning to bring it up under WinXP with .NET. So you can see that I probably have a couple of weeks of partime work to get just OCC up and running on WinXP/.NET and FC1/gcc3.3. That was a long winded explanation of why I probably are not the best source for answering any Salome requests yet, :-).

What are your goals for OCC/Salome?

venkat's picture

Could you please tell us what error you get with gcc3.3? Did you try bootstrapping with latest autotools and then compile?

Jules's picture

Venkat:

You said that you build OC5.1 on os X.2 with GCC3.3
So what kind of crashed are you experiencing.

I built it on OS X.3 with GCC3.3 and it runs draw... but I still have some memory allocation problems with only Extended Draw as I explained in my topic "Porting OC5.1 on OS X.3"
could we talk more about that in that topic please?

Also you mentioned using WOK scripts. I am not sure how they work cuz I did not try that possibility. But first of all is that what you used to build on OS X.2? And secondly what is the procedure to build using WOK?

Please let me know....

Jules

venkat's picture

Jules:
WOK scripts are provided only for Linux & Sun, so they are not an option for OS X.

I used the wok scripts to build on RH9 but on OS X.2, I used the Makefiles. You can get detailed description about using wok scripts in "Building Modules" under "Welcome to Open CASCADE5.1" in the docs.

Please also see my reply in the thread "Porting OC5.1 on OS X.3"

Forum supervisor's picture

Dear Users,

We have been tracking your discussions with interest and are pleased to see your insightful comments exchange.
Please be aware that by next public version of Open CASCADE Technology 5.2 (due out by June-July) we plan to introduce support of upgraded configurations. In particular, some upgrades have been already made available in the 5.1.x maintenance releases:
- support of gcc 3.2 and Red Hat Linux 8 and Mandrake 8 in 5.1.1
- support of new STL streams on Windows and Linux in 5.1.1 and 5.1.2
- support of WinXP in 5.1.2
We also preliminarily plan to introduce initial support of .NET in 5.2.

Hope you can benefit from this information.

Best regards,
Forum supervisor

lsj's picture

Nice, with STL stream should gcc3.3 and gcc3.4 work:-).

What about tcl/tk 8.4 because that was my main problem to get OCC5.1 running on Gentoo (FC2 is also using 8.4) hack it to use STL via ImproveCascade. Install Tcl/tk 8.3 in OCC dir. and got XDRAW to work.
Tcl/tk 8.4.* is the problem:
c++ const prototype problems and running X*DRAW: can't import command "mc": already exists

Lars

julien tersac's picture

hello,

I'm also running gentoo linux and I managed to complile occ with gcc 3.3 and tcl 8.4.5.
The c++ const prototype problem can be solved quite easily : simply add -DUSE_NON_CONST to your CXXFLAGS and CPPFLAGS in the following Makefiles ( adm/make/TKDraw/Makefile, adm/make/TKWOKTcl/Makefile). This will change the behaviour of tcl about const :-). Also do not forget to change the environment script.

I also get the X*DRAW: can't import command "mc": already exists message. However X*DRAW seems to work well. I can't say for sure as I didn't truly use it. My primary goal was to test Salome but I'm runing into trouble when I compile SALOME_PYQT.

julien tersac's picture

hello,

I'm also running gentoo linux and I managed to complile occ with gcc 3.3 and tcl 8.4.5.
The c++ const prototype problem can be solved quite easily : simply add -DUSE_NON_CONST to your CXXFLAGS and CPPFLAGS in the following Makefiles ( adm/make/TKDraw/Makefile, adm/make/TKWOKTcl/Makefile). This will change the behaviour of tcl about const :-). Also do not forget to change the environment script.

I also get the X*DRAW: can't import command "mc": already exists message. However X*DRAW seems to work well. I can't say for sure as I didn't truly use it. My primary goal was to test Salome but I'm runing into trouble when I compile SALOME_PYQT.

venkat's picture

Julien:

I am trying to build Salome on RH9 and am getting compile errors in MED as I am able to find only med2.1.5. Can I request you to send a link where I can download med2.1.6.

Venkat (venkat70@seapeople.org)

venkat's picture

Julien:

I am trying to build Salome on RH9 and am getting compile errors in MED as I am able to find only med2.1.5. Can I request you to send a link where I can download med2.1.6.

Venkat (venkat70@seapeople.org)

julien tersac's picture

hello Venkat,

Seems to be a ghost library.
Anyway, go to Salome download page and download the whole cd (400Mb). If the archive is not broken, you should find there med2.1.6.

venkat's picture

Julien:

Would you be so kind to send me med2.1.6 by email at venkat70@seapeople.org. I have a dial-up connection, so cannot download 400mb. On the Code-Aster site, I am able to get only med2.1.5.

venkat

Jules's picture

Still no support for Mac/Darwin hein???

Anyways we are working on it (see topic "Porting OCC5.1 on OS X.3")
I think OCC5 will be complete when it also runs on mac. That way, on the G5 it will smoke!!!

I hope our attempts will be considered at some point.

Jules

Jules's picture

I think that the files of Opencascade should be written les dependently of X11.

Because while porting to OS X I wanted to get around X11 and make it use the Tcl/Tk Aqua to display with the natural environment of Mac , but I could not and I have to start over again, install fink and and the Tcl/Tk paquages etc...

Please consider this doing this to make it easier and more flexible for Mac OS X...

Thanks

Jules

MGlas's picture

Dear supervisor,
Maybe you could give out some more detais about the planned features of the upcoming 5.2 release, especially concerning up to date Linux platforms (will qt3 be supported?).

THX in advance!
Martin

MGlas's picture

Dear supervisor,
Maybe you could give out some more detais about the planned features of the upcoming 5.2 release, especially concerning up to date Linux platforms (will qt3 be supported?).

THX in advance!
Martin

MGlas's picture

Dear supervisor,
Maybe you could give out some more detais about the planned features of the upcoming 5.2 release, especially concerning up to date Linux platforms (will qt3 be supported?).

THX in advance!
Martin

MGlas's picture

Dear supervisor,
Maybe you could give out some more detais about the planned features of the upcoming 5.2 release, especially concerning up to date Linux platforms (will qt3 be supported?).

THX in advance!
Martin

Forum supervisor's picture

Dear Martin,

5.2 will certainly accumulate all the features appeared in the maintenance releases 5.1.1 - 5.1.3 (consult Release Notes at http://www.opencascade.org/getocc/whatsnew/) with possibly some other features.
Thus, it will support RH 8 and Mandrake 8 (see more details in this thread above, message of Apr 27). We also plan to port our samples to Qt 3.2 and experimentally introduce .NET support.

With best regards,
Forum supervisor

MGlas's picture

Thanks for the information.
I still would like to know, why the recent releases like Mandrake 10 or FC2 (debian 3, SuSE 9.1) are not supported.
It's getting difficult to find Mandrake 8 isos ;-)
Thanks in advance
and best regards,
Martin
PS: Sorry for sending my posting several times (possibly a browserproblem on my side).

Forum supervisor's picture

Hello Martin,

Obviously we make efforts to syncronize system configurations with demands of our customers. This is why we have upgraded to RedHat and Mandrake 8 (and not higher). This also explains why we start migrating to .NET and withdrew in the past official support of HP-UX, IBM AIX, SGI Irix, and DEC AOSF.
Nonetheless, we are still offering services on supporting particular configurations and some our clients benefit from them.
Should you need a support of some fresh Linux release get in touch with our team at marketing.contact@opencascade.com.

Hope this helps.

Best regards,
Forum supervisor