OCCT 7.8 - Static Build Failure

Hi, I'm trying to build OCCT 7.8.0 statically (via spack) and am running into errors. Here is some system information:

linux-centos7-zen2
gcc/9.3.0
cmake/3.23.1

I edited the spack package configuration for opencascade (spack/var/spack/repos/builtin/packages/opencascade/package.py) by adding this:

args.append("-DBUILD_LIBRARY_TYPE=STATIC")
args.append(self.define("BUILD_MODULE_DETools", False))

Finally, I build the package using this command:

>> spack install -j 32 opencascade@7.8.0 % gcc@9.3.0

Before adding the BUILD_MODULE_DETools flag it gave this error:

6718 ../../lin64/gcc/lib/libTKExpress.a(Express.cxx.o): In function `Express::WriteFileStamp(std::ostream&)':
>> 6719 Express.cxx:(.text+0x9d): undefined reference to `OSD_Process::OSD_Process()'
>> 6720 Express.cxx:(.text+0xa5): undefined reference to `OSD_Process::SystemDate()'

Now, it gives this error:

../../lin64/gcc/lib/libTKDESTEP.a(STEPControl_ActorRead.cxx.o): In function `STEPControl_ActorRead::STEPControl_ActorRead(opencascade::handle<Interface_InterfaceModel> const&)':
STEPControl_ActorRead.cxx:(.text+0x58d): undefined reference to `Transfer_ActorOfTransientProcess::Transfer_ActorOfTransientProcess()'
../../lin64/gcc/lib/libTKDESTEP.a(STEPControl_ActorRead.cxx.o): In function `opencascade::type_instance<Transfer_ActorOfTransientProcess>::get()':

I'm out of ideas.

Thank you,
Travis

Dmitrii Pasukhin's picture

Hello, the issue with ExpToCas fixed in latest master.

Well, the build looks strange. Could you please remove the build cache. Looks like internal complier issue if some build processes was stopped. Could you just 'make clean' then make rebuild?

I'm not familiar with spack. If it not clears the build cache, please do it manually.

Best regards, Dmitrii.