Compilation on Fedora Core 5.0

Hi. I'm trying to build OpenCASCADE 6.1.0 on my Fedora Core 5.0 system. I have gcc-4.1.1-1.fc5. The configuration utility (ros/configure) ran fine, but when I try to make I get the following error:

../../../drv/Dico/Dico_DictionaryOfInteger_0.cxx: In function 'Handle_Standard_Type& Dico_DictionaryOfInteger_Type_()':
../../../drv/Dico/Dico_DictionaryOfInteger_0.cxx:52: error: 'Standard_Transient_Type_' was not declared in this scope
make[3]: *** [Dico_DictionaryOfInteger_0.lo] Error 1
make[3]: Leaving directory `/home/kip/occ/ros/adm/make/TKernel'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/kip/occ/ros/adm/make'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kip/occ/ros'

I have dual 64-bit Athlon processors.

My ultimate goal is to get IGES and STEP support in Netgen, which requires OpenCASCADE integration. I was able to install the OCC 6.1.0 binary package with no problem, but when I tried to link it into Netgen I got incompatible library errors. The Netgen developer thinks this is because my 64-bit Netgen installation won't work with 32-bit OCC libraries. So I thought if I built OCC from source I could get the 64-bit libraries. Is there an easier way anyone is aware of?

Thanks in advance for any help!

Best regards,
Kip Ingram

Jan Brüninghaus's picture

Have you tried an older version of gcc? 4.1.1. ist very new. The C++ part of gcc is known to change a lot from version to version. So programms that worked with an older version might fail to compile with a newer one, since newer versions are more strict to the C++-standard.

Tourde's picture

Hello,

I have the same problem here on an x86 gentoo box. I am also using gcc-4.1.1
Did you find any solution to the problem?

KipIngram2's picture

Yes, an engineer at OpenCascade resolved the issue. Add -ffriend-injection and -fpermissive to the CXXFLAGS in the primary makefile. I did this earlier this morning and the build was successful. Now, however, I can't find my new libraries. It says that it put them under /usr/local/lib, but they are not there.

Austin Schuh's picture

Thanks for the information. I had trouble with this also. I had trouble figuring out where to put the flags you mentioned, and I thought that I would record what I did here to help others.

I edited "ros/configure", and in my version on line 1927, it said:
CXXFLAGS="$CXXFLAGS "

I added the flags that you suggested so that the line now said:
CXXFLAGS="$CXXFLAGS -ffriend-injection -fpermissive"

This worked nicely.

EH's picture

To add to the statement above, this works well on a Core 2 Duo system running Ubuntu Feisty as well.

Gregor Veble's picture

I encountered the same problem and the fix suggested works. Ubuntu 7.10.

Ralf Schneider's picture

I encountered the same problem trying to rebulid OpenCascade 6.2.0 under Fedora 7 (Moonshine) for x86_64.

The fix suggested also works here.

Andrey Babanin's picture

This solution also helped to build OpenCascade 6.2 port on FreeBSD 7.0-RC1.