error building on linux

hi I get the following when building on linux

make[3]: Leaving directory `/space1/FEM/sources/opencascade/ros/adm/make/TKHLR'
Making all in TKMesh
make[3]: Entering directory `/space1/FEM/sources/opencascade/ros/adm/make/TKMesh'
if /bin/sh ../../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -Iyes -DHAVE_TBB -I../../../inc -I../../../drv/MeshDS -I../../../src/MeshDS -I../../../drv/BRepMesh -I../../../src/BRepMesh -I../../../drv/MeshAlgo -I../../../src/MeshAlgo -I../../../drv/IntPoly -I../../../src/IntPoly -DNDEBUG -DNo_Exception -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -MT BRepMesh_FastDiscret.lo -MD -MP -MF ".deps/BRepMesh_FastDiscret.Tpo" \
-c -o BRepMesh_FastDiscret.lo `test -f '../../../src/BRepMesh/BRepMesh_FastDiscret.cxx' || echo './'`../../../src/BRepMesh/BRepMesh_FastDiscret.cxx; \
then mv ".deps/BRepMesh_FastDiscret.Tpo" ".deps/BRepMesh_FastDiscret.Plo"; \
else rm -f ".deps/BRepMesh_FastDiscret.Tpo"; exit 1; \
fi
g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -Iyes -DHAVE_TBB -I../../../inc -I../../../drv/MeshDS -I../../../src/MeshDS -I../../../drv/BRepMesh -I../../../src/BRepMesh -I../../../drv/MeshAlgo -I../../../src/MeshAlgo -I../../../drv/IntPoly -I../../../src/IntPoly -DNDEBUG -DNo_Exception -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -MT BRepMesh_FastDiscret.lo -MD -MP -MF .deps/BRepMesh_FastDiscret.Tpo -c ../../../src/BRepMesh/BRepMesh_FastDiscret.cxx -fPIC -DPIC -o BRepMesh_FastDiscret.lo
../../../inc/BRepMesh_DataMapOfVertexInteger.hxx: In copy constructor 'BRepMesh_FastDiscret::BRepMesh_FastDiscret(const BRepMesh_FastDiscret&)':
../../../inc/BRepMesh_DataMapOfVertexInteger.hxx:101: error: 'BRepMesh_DataMapOfVertexInteger::BRepMesh_DataMapOfVertexInteger(const BRepMesh_DataMapOfVertexInteger&)' is private
../../../inc/BRepMesh_FastDiscret.hxx:103: error: within this context
../../../inc/BRepMesh_DataMapOfShapePairOfPolygon.hxx:102: error: 'BRepMesh_DataMapOfShapePairOfPolygon::BRepMesh_DataMapOfShapePairOfPolygon(const BRepMesh_DataMapOfShapePairOfPolygon&)' is private
../../../inc/BRepMesh_FastDiscret.hxx:103: error: within this context
../../../inc/BRepMesh_DataMapOfShapePairOfPolygon.hxx:102: error: 'BRepMesh_DataMapOfShapePairOfPolygon::BRepMesh_DataMapOfShapePairOfPolygon(const BRepMesh_DataMapOfShapePairOfPolygon&)' is private
../../../inc/BRepMesh_FastDiscret.hxx:103: error: within this context
../../../inc/BRepMesh_DataMapOfIntegerPnt.hxx:101: error: 'BRepMesh_DataMapOfIntegerPnt::BRepMesh_DataMapOfIntegerPnt(const BRepMesh_DataMapOfIntegerPnt&)' is private
../../../inc/BRepMesh_FastDiscret.hxx:103: error: within this context
../../../inc/BRepMesh_DataMapOfFaceAttribute.hxx:105: error: 'BRepMesh_DataMapOfFaceAttribute::BRepMesh_DataMapOfFaceAttribute(const BRepMesh_DataMapOfFaceAttribute&)' is private
../../../inc/BRepMesh_FastDiscret.hxx:103: error: within this context
../../../inc/TColStd_IndexedMapOfInteger.hxx:97: error: 'TColStd_IndexedMapOfInteger::TColStd_IndexedMapOfInteger(const TColStd_IndexedMapOfInteger&)' is private
../../../inc/BRepMesh_FastDiscret.hxx:103: error: within this context
../../../inc/BRepMesh_DataMapOfIntegerListOfXY.hxx:101: error: 'BRepMesh_DataMapOfIntegerListOfXY::BRepMesh_DataMapOfIntegerListOfXY(const BRepMesh_DataMapOfIntegerListOfXY&)' is private
../../../inc/BRepMesh_FastDiscret.hxx:103: error: within this context
../../../inc/TopTools_DataMapOfShapeReal.hxx:104: error: 'TopTools_DataMapOfShapeReal::TopTools_DataMapOfShapeReal(const TopTools_DataMapOfShapeReal&)' is private
../../../inc/BRepMesh_FastDiscret.hxx:103: error: within this context
../../../inc/TopTools_ListOfShape.hxx:112: error: 'TopTools_ListOfShape::TopTools_ListOfShape(const TopTools_ListOfShape&)' is private
../../../inc/BRepMesh_FastDiscret.hxx:103: error: within this context
../../../src/BRepMesh/BRepMesh_FastDiscret.cxx: In member function 'void BRepMesh_FastDiscret::Perform(const TopoDS_Shape&)':
../../../src/BRepMesh/BRepMesh_FastDiscret.cxx:187: note: synthesized method 'BRepMesh_FastDiscret::BRepMesh_FastDiscret(const BRepMesh_FastDiscret&)' first required here
../../../src/BRepMesh/BRepMesh_FastDiscret.cxx:187: error: initializing argument 3 of 'Function tbb::parallel_for_each(InputIterator, InputIterator, Function) [with InputIterator = __gnu_cxx::__normal_iterator > >, Function = BRepMesh_FastDiscret]'
make[3]: *** [BRepMesh_FastDiscret.lo] Error 1
make[3]: Leaving directory `/space1/FEM/sources/opencascade/ros/adm/make/TKMesh'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/space1/FEM/sources/opencascade/ros/adm/make'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/space1/FEM/sources/opencascade/ros'
make: *** [all] Error 2

sources from OpenCASCADE650.tar.gz

any suggestions?

thanks for your help
Steve

Attachments: 
Mark's picture

I see you have '-Iyes' as an include directory. You probably configured using '--with-blah' instead of '--with-blah=DIR'.

That may not be the cause of this error, but it will cause problems at some point during compilation.

'grep CSF.*[IL]yes/ config.log' should give you a hint as to which configure switch to change.

What version of gcc are you using?

steviebear25's picture

Thanks for the reply, the configure options I am using are

flags="--with-gl-include=/usr/include --with-gl-library=/usr/lib"
flags="$flags --with-xmu-include=/usr/X11R6/include/X11"
flags="$flags --with-xmu-library=/usr/X11R6/lib"
flags="$flags --with-tcl=/usr/lib"
flags="$flags --with-tk=/usr/lib"
flags="$flags --with-tbb-include =/usr/include/tbb"
flags="$flags --with-tbb-library=/usr/lib/tbb"
flags="$flags --with-freetype=/usr/include/freetype"
flags="$flags --with-ftgl=/usr/ftgl-2.1.2"
flags="$flags --with-gl2ps=/usr/gl2ps-1.3.5"
flags="$flags --with-freeimage=/usr/lib/libfreeimage"
flags="$flags --disable-debug --enable-production"
flags="$flags --enable-draw=yes"
flags="$flags --with-qt=/usr/lib/qt4"
./configure $flags

the version of gcc is
backup:/space1/FEM/sources/opencascade/ros # gcc --version
gcc (GCC) 4.2.1 (SUSE Linux)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

running the grep command suggested gave no output

Thanks for the help
Steve

steviebear25's picture

after some more looking in the log file I have found the yes

CSF_TBB_INCLUDES='-Iyes -DHAVE_TBB'

however the TBB options passed to configure are

flags="$flags --with-tbb-include =/usr/include/tbb"
flags="$flags --with-tbb-library=/usr/lib/tbb"

so I guess the next place is to check is the configure script itself.

Thanks

Steve

Mark's picture

That's strange! I'm not sure what to suggest.

Mark

steviebear25's picture

solved the problem with the yes, there was a space before the = sign in "--with-tbb-include =/usr/include/tbb"
now rebuilding to see if this fixes the original problem

Thanks for the help

Steve

Denis Barbier's picture

There is a spurious space beween --with-tbb-include and =/usr/include/tbb

Denis Barbier's picture

First errors are similar to
http://stackoverflow.com/questions/1561007/c-error-when-have-private-cop...
It compiles with more recent gcc, but it would certainly better to make operator= private, if this is possible.
Same with TBB errors, IIRC it compiles fine with a more recent gcc version.

Rebeka Fox's picture

I am having this exact same problem and I can't resolve it; I am compiling with gcc-4.5.1 for Fedora 14. I am building this so I can use Salome. What exactly will I loose by not compiling with tbb? Can I safely modify the source? I am pretty new to linux and this is all a little weird to me!

My appologies if I should have started another thread,

Rebeka

Rebeka Fox's picture

Just to be clear I am referring to the initial problem with BRepMesh and private. I did build the TKMesh module before I opted in for tbb.

Denis Barbier's picture

That's really weird, TBB should have nothing to do with the initial problem, are you sure that you can reliably reproduce this behavior?
You can move into ros/adm/make/TKMesh and copy/paste the g++ line found in the original report, with and without -DHAVE_TBB.

Rebeka Fox's picture

Well I will run through again with both. I'm sorry but I haven't been seeing any reports in any of the folders and am only given the option to save one at the end. If there is an option to have reports exported during build I am unaware of it.

flags

CXXFLAGS="-m64 -D_OCC64 -ffriend-injection -fpermissive"
CFLAGS="-m64 -D_OCC64"

../ros/configure
--with-tcl=/usr/lib64/tcl8.5
--with-tk=/usr/lib64/tk8.5
--with-gl-include=/usr/include/GL
--with-gl-library=/usr/lib64
--with-xmu-include=/usr/include
--with-xmu-library=/usr/lib64
--with-java-include=/usr/local/gcc42/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/include
--with-x=yes
--x-includes=/usr/include/xorg
--x-libraries=/usr/lib64/xorg
--with-gl2ps=/usr/include
--with-ftgl=/usr/include/ftgl
--with-freeimage=/usr/include
--with-tbb=yes
--with-tbb-include=/usr/include/tbb
--with-tbb-library=/usr/lib64
--with-qt=yes
--with-qt=/usr/bin
--enable-debug=no
--enable-production=yes
--enable-draw=yes

I will post as it becomes available and if you happen to see something during this time and correct it, well all the better this is a very time consuming process.

Rebeka Fox's picture

Here is my config.log w/ tbb

config.log

Rebeka Fox's picture

It didn't like my link much http://www.entangled-logik.com/config.log

Denis Barbier's picture

Now try this:
cd adm/make/TKMesh
make BRepMesh_FastDiscret.lo
Does this command fail? Can you copy/paste the full output?

Rebeka Fox's picture

if /bin/sh ../../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../../ros/adm/make/TKMesh -I../../.. -I/usr/include/tbb -DHAVE_TBB -I../../../../ros/inc -I../../../../ros/drv/MeshDS -I../../../../ros/src/MeshDS -I../../../../ros/drv/BRepMesh -I../../../../ros/src/BRepMesh -I../../../../ros/drv/MeshAlgo -I../../../../ros/src/MeshAlgo -I../../../../ros/drv/IntPoly -I../../../../ros/src/IntPoly -I/usr/local/gcc42/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/include -D_OCC64 -m64 -DNDEBUG -DNo_Exception -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -MT BRepMesh_FastDiscret.lo -MD -MP -MF ".deps/BRepMesh_FastDiscret.Tpo" \
-c -o BRepMesh_FastDiscret.lo `test -f '../../../../ros/src/BRepMesh/BRepMesh_FastDiscret.cxx' || echo '../../../../ros/adm/make/TKMesh/'`../../../../ros/src/BRepMesh/BRepMesh_FastDiscret.cxx; \
then mv ".deps/BRepMesh_FastDiscret.Tpo" ".deps/BRepMesh_FastDiscret.Plo"; \
else rm -f ".deps/BRepMesh_FastDiscret.Tpo"; exit 1; \
fi
g++ -DHAVE_CONFIG_H -I. -I../../../../ros/adm/make/TKMesh -I../../.. -I/usr/include/tbb -DHAVE_TBB -I../../../../ros/inc -I../../../../ros/drv/MeshDS -I../../../../ros/src/MeshDS -I../../../../ros/drv/BRepMesh -I../../../../ros/src/BRepMesh -I../../../../ros/drv/MeshAlgo -I../../../../ros/src/MeshAlgo -I../../../../ros/drv/IntPoly -I../../../../ros/src/IntPoly -I/usr/local/gcc42/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/include -D_OCC64 -m64 -DNDEBUG -DNo_Exception -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -MT BRepMesh_FastDiscret.lo -MD -MP -MF .deps/BRepMesh_FastDiscret.Tpo -c ../../../../ros/src/BRepMesh/BRepMesh_FastDiscret.cxx -fPIC -DPIC -o BRepMesh_FastDiscret.lo
In file included from ../../../../ros/drv/BRepMesh/BRepMesh_FastDiscret.jxx:59:0,
from ../../../../ros/drv/BRepMesh/BRepMesh_FastDiscret.ixx:6,
from ../../../../ros/src/BRepMesh/BRepMesh_FastDiscret.cxx:6:
../../../../ros/inc/BRepMesh_DataMapOfVertexInteger.hxx: In copy constructor 'BRepMesh_FastDiscret::BRepMesh_FastDiscret(const BRepMesh_FastDiscret&)':
../../../../ros/inc/BRepMesh_DataMapOfVertexInteger.hxx:101:21: error: 'BRepMesh_DataMapOfVertexInteger::BRepMesh_DataMapOfVertexInteger(const BRepMesh_DataMapOfVertexInteger&)' is private
../../../../ros/inc/BRepMesh_FastDiscret.hxx:103:50: error: within this context
../../../../ros/inc/BRepMesh_DataMapOfShapePairOfPolygon.hxx:102:21: error: 'BRepMesh_DataMapOfShapePairOfPolygon::BRepMesh_DataMapOfShapePairOfPolygon(const BRepMesh_DataMapOfShapePairOfPolygon&)' is private
../../../../ros/inc/BRepMesh_FastDiscret.hxx:103:50: error: within this context
../../../../ros/inc/BRepMesh_DataMapOfShapePairOfPolygon.hxx:102:21: error: 'BRepMesh_DataMapOfShapePairOfPolygon::BRepMesh_DataMapOfShapePairOfPolygon(const BRepMesh_DataMapOfShapePairOfPolygon&)' is private
../../../../ros/inc/BRepMesh_FastDiscret.hxx:103:50: error: within this context
../../../../ros/inc/BRepMesh_DataMapOfIntegerPnt.hxx:101:21: error: 'BRepMesh_DataMapOfIntegerPnt::BRepMesh_DataMapOfIntegerPnt(const BRepMesh_DataMapOfIntegerPnt&)' is private
../../../../ros/inc/BRepMesh_FastDiscret.hxx:103:50: error: within this context
../../../../ros/inc/BRepMesh_DataMapOfFaceAttribute.hxx:105:21: error: 'BRepMesh_DataMapOfFaceAttribute::BRepMesh_DataMapOfFaceAttribute(const BRepMesh_DataMapOfFaceAttribute&)' is private
../../../../ros/inc/BRepMesh_FastDiscret.hxx:103:50: error: within this context
../../../../ros/inc/TColStd_IndexedMapOfInteger.hxx:97:21: error: 'TColStd_IndexedMapOfInteger::TColStd_IndexedMapOfInteger(const TColStd_IndexedMapOfInteger&)' is private
../../../../ros/inc/BRepMesh_FastDiscret.hxx:103:50: error: within this context
../../../../ros/inc/BRepMesh_DataMapOfIntegerListOfXY.hxx:101:21: error: 'BRepMesh_DataMapOfIntegerListOfXY::BRepMesh_DataMapOfIntegerListOfXY(const BRepMesh_DataMapOfIntegerListOfXY&)' is private
../../../../ros/inc/BRepMesh_FastDiscret.hxx:103:50: error: within this context
../../../../ros/inc/TopTools_DataMapOfShapeReal.hxx:104:21: error: 'TopTools_DataMapOfShapeReal::TopTools_DataMapOfShapeReal(const TopTools_DataMapOfShapeReal&)' is private
../../../../ros/inc/BRepMesh_FastDiscret.hxx:103:50: error: within this context
../../../../ros/inc/TopTools_ListOfShape.hxx:112:21: error: 'TopTools_ListOfShape::TopTools_ListOfShape(const TopTools_ListOfShape&)' is private
../../../../ros/inc/BRepMesh_FastDiscret.hxx:103:50: error: within this context
../../../../ros/src/BRepMesh/BRepMesh_FastDiscret.cxx: In member function 'void BRepMesh_FastDiscret::Perform(const TopoDS_Shape&)':
../../../../ros/src/BRepMesh/BRepMesh_FastDiscret.cxx:187:64: note: synthesized method 'BRepMesh_FastDiscret::BRepMesh_FastDiscret(const BRepMesh_FastDiscret&)' first required here
../../../../ros/src/BRepMesh/BRepMesh_FastDiscret.cxx:187:64: error: initializing argument 3 of 'Function tbb::parallel_for_each(InputIterator, InputIterator, Function) [with InputIterator = __gnu_cxx::__normal_iterator >, Function = BRepMesh_FastDiscret]'
make: *** [BRepMesh_FastDiscret.lo] Error 1

Denis Barbier's picture

Ok, the command which fails on your case is:

g++ -DHAVE_CONFIG_H -I. -I../../../../ros/adm/make/TKMesh -I../../.. -I/usr/include/tbb -DHAVE_TBB -I../../../../ros/inc -I../../../../ros/drv/MeshDS -I../../../../ros/src/MeshDS -I../../../../ros/drv/BRepMesh -I../../../../ros/src/BRepMesh -I../../../../ros/drv/MeshAlgo -I../../../../ros/src/MeshAlgo -I../../../../ros/drv/IntPoly -I../../../../ros/src/IntPoly -I/usr/local/gcc42/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/include -D_OCC64 -m64 -DNDEBUG -DNo_Exception -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -MT BRepMesh_FastDiscret.lo -MD -MP -MF .deps/BRepMesh_FastDiscret.Tpo -c ../../../../ros/src/BRepMesh/BRepMesh_FastDiscret.cxx -fPIC -DPIC -o BRepMesh_FastDiscret.lo

Now if you copy/paste the same command but without -DHAVE_TBB, this will produce the same result as if TBB was disabled when configuring:

g++ -DHAVE_CONFIG_H -I. -I../../../../ros/adm/make/TKMesh -I../../.. -I/usr/include/tbb -I../../../../ros/inc -I../../../../ros/drv/MeshDS -I../../../../ros/src/MeshDS -I../../../../ros/drv/BRepMesh -I../../../../ros/src/BRepMesh -I../../../../ros/drv/MeshAlgo -I../../../../ros/src/MeshAlgo -I../../../../ros/drv/IntPoly -I../../../../ros/src/IntPoly -I/usr/local/gcc42/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/include -D_OCC64 -m64 -DNDEBUG -DNo_Exception -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -MT BRepMesh_FastDiscret.lo -MD -MP -MF .deps/BRepMesh_FastDiscret.Tpo -c ../../../../ros/src/BRepMesh/BRepMesh_FastDiscret.cxx -fPIC -DPIC -o BRepMesh_FastDiscret.lo

Does this command fails too?

Felipe De la Puente Christen's picture

Hi,

For the record, in my case the problem gets solved by getting a newer version of "tbb". I had 2.2 and got 4.0.

Regards, Felipe.

Rebeka Fox's picture

and --with-tbb=no

if /bin/sh ../../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../../ros/adm/make/TKMesh -I../../.. -I../../../../ros/inc -I../../../../ros/drv/MeshDS -I../../../../ros/src/MeshDS -I../../../../ros/drv/BRepMesh -I../../../../ros/src/BRepMesh -I../../../../ros/drv/MeshAlgo -I../../../../ros/src/MeshAlgo -I../../../../ros/drv/IntPoly -I../../../../ros/src/IntPoly -I/usr/local/gcc42/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/include -D_OCC64 -m64 -DNDEBUG -DNo_Exception -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -MT BRepMesh_FastDiscret.lo -MD -MP -MF ".deps/BRepMesh_FastDiscret.Tpo" \
-c -o BRepMesh_FastDiscret.lo `test -f '../../../../ros/src/BRepMesh/BRepMesh_FastDiscret.cxx' || echo '../../../../ros/adm/make/TKMesh/'`../../../../ros/src/BRepMesh/BRepMesh_FastDiscret.cxx; \
then mv ".deps/BRepMesh_FastDiscret.Tpo" ".deps/BRepMesh_FastDiscret.Plo"; \
else rm -f ".deps/BRepMesh_FastDiscret.Tpo"; exit 1; \
fi
g++ -DHAVE_CONFIG_H -I. -I../../../../ros/adm/make/TKMesh -I../../.. -I../../../../ros/inc -I../../../../ros/drv/MeshDS -I../../../../ros/src/MeshDS -I../../../../ros/drv/BRepMesh -I../../../../ros/src/BRepMesh -I../../../../ros/drv/MeshAlgo -I../../../../ros/src/MeshAlgo -I../../../../ros/drv/IntPoly -I../../../../ros/src/IntPoly -I/usr/local/gcc42/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/include -D_OCC64 -m64 -DNDEBUG -DNo_Exception -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -MT BRepMesh_FastDiscret.lo -MD -MP -MF .deps/BRepMesh_FastDiscret.Tpo -c ../../../../ros/src/BRepMesh/BRepMesh_FastDiscret.cxx -fPIC -DPIC -o BRepMesh_FastDiscret.lo

Denis Barbier's picture

Ok, I guess that the command sent previously without -DHAVE_TBB fails too, and closer investigation shows that the only difference is that --with-tbb adds -I/usr/include/tbb flag.
In fact this is wrong, you should have called configure with
--with-tbb-include=/usr/include
instead of
--with-tbb-include=/usr/include/tbb

Rebeka Fox's picture

Change noted! I'm going to try building Salome piece wise dependencies up from their install package; so CAS-6.3. I would like to come back to this again when I get a little more comfortable with the environment and more accustomed to working entirely in make. Any recommendations to fix this?

Thanks!