
Fri, 09/01/2023 - 15:56
Forums:
Hi there! I'm unable to build OCCT in my Docker container, which uses Debian bookworm release. This is how I build it:
WORKDIR "/dependencies"
RUN git clone https://github.com/Open-Cascade-SAS/OCCT.git
WORKDIR "/dependencies/OCCT"
RUN mkdir occt-build
RUN mkdir occt-install
WORKDIR "/dependencies/OCCT/occt-build"
RUN cmake /dependencies/OCCT \
-DINSTALL_DIR=/dependencies/OCCT/occt-install \
-DBUILD_LIBRARY_TYPE=static \
-DBUILD_MODULE_Draw=0 \
-DBUILD_RELEASE_DISABLE_EXCEPTIONS=Off
RUN make install
And this is what I finally see in my console (after waiting around 2 hours))):
[100%] Built target TKExpress
[100%] Building CXX object src/ExpToCasExe/CMakeFiles/ExpToCasExe.dir/lex.exptocas.cxx.o
[100%] Building CXX object src/ExpToCasExe/CMakeFiles/ExpToCasExe.dir/exptocas.tab.cxx.o
[100%] Building CXX object src/ExpToCasExe/CMakeFiles/ExpToCasExe.dir/ExpToCasExe.cxx.o
[100%] Linking CXX executable ../../lin64/gcc/bin/ExpToCasExe
/usr/bin/ld: ../../lin64/gcc/lib/libTKExpress.a(Express.cxx.o): in function `Express::WriteFileStamp(std::ostream&)':
Express.cxx:(.text+0x9d): undefined reference to `OSD_Process::OSD_Process()'
/usr/bin/ld: Express.cxx:(.text+0xa5): undefined reference to `OSD_Process::SystemDate()'
/usr/bin/ld: Express.cxx:(.text+0xce): undefined reference to `OSD_Environment::OSD_Environment(TCollection_AsciiString const&)'
/usr/bin/ld: Express.cxx:(.text+0xe6): undefined reference to `OSD_Environment::Value()'
/usr/bin/ld: Express.cxx:(.text+0x188): undefined reference to `OSD_Process::UserName()'
/usr/bin/ld: ../../lin64/gcc/lib/libTKExpress.a(Express_Entity.cxx.o): in function `Express_Entity::writeIncludes(std::ostream&) const':
Express_Entity.cxx:(.text+0x1dcf): undefined reference to `OSD_Directory::OSD_Directory(OSD_Path const&)'
/usr/bin/ld: Express_Entity.cxx:(.text+0x1dda): undefined reference to `OSD_Directory::Build(OSD_Protection const&)'
/usr/bin/ld: ../../lin64/gcc/lib/libTKExpress.a(Express_Entity.cxx.o): in function `Express_Entity::GenerateClass() const':
Express_Entity.cxx:(.text+0x91e8): undefined reference to `OSD_Directory::OSD_Directory(OSD_Path const&)'
/usr/bin/ld: Express_Entity.cxx:(.text+0x91f3): undefined reference to `OSD_Directory::Build(OSD_Protection const&)'
/usr/bin/ld: Express_Entity.cxx:(.text+0xacf7): undefined reference to `OSD_Directory::OSD_Directory(OSD_Path const&)'
/usr/bin/ld: Express_Entity.cxx:(.text+0xad07): undefined reference to `OSD_Directory::Build(OSD_Protection const&)'
/usr/bin/ld: Express_Entity.cxx:(.text+0xbb32): undefined reference to `OSD_Directory::OSD_Directory(OSD_Path const&)'
/usr/bin/ld: Express_Entity.cxx:(.text+0xbb98): undefined reference to `OSD_Directory::Build(OSD_Protection const&)'
/usr/bin/ld: ../../lin64/gcc/lib/libTKExpress.a(Express_Enum.cxx.o): in function `Express_Enum::GenerateClass() const':
Express_Enum.cxx:(.text+0x4a7): undefined reference to `OSD_Directory::OSD_Directory(OSD_Path const&)'
/usr/bin/ld: Express_Enum.cxx:(.text+0x4b2): undefined reference to `OSD_Directory::Build(OSD_Protection const&)'
/usr/bin/ld: ../../lin64/gcc/lib/libTKExpress.a(Express_Select.cxx.o): in function `Express_Select::generateSelectMember(opencascade::handle<TColStd_HSequenceOfInteger> const&) const':
Express_Select.cxx:(.text+0x2b5): undefined reference to `OSD_Directory::OSD_Directory(OSD_Path const&)'
/usr/bin/ld: Express_Select.cxx:(.text+0x2c0): undefined reference to `OSD_Directory::Build(OSD_Protection const&)'
/usr/bin/ld: ../../lin64/gcc/lib/libTKExpress.a(Express_Select.cxx.o): in function `Express_Select::GenerateClass() const':
Express_Select.cxx:(.text+0x181b): undefined reference to `OSD_Directory::OSD_Directory(OSD_Path const&)'
/usr/bin/ld: Express_Select.cxx:(.text+0x1826): undefined reference to `OSD_Directory::Build(OSD_Protection const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [src/ExpToCasExe/CMakeFiles/ExpToCasExe.dir/build.make:132: lin64/gcc/bin/ExpToCasExe-7.8.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:2387: src/ExpToCasExe/CMakeFiles/ExpToCasExe.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
What may be wrong with that and how can I fix it? Thanks in advance!!
Attachments:
Fri, 09/01/2023 - 16:11
And some extra information that may be important:
and
Fri, 09/01/2023 - 19:03
Hello,
ExpToCasExe is a known problem. If you are using OCCT 7.7.1+. Please disable Cmake variable.
-DBUILD_MODULE_DETools=OFF
If you are using older version. I will give another solution.
Best regards, Dmitrii.