Compilation on Linux

subunit

Looking around for some CAD
Hello! After some attempts, I have got AS to compile and install without errors (had to check out Eigen 3.4.0 and add -lstdc++ to the link.txt for asiExe.dir). However, after installing, no asiExe binary is found in the install directory. Is there some install configuration I need to use to ensure the executable is installed correctly? Thank you for your time!
 

Quaoar

Administrator
Staff member
Hello! After some attempts, I have got AS to compile and install without errors (had to check out Eigen 3.4.0 and add -lstdc++ to the link.txt for asiExe.dir). However, after installing, no asiExe binary is found in the install directory. Is there some install configuration I need to use to ensure the executable is installed correctly? Thank you for your time!
I read your initial comment and felt the urge to answer but it was a weekend full of distractions :D Few point to underline here:
  1. I think right now you'd better compile against OpenCascade 7.4 as the newer versions are quite incompatible. Have you managed to compile against master (7.6.0)?
  2. Active Data is now a part of Analysis Situs, so there's no need to plug it in if you're trying to compile AS's master.
  3. I use to compile AS on Ubuntu and actually asiExe should be installed together with a bash script (asiExe.sh) which is supposed to launch it. It might be that I made some stupid mistake in cmake configuration with all this. I'll recheck today.
 

subunit

Looking around for some CAD
I read your initial comment and felt the urge to answer but it was a weekend full of distractions :D Few point to underline here:
  1. I think right now you'd better compile against OpenCascade 7.4 as the newer versions are quite incompatible. Have you managed to compile against master (7.6.0)?
  2. Active Data is now a part of Analysis Situs, so there's no need to plug it in if you're trying to compile AS's master.
  3. I use to compile AS on Ubuntu and actually asiExe should be installed together with a bash script (asiExe.sh) which is supposed to launch it. It might be that I made some stupid mistake in cmake configuration with all this. I'll recheck today.
Thanks for this- I was not able to get AS to compile with OpenCascade master, I used 7.4. Oddly, compiling 7.4.0 gave some linker issue that was not present on master, but I was able to point ld to the correct libraries with symlinks. The integration of Active Data makes sense, I wasn't sure why this parameter was not required for AS anymore :) I see the script, and asiExe is present in my build directory, so I'll try to use those together. Thanks again for the help!
 

Quaoar

Administrator
Staff member

Just made this recording. I think the hardest thing is actually getting all these 3-rd parties installed. There's definitely a lot to improve.
 

subunit

Looking around for some CAD
For whatever reason, the install script moved the libTK.. and libvtk.. libraries to installdir/bin but not the libasi... or libcmd.. libraries. I've copied these over and AS starts, loads a part, and the analysis functions all appear to work :) Thank you very much for your help! I am taking over a job shop this year and intend to use AS as a platform to implement some CAPP feature recognition algorithms, so hopefully I will have some reports of field use of AS sooner or later! Thanks again!
 

Quaoar

Administrator
Staff member
... intend to use AS as a platform to implement some CAPP feature recognition algorithms, so hopefully I will have some reports of field use of AS sooner or later!
That would be awesome. Actually, I use AS daily for feature recognition in turning/milling/laser-cutting fields, so it would be interesting to exchange on this matter.
 

Guo issac

CAD practitioner
Hi, all.

when I building the occt-7.6.0 branch, which is from https://gitlab.com/ssv/AnalysisSitus/-/tree/OCCT760
Bellowed issue occured.
Any suggestion?



18:11:56: Running steps for project AnalysisSitus...
18:11:56: Starting: "/usr/local/bin/cmake" --build . --target all
[ 0%] Building CXX object src/asiActiveData/CMakeFiles/asiActiveData.dir/ActData_Common.cpp.o
[ 0%] Building CXX object src/asiActiveData/CMakeFiles/asiActiveData.dir/ActData_Plugin.cpp.o
[ 0%] Building CXX object src/asiActiveData/CMakeFiles/asiActiveData.dir/API/ActAPI_IAlgorithm.cpp.o
[ 0%] Building CXX object src/asiActiveData/CMakeFiles/asiActiveData.dir/API/ActAPI_IDataCursor.cpp.o
[ 0%] Building CXX object src/asiActiveData/CMakeFiles/asiActiveData.dir/API/ActAPI_ILogger.cpp.o
[ 0%] Building CXX object src/asiActiveData/CMakeFiles/asiActiveData.dir/API/ActAPI_IModel.cpp.o
[ 0%] Building CXX object src/asiActiveData/CMakeFiles/asiActiveData.dir/API/ActAPI_INode.cpp.o
[ 0%] Building CXX object src/asiActiveData/CMakeFiles/asiActiveData.dir/API/ActAPI_IParameter.cpp.o
[ 0%] Building CXX object src/asiActiveData/CMakeFiles/asiActiveData.dir/API/ActAPI_IPartition.cpp.o
[ 1%] Building CXX object src/asiActiveData/CMakeFiles/asiActiveData.dir/API/ActAPI_IPlotter.cpp.o
[ 1%] Building CXX object src/asiActiveData/CMakeFiles/asiActiveData.dir/API/ActAPI_IProgressNotifier.cpp.o
[ 1%] Building CXX object src/asiActiveData/CMakeFiles/asiActiveData.dir/API/ActAPI_ITreeFunction.cpp.o
[ 1%] Building CXX object src/asiActiveData/CMakeFiles/asiActiveData.dir/API/ActAPI_Variables.cpp.o
[ 1%] Building CXX object src/asiActiveData/CMakeFiles/asiActiveData.dir/BinDrivers/ActData_BinDrivers.cpp.o
In file included from /36G/AnalysisSitus/src/asiActiveData/Mesh/DS/ActData_Mesh_MapOfMeshOrientedElement.h:37:0,
from /36G/AnalysisSitus/src/asiActiveData/Mesh/DS/ActData_Mesh.h:37,
from /36G/AnalysisSitus/src/asiActiveData/Mesh/ActData_MeshDeltaEntities.h:42,
from /36G/AnalysisSitus/src/asiActiveData/Mesh/ActData_MeshMDelta.h:38,
from /36G/AnalysisSitus/src/asiActiveData/Mesh/ActData_MeshAttr.h:38,
from /36G/AnalysisSitus/src/asiActiveData/BinDrivers/ActData_MeshDriver.h:38,
from /36G/AnalysisSitus/src/asiActiveData/BinDrivers/ActData_BinDrivers.cpp:39:
/36G/AnalysisSitus/src/asiActiveData/Mesh/DS/ActData_Mesh_Element.h:178:77: error: ‘gp_Vec’ does not name a type
ActData_EXPORT virtual void SetNormal (const Standard_Integer rank, const gp_Vec& v);
^~~~~~
src/asiActiveData/CMakeFiles/asiActiveData.dir/build.make:257: recipe for target 'src/asiActiveData/CMakeFiles/asiActiveData.dir/BinDrivers/ActData_BinDrivers.cpp.o' failed
make[2]: *** [src/asiActiveData/CMakeFiles/asiActiveData.dir/BinDrivers/ActData_BinDrivers.cpp.o] Error 1
CMakeFiles/Makefile2:367: recipe for target 'src/asiActiveData/CMakeFiles/asiActiveData.dir/all' failed
make[1]: *** [src/asiActiveData/CMakeFiles/asiActiveData.dir/all] Error 2
Makefile:135: recipe for target 'all' failed
make: *** [all] Error 2
18:12:08: The process "/usr/local/bin/cmake" exited with code 2.
Error while building/deploying project AnalysisSitus (kit: Imported Kit)
The kit Imported Kit has configuration issues which might be the root cause for this problem.
When executing step "Build"
18:12:08: Elapsed time: 00:12.
 

Quaoar

Administrator
Staff member
@Guo issac
This branch is experimental and is not well tested. As you can see, compilation on linux is also yet to be done. If you still want to give it a try, then probably you can just add the missing include for `gp_Vec` in the corresponding header (ActData_Mesh_Element.h).
 

sala

Looking around for some CAD
Hey I am stuck on the installation of Analysis Situs 1.1.0 on Ubuntu 20.04. I followed the compilation guide and the "Compile Analysis Situs on Linux" video. Make and make install did work fine.

But now that I am trying to run ./asiExe.sh i get the following Error message: "/asiExe: error while loading shared libraries: libTKMath.so.7: cannot open shared object file: No such file or directory"

Could you point me in the right direction? Thank you!
 

Quaoar

Administrator
Staff member
libTKMath.so is the library of OpenCascade. Can you list here all the filenames you've got in the installation directory after make install?
 

sala

Looking around for some CAD
Thanks for your quick response.

In the installation directory I have two directories: bin and framework. The filenames in the bin directory are in the first attached screenshot. The directory framework in return has to subdirectories: include and lib. The files in the include directory are too many to list. The filenames in the lib directory are shown in the second screenshot. As a reference I have included a third screenshots which contains all directories related to the installation progress.
 

Attachments

  • install_bin.png
    install_bin.png
    269 KB · Views: 6
  • frame_work_lib.png
    frame_work_lib.png
    14.9 KB · Views: 7
  • installed.png
    installed.png
    20.7 KB · Views: 8

Quaoar

Administrator
Staff member
Okay, the first screenshot is enough. It actually shows that the libs are not fully copied for OpenCascade and VTK. Here's what you need to have:

1649165193411.png

I am not sure why this happens, but to work this around, you can just copy the missing files from VTK and OpenCascade install dirs. Btw, I just checked it on my ubuntu and master branch, and it was fine.
 

sala

Looking around for some CAD
I have now copied and pasted every library file from vtk and OOCT. Now it's working. Again thanks!

Before Edit: I copied the files with the red arrows. Unfortunately it did not work. I have noticed something else, most of the files in the bin directory are broken links. Did I mess something up during the installation of the OOCT and the other packages?
 
Last edited:

Quaoar

Administrator
Staff member
No idea, honestly :( It will take quite a bit of time to recover this instruction. I don't see in in the trash folder of Google Docs.
 

Guo issac

CAD practitioner
No idea, honestly :( It will take quite a bit of time to recover this instruction. I don't see in in the trash folder of Google Docs.
I want to know how to install that Mobius library, could you give me some information?
Thank you very much.
 

Quaoar

Administrator
Staff member
Are you compiling it on linux? Here's a typical cmake configuration I have for it in a docker container:

Code:
FROM ubuntu:latest

ENV DEBIAN_FRONTEND=noninteractive

# Installing inotify to listen to file changes
RUN apt-get update && apt-get -y install inotify-tools

# Build tools.
RUN apt-get -y install build-essential git cmake

# Some 3-rd parties, such as OpenGL-related things, are not necessary for
# DFM (neither building nor runtime), but without them OpenCascade is
# not going to compile. Btw, freeimage is added to enable PNG snapshots.
RUN apt-get -y install tcl tcl-dev tk tk-dev libfreeimage-dev zlib1g-dev
RUN apt-get -y install libxmu-dev libxi-dev
RUN apt-get -y install libosmesa6-dev

# Xvfb provides an X server that can run on machines with no
# display hardware and no physical input devices. It emulates a
# dumb framebuffer using virtual memory.
RUN apt-get -y install xvfb

# Extra 3-rd parties for Analysis Situs.
RUN apt-get -y install libeigen3-dev rapidjson-dev

# OpenCascade.
RUN git clone https://github.com/Open-Cascade-SAS/OCCT.git opencascade
WORKDIR /opencascade
RUN git checkout V7_4_0 -b dfm
RUN mkdir -p build
WORKDIR /opencascade/build
RUN cmake .. \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_INSTALL_RPATH="" \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DUSE_FREEIMAGE=on \
  -DUSE_FFMPEG=off \
  -DUSE_VTK=off \
  -DUSE_TBB=off
RUN make
RUN make install

# Mobius.
WORKDIR /
RUN git clone https://gitlab.com/ssv/Mobius.git mobius
WORKDIR /mobius/
RUN mkdir -p build
WORKDIR /mobius/build
RUN git checkout dce7bdae5a25163b44539e739002807e0d7415da
RUN cmake .. \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_INSTALL_RPATH="" \
  -DINSTALL_DIR=/usr/ \
  -DUSE_OPENCASCADE=on \
  -DUSE_ADOLC=off \
  -D3RDPARTY_DIR=/usr \
  -D3RDPARTY_EIGEN_DIR=/usr/include/eigen3/ \
  -D3RDPARTY_OCCT_INCLUDE_DIR=/usr/include/opencascade \
  -D3RDPARTY_OCCT_LIBRARY_DIR=/usr/lib
RUN make
RUN make install

Only the last block is actually related to Mobius, but it should give the complete recipe.
 
Top