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

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Shape factory
Shape gallery
What's new
System requirements
Download Center
Public license
Getting started
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
Home / Developer Corner / Forums / Installation and building / Error compiling opencascade 6.3 in FreeBSD 64bits (amd64)

Error compiling opencascade 6.3 in FreeBSD 64bits (amd64)

Error compiling opencascade 6.3 in FreeBSD 64bits (amd64)
John Dottor 2009/01/23 04:51
Hi. Only to inform that I get an error trying to compile the port opencascade 6.3 in 7.1-RELEASE amd64. I am using the stock gcc (4.2.1).

"uname -a" output:
FreeBSD bsd64.local 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan 1 08:58:24
UTC 2009

I got this error:

if /bin/sh /usr/local/bin/libtool --mode=compile
c++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../inc -I../../../drv/StepAP214
-I../../../src/StepAP214 -I../../../drv/RWStepAP214 -I../../../src/RWStepAP214
-I../../../drv/StepAP203 -I../../../src/StepAP203 -I../../../drv/RWStepAP203
-I../../../src/RWStepAP203 -I../../../drv/STEPConstruct -I../../../src/STEPConstruct
-I../../../drv/STEPEdit -I../../../src/STEPEdit -I../../../drv/GeomToStep
-I../../../src/GeomToStep -I../../../drv/StepToGeom -I../../../src/StepToGeom
-I../../../drv/StepToTopoDS -I../../../src/StepToTopoDS -I../../../drv/TopoDSToStep
-I../../../src/TopoDSToStep -I../../../drv/STEPControl -I../../../src/STEPControl
-I../../../drv/STEPSelections -I../../../src/STEPSelections -I../../../drv/StepAP209
-I../../../src/StepAP209 -O2 -fno-strict-aliasing -pipe -I/usr/local/include
-I/usr/local/include/tcl8.4 -I/usr/local/include/tk8.4 -I/usr/local/diablo-jdk1.6.0/include
-I/usr/local/diablo-jdk1.6.0/include/freebsd -D_OCC64 -DNDEBUG -DNo_Exception
-O2 -fno-strict-aliasing -pipe -DCSFDB -DOCC_CONVERT_SIGNALS -DFREEBSD -Damd64
-D_GNU_SOURCE=1 -O2 -MT STEPConstruct_AP203Context.lo -MD -MP -MF
".deps/STEPConstruct_AP203Context.Tpo" -c -o STEPConstruct_AP203Context.lo
`test -f '../../../src/STEPConstruct/STEPConstruct_AP203Context.cxx' || echo
'./'`../../../src/STEPConstruct/STEPConstruct_AP203Context.cxx; then mv
".deps/STEPConstruct_AP203Context.Plo"; else rm -f
".deps/STEPConstruct_AP203Context.Tpo"; exit 1; fi
c++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../inc -I../../../drv/StepAP214
-I../../../src/StepAP214 -I../../../drv/RWStepAP214 -I../../../src/RWStepAP214
-I../../../drv/StepAP203 -I../../../src/StepAP203 -I../../../drv/RWStepAP203
-I../../../src/RWStepAP203 -I../../../drv/STEPConstruct -I../../../src/STEPConstruct
-I../../../drv/STEPEdit -I../../../src/STEPEdit -I../../../drv/GeomToStep -I../../../src/GeomToStep
-I../../../drv/StepToGeom -I../../../src/StepToGeom -I../../../drv/StepToTopoDS
-I../../../src/StepToTopoDS -I../../../drv/TopoDSToStep -I../../../src/TopoDSToStep
-I../../../drv/STEPControl -I../../../src/STEPControl -I../../../drv/STEPSelections
-I../../../src/STEPSelections -I../../../drv/StepAP209 -I../../../src/StepAP209
-O2 -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/local/include/tcl8.4
-I/usr/local/include/tk8.4 -I/usr/local/diablo-jdk1.6.0/include -I/usr/local/diablo-jdk1.6.0/include/freebsd
-D_OCC64 -DNDEBUG -DNo_Exception -O2 -fno-strict-aliasing -pipe -DCSFDB -DOCC_CONVERT_SIGNALS
STEPConstruct_AP203Context.lo -MD -MP -MF
.deps/STEPConstruct_AP203Context.Tpo -c
../../../src/STEPConstruct/STEPConstruct_AP203Context.cxx -fPIC -DPIC -o
../../../src/STEPConstruct/STEPConstruct_AP203Context.cxx: In member
function 'Handle_StepBasic_DateAndTime
../../../src/STEPConstruct/STEPConstruct_AP203Context.cxx:106: error: cast
from 'char* (*)(int, int)' to 'Standard_Integer' loses precision
*** Error code 1

John Dottor

Andrey BETENEV 2009/01/23 06:12
Line 106 of STEPConstruct_AP203Context.cxx is:

Standard_Integer shift = Standard_Integer(timezone);

Here timezone is expected to be global integer variable; GNU C library defines it "for compatibility with System V Unix", see

It looks like if in your case timezone were not a variable but a pointer to a function... Might it happen that new version of gnu/c has different definition of this symbol?

Check where and how this symbol is defined; if it is defined differently in your version of gcc/c library, you will likely have to use conditional compilation to work-around this problem.
John Dottor 2009/01/23 23:43
That's right. Thanks for the great help.

John Dottor
John Dottor 2009/01/23 06:59
To evade this error, I did edited the file "./ros/src/STEPConstruct/STEPConstruct_AP203Context.cxx" and made the following change:

-Standard_Integer shift = Standard_Integer(timezone);
+Standard_Integer shift = Standard_Integer((long long)timezone);

After this, the compilation process worked fine until the end.
Latest news
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map