Allens
Allens

Reputation: 11

Libigl example 102 testing error

I tried to use the libigl on Ubuntu 16.4, but I faced some errors when building the example 102.

First, I installed the Eigen locating in /usr/local/include/Eigen/.

Then, I downloaded the libigl code following this command:

git clone --recursive https://github.com/libigl/libigl.git

Next, I tried to build the Example 102. According to this advice.

The examples can also be built independently using the CMakeLists.txt inside each example folder.

So after downloading the source code, I direct build example 102 instead of building the whole tutorial via corresponding CMakeLists.txt locating in /libigl/tutorial/.

I do like this: (1) cd to the folder: ..../libigl/tutorial/102_DrawMesh

(2) mkdir build

(3) cd build

(4) cmake ../

After the cmake ../, I got the following errors, it seems that required links libraries that specified in the CMakeLists.txt locating in ..../libigl/tutorial/102_DrawMesh are not found.


The following are the errors:

-- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.5)

should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done CMake Warning (dev) at CMakeLists.txt:4 (add_executable): Policy CMP0028 is not set: Double colon in target name means ALIAS or IMPORTED target. Run "cmake --help-policy CMP0028" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

Target "102_DrawMesh_bin" links to target "igl::core" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:4 (add_executable): Policy CMP0028 is not set: Double colon in target name means ALIAS or
IMPORTED target. Run "cmake --help-policy CMP0028" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

Target "102_DrawMesh_bin" links to target "igl::opengl" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:4 (add_executable): Policy CMP0028 is not set: Double colon in target name means ALIAS or
IMPORTED target. Run "cmake --help-policy CMP0028" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

Target "102_DrawMesh_bin" links to target "igl::opengl_glfw" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done -- Build files have been written to: /home/chayfung/Workspace/Mesh/libigl/tutorial/102_DrawMesh/build


Can someone give me some advice?

Thanks.

Upvotes: 0

Views: 644

Answers (2)

Zhongshi Jiang
Zhongshi Jiang

Reputation: 11

I don't know if you have sorted out yet. But they can be built independently in the sense that after cmake with everything else, the build/make procedure can be done independently.

Please follow the usual steps as instructed.

cd libigl/tutorial
mkdir build
cd build
cmake ../

You can modify the CMakeLists.txt in tutorial to only make the directory you would like, or use ccmake ../ to do something ad hoc.

Upvotes: 1

Allens
Allens

Reputation: 11

(1) Remove the original source code and download it again, generated a new folder named libigl, locating /mesh/libigl.

(2) cd to the tutorial /libigl/tutorial/.

(3) Change the CMakeList.txt locating in /libigl/tutorial/. I just only disable all the options regarding example chapters, please see the following figures.

tutorial_CMakeLists_txt-1

tutorial_CMakeLists_txt-2

tutorial_CMakeLists_txt-3

tutorial_CMakeLists_txt-4

(4) mkdir build

(5) cd build

(6) cmake ../

(7) make

(8) In the path /mesh/libigl/tutorial/build/, I got the following .a libraries. See the following figures. Also in the subfolders, additional .a libraries are also generated.

tutorial_build_libraries

(9) cd to the path /mesh/libigl/tutorial/102_DrawMesh/

(10) mkdir build

(11) cd build

(12) cmake ../

After carry out the cmake ../, I got the following errors, it appears that some libraries were still unfound. See the following figures.

cmake_error-1

cmake_error-2

So, the make definitely failed.

Any ideas?

Thanks.

Upvotes: 0

Related Questions