Closed AlexandreMagnolc closed 4 years ago
Have you installed libcgal-dev and libcgal-qt5-dev packages? This is normally done automatically when you install xc_utils.
Did this work?
Did this work?
Hi @lcpt, I installed libcgal-qt5-dev and now I got a new error, I think I'm almost there. Thanks for the reply
Now I got:
CMake Error at ../CMake/FindGNUGTS.cmake:28 (MESSAGE): No se encontró gts.h Call Stack (most recent call first): ../CMake/find_packages.cmake:8 (find_package) CMakeLists.txt:37 (INCLUDE)
It's strange. Are you sure you have installed xc_utils?
Normally libgts-bin and libgts-dev packages (which supply gts.h) are installed when you execute packages_install_ubuntu_bionic.sh during xc_utils installation.
It's strange. Are you sure you have installed xc_utils?
Thats the point, I'm trying to install xc_utils, following the steps given in []https://github.com/xcfem/xc/blob/master/install/install.linux.md)
I'll repeat all the steps again, just to make sure I've not misses any step.
Hi @lcpt
Now it's getting better, (I'm really confused)
the text in bold is the same "No se encontró gts.h" as I had before but this time there's a lot o warnings regarding to CGAL.
this is what I got:
Call Stack (most recent call first):
/home/alexandre/XC/build_xc/xc_utils/CMake/find_packages.cmake:7 (find_package)
CMakeLists.txt:37 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.
**CMake Error at /home/alexandre/XC/build_xc/xc_utils/CMake/FindGNUGTS.cmake:28 (MESSAGE):
No se encontró gts.h
Call Stack (most recent call first):
/home/alexandre/XC/build_xc/xc_utils/CMake/find_packages.cmake:8 (find_package)
CMakeLists.txt:37 (INCLUDE)**
CMake Warning (dev) in /home/alexandre/XC/build_xc/xc_utils/CMake/find_packages.cmake:
Policy CMP0011 is not set: Included scripts do automatic cmake_policy PUSH
and POP. Run "cmake --help-policy CMP0011" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
The included script
/home/alexandre/XC/build_xc/xc_utils/CMake/find_packages.cmake
affects policy settings. CMake is implying the NO_POLICY_SCOPE option for
compatibility, so the effects are applied to the including context.
Call Stack (most recent call first):
CMakeLists.txt:37 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.
Well, thanks for your patience.
Don't worry about the CGAL warnings, the problem is not there.
The problem is that the libraries the program depends on are not installed. Have you executed the script packages_install_ubuntu_bionic.sh? This script installs all the packages needed to compile the libraries for Ubuntu 18. You'll need to use "sudo" to make the script work I imagine you're already familiar with it. I'll try to explain this more clearly in the xc_utils installation instructions.
Maybe you can find this useful: https://github.com/xcfem/xc_utils/blob/master/install/install.scripts.linux.md
Hi @lcpt, thanks for patience
I ran the scrip:
wget https://raw.githubusercontent.com/xcfem/xc_utils/master/install/packages_install_ubuntu_bionic.sh
sudo bash packages_install_ubuntu_bionic.sh
Downloaded the source again:
foo@bar:~/build_xc$ git clone https://github.com/xcfem/xc_utils/ xc_utils
foo@bar:~/build_xc$ git clone https://github.com/xcfem/xc/ xc
I have to set VTK_DIR $ export VTK_DIR= /home/alexandre/vtk-inst
when I try this step:
alexandre@DESKTOP-9APDOV4:~/build_xc/build-xc_utils$ cmake ../xc_utils/src
The error persists:
CMake Error at /home/alexandre/build_xc/xc_utils/CMake/FindGNUGTS.cmake:28 (MESSAGE): No se encontró gts.h Call Stack (most recent call first): /home/alexandre/build_xc/xc_utils/CMake/find_packages.cmake:8 (find_package) CMakeLists.txt:37 (INCLUDE)
@lcpt Good News, I'm almost there.
I had to install manually GTS and libplot in order to make xc-utils, and finally I've managed to install it. Then, after trial and error, I had to install manually F2C, arpack++, petsc, metis,tcl and tk, then I cmake ran without errors.
When I tried do "make" I got a new type of error:
`[ 3%] Building CXX object CMakeFiles/XcBib.dir/utility/actor/shadow/Shadow.cpp.o In file included from /home/alexandre/build_xc/xc/src/domain/mesh/element/plane/triangle/Tri31.h:61:0, from /home/alexandre/build_xc/xc/src/utility/actor/objectBroker/all_includes.h:181, from /home/alexandre/build_xc/xc/src/utility/actor/objectBroker/FEM_ObjectBroker.cpp:64: /home/alexandre/build_xc/xc/src/domain/mesh/element/plane/TriBase3N.h:39:10: fatal error: vtkCellType.h: No such file or directory
^~~~~~~~~~~~~~~
compilation terminated. CMakeFiles/XcBib.dir/build.make:830: recipe for target 'CMakeFiles/XcBib.dir/utility/actor/objectBroker/FEM_ObjectBroker.cpp.o' failed make[2]: [CMakeFiles/XcBib.dir/utility/actor/objectBroker/FEM_ObjectBroker.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/XcBib.dir/all' failed make[1]: [CMakeFiles/XcBib.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: [all] Error 2`
The compiler doesn't find VTK: No such file or directory #include "vtkCellType.h".
Apparently you installed VTK in your home directory: $ export VTK_DIR= /home/alexandre/vtk-inst
CMake doesn't complain about that?
You are using an Ubuntu 18 system inside a Windows 10 OS, isn't it?
Are you using the Windows subsystem for Linux?
Yes, I'm using WSL 2 with Ubuntu 18, and, yes VTK is in my home directory, I've set a variable before Cmake with $ export VTK_DIR= /home/alexandre/vtk-inst
do you think this is the problem? How do I install VTK where it is suposed to be?
Well, in theory the location of the VTK libraries in the disk is not relevant, as long as CMake could detect this location, but I've never tested this.
Normally the packages needed 'libvtk6-dev' and 'python-vtk6' are installed by the 'packages_install_ubuntu_bionic.sh' script. Actually, I don't understand why those scripts are not working at all and you need installing packages "by hand" which is tedious. I'll try to borrow a Windows 10 computer to try the installation by myself.
I've installed VTK through apt-get and it still giving the same error.
Could you type?:
locate vtkCellType.h
nothing returned, I
update1: then tried with a known file and it returned notthing
update2: I'm runnig
sudo updatedb
and I'll try again
update3: Now it's working /home/alexandre/VTK-source/VTK/Common/DataModel/vtkCellType.h /home/alexandre/salome_meca/SALOME-9.5.0-UB18.04-SRC/BINARIES-UB18.04/ParaView/include/paraview-5.8/vtkCellType.h /home/alexandre/salome_meca/V2019.0.3_universal/prerequisites/Paraview-v560p1/include/paraview-5.6/vtkCellType.h /home/alexandre/vtk-inst/include/vtk-9.0/vtkCellType.h /mnt/c/OUTROS PROGRAMAS/sm-2019-w64-0.3/PRODUCTS/paraview-5.6.0p1-7bafc2be/include/paraview-5.6/vtkCellType.h /mnt/c/Users/alexa/Downloads/Paraview-5.6-med-WIN64/Paraview-5.6-med/PRODUCTS/paraview-5.6.0p1-7bafc2be/include/paraview-5.6/vtkCellType.h /opt/paraviewopenfoam56/include/paraview-5.6/vtkCellType.h /usr/include/vtk-6.3/vtkCellType.h
@lcpt Finally I made something that worked
I opened /build_xc/xc/src/domain/mesh/element/plane/TriBase3N.h and I found on the includes:
vtkCellType.h doesn't have subdrectories, I suposed it has to be in the root directory of the files to be compiled (I don't know the exactly the programming therms, I'm a civil enginner that code a bit haha).
then I put vtkCellType.h in /build_xc/xc/src/
using:
cp /opt/paraviewopenfoam56/include/paraview-5.6/vtkCellType.h /home/alexandre/build_xc/xc/src/
now it compiled without errors, just some warnings listed at the bottom of this comment, just for a later discussion. I've installed, python modules and run the tests according to the installation guide. All the tests returned ok.
Next Step is try to use XC, first let's run some tests.
Now that I think it's working, if I could, I would like to contribute one day to the project.
Thank you so much for your effort to make this work. See you in next issues (sure they'll come)
------------- Building Warnings-------------------
'[ 31%] Building CXX object CMakeFiles/XcBib.dir/solution/system_of_eqn/linearSOE/LinearSOE.cpp.o'
-> type conversion problem "ISO C++ forbids converting a string constant to ‘char"
'[ 37%] Building CXX object CMakeFiles/XcBib.dir/solution/system_of_eqn/eigenSOE/FullGenEigenSolver.cpp.o'
-> type conversion problem "ISO C++ forbids converting a string constant to ‘char"
'[ 46%] Building CXX object CMakeFiles/XcBib.dir/solution/analysis/integrator/transient/ResponseQuantities.cc.o'
-> assuming signed overflow does not occur when assuming that (X + c) >= X is always true
'[ 69%] Building CXX object CMakeFiles/XcBib.dir/domain/mesh/element/truss_beam_column/nonlinearBeamColumn/quadrule/GaussQuadRule1d01.cpp.o'
-> assuming signed overflow does not occur when assuming that (X + c) >= X is always true
'[ 75%] Building CXX object CMakeFiles/XcBib.dir/domain/mesh/element/plane/shell/ShellLinearCrdTransf3d.cc.o'
-> array subscript is above array bounds
'[ 84%] Building CXX object CMakeFiles/XcBib.dir/reliability/analysis/analysis/FragilityAnalysis.cpp.o'
-> some notation proble I think "suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]"
[ 90%] Building CXX object CMakeFiles/XcBib.dir/preprocessor/multi_block_topology/entities/containers/LineMap.cc.o
-> unused variable
[ 94%] Linking CXX shared library /home/alexandre/build_xc/xc/lib/libXcBib.so
-> use of tmpnam' is dangerous, better use
mkstemp'
Congrats! It's really an unorthodox solution but, you did it!
Of course, we'll be more than happy if you decide to collaborate with us. Thank you very much.
nothing returned, I update1: then tried with a known file and it returned notthing update2: I'm runnig
sudo updatedb
and I'll try againupdate3: Now it's working /home/alexandre/VTK-source/VTK/Common/DataModel/vtkCellType.h /home/alexandre/salome_meca/SALOME-9.5.0-UB18.04-SRC/BINARIES-UB18.04/ParaView/include/paraview-5.8/vtkCellType.h /home/alexandre/salome_meca/V2019.0.3_universal/prerequisites/Paraview-v560p1/include/paraview-5.6/vtkCellType.h /home/alexandre/vtk-inst/include/vtk-9.0/vtkCellType.h /mnt/c/OUTROS PROGRAMAS/sm-2019-w64-0.3/PRODUCTS/paraview-5.6.0p1-7bafc2be/include/paraview-5.6/vtkCellType.h /mnt/c/Users/alexa/Downloads/Paraview-5.6-med-WIN64/Paraview-5.6-med/PRODUCTS/paraview-5.6.0p1-7bafc2be/include/paraview-5.6/vtkCellType.h /opt/paraviewopenfoam56/include/paraview-5.6/vtkCellType.h /usr/include/vtk-6.3/vtkCellType.h
CMake is supposed to find this one: /usr/include/vtk-6.3/vtkCellType.h
I think you need to remove this: '$ export VTK_DIR= /home/alexandre/vtk-inst
from your setup (and normally you will be able to remove this file from the xc sources).
By the way, if there is no path in the "include" c preprocessor directive it's because the included file is in the current directory or because the file is in a standard list of system directories. It's CMake which puts the VTK includes in that list.
Well, I think we can close this issue now.
If you need any help please let me know.
Everytime time I try to "make~my application I got this error.
I reinstalled Qt5, CGAL and many other dependencies, but I still got this error. Any ideas on what to do next?
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALConfig.cmake:137 (message): ERROR: The CGAL_Qt5 library was not configured. CGAL was configured with WITH_CGAL_Qt5=ON, but one of the dependencies of CGAL_Qt5 was not configured properly. Call Stack (most recent call first): /usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALConfig.cmake:147 (check_cgal_component) ../CMake/find_packages.cmake:7 (find_package) CMakeLists.txt:37 (INCLUDE)
I'm using Ubuntu 18 on a Linux Windows Subsystem