Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unable to build on Linux (The following variables are used in this project, but they are set to NOTFOUND) #197

Closed
seigneurfuo opened this issue Aug 27, 2022 · 5 comments
Assignees

Comments

@seigneurfuo
Copy link

seigneurfuo commented Aug 27, 2022

Describe the bug
Unable to build on Linux: CMake Error: The following variables are used in this project, but they are set to NOTFOUND.

To Reproduce
Compile on Manjaro

Expected behavior
Project was unable to build successfully.

Desktop (please complete the following information):

  • OS: Manjaro Linux
  • cmake: 3.23.3
  • ninja: 1.11.0

Additional context
Env variables:

env | grep -i nanoem
NANOEM_DISABLE_BUILD_SENTRY_NATIVE=1
NANOEM_DISABLE_BUILD_SPIRV_TOOLS=1
NANOEM_TARGET_COMPILER=clang

Detailed error log:

cmake -G Ninja ..
-- The C compiler identification is GNU 12.1.1
-- The CXX compiler identification is GNU 12.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- [global] target architecture is x86_64 and compiler is gcc
-- Performing Test NANOEM_ENABLE_BRANCH_PREDICTION
-- Performing Test NANOEM_ENABLE_BRANCH_PREDICTION - Success
-- [nanoem] branch prediction is enabled
-- [nanoem] JSON extension is enabled
-- [nanoem] mutable API extension is enabled
-- [nanoem] NMD motion extension is enabled
-- [nanoem] PMM document extension is enabled
-- [global] glm is located at /home/seigneurfuo/src/nanoem/dependencies/glm
-- [nanoem] bullet is located at /home/seigneurfuo/src/nanoem/dependencies/bullet3
-- [nanoem] physics simulation using bullet extension is enabled
-- [global] glm is located at /home/seigneurfuo/src/nanoem/dependencies/glm
-- [global] zlib is located at /home/seigneurfuo/src/nanoem/dependencies/zlib
-- [emapp] minizip is located at /home/seigneurfuo/src/nanoem/dependencies/minizip
-- [emapp] nanomsg is located at /home/seigneurfuo/src/nanoem/dependencies/nanomsg
-- [emapp] setup "sokol_noop" as installing plugin to plugins
-- [emapp/bundle] setup sokol noop backend renderer plugin
-- [emapp] setup "sokol_glcore33" as installing plugin to plugins
-- [emapp/bundle] setup sokol OpenGL 3.3 Core Profile backend renderer plugin
-- [emapp] setup "sokol_gles3" as installing plugin to plugins
-- [emapp/bundle] setup sokol OpenGL ES 3.0 backend renderer plugin
-- [emapp/resources] yaml-cpp is located at /home/seigneurfuo/src/nanoem/dependencies/yaml-cpp
-- [emapp/resources] setup emarb font
-- [emapp/resources] setup emarb protobuf
-- [emapp/resources] setup emarb shaders
-- [emapp/resources] setup emarb toon
-- [emapp/resources] setup emarb translation
-- [emapp/bundle] setup emapp bundle
-- [emapp] tbb is located at /home/seigneurfuo/src/nanoem/dependencies/tbb
-- [emapp] TBB is enabled
-- Performing Test Iconv_IS_BUILT_IN
-- Performing Test Iconv_IS_BUILT_IN - Success
-- Found Iconv: built in to C library  
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
CMake Warning (dev) at /usr/share/cmake/Modules/FindOpenGL.cmake:315 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  emapp/CMakeLists.txt:102 (find_package)
  sapp/CMakeLists.txt:13 (nanoem_emapp_link_executable)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/lib/libOpenGL.so   
-- [emapp] setup linkage of "nanoem_sapp"
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/seigneurfuo/src/nanoem/emapp/MINIZIP_INCLUDE_DIR
   used as include directory in directory /home/seigneurfuo/src/nanoem/emapp
/home/seigneurfuo/src/nanoem/emapp/NANOMSG_INCLUDE_DIR
   used as include directory in directory /home/seigneurfuo/src/nanoem/emapp
/home/seigneurfuo/src/nanoem/emapp/TBB_INCLUDE_DIR
   used as include directory in directory /home/seigneurfuo/src/nanoem/emapp
/home/seigneurfuo/src/nanoem/emapp/ZLIB_INCLUDE_DIR
   used as include directory in directory /home/seigneurfuo/src/nanoem/emapp
/home/seigneurfuo/src/nanoem/nanoem/BULLET_INCLUDE_DIR
   used as include directory in directory /home/seigneurfuo/src/nanoem/nanoem
   used as include directory in directory /home/seigneurfuo/src/nanoem/emapp
   used as include directory in directory /home/seigneurfuo/src/nanoem/emapp
   used as include directory in directory /home/seigneurfuo/src/nanoem/sapp
/home/seigneurfuo/src/nanoem/sapp/TBB_INCLUDE_DIR
   used as include directory in directory /home/seigneurfuo/src/nanoem/sapp
MINIZIP_LIBRARY_DEBUG (ADVANCED)
    linked by target "nanoem_sapp" in directory /home/seigneurfuo/src/nanoem/sapp
MINIZIP_LIBRARY_RELEASE (ADVANCED)
    linked by target "nanoem_sapp" in directory /home/seigneurfuo/src/nanoem/sapp
NANOMSG_LIBRARY_DEBUG (ADVANCED)
    linked by target "nanoem_sapp" in directory /home/seigneurfuo/src/nanoem/sapp
NANOMSG_LIBRARY_RELEASE (ADVANCED)
    linked by target "nanoem_sapp" in directory /home/seigneurfuo/src/nanoem/sapp
TBB_LIBRARY_DEBUG (ADVANCED)
    linked by target "nanoem_sapp" in directory /home/seigneurfuo/src/nanoem/sapp
TBB_LIBRARY_RELEASE (ADVANCED)
    linked by target "nanoem_sapp" in directory /home/seigneurfuo/src/nanoem/sapp
ZLIB_LIBRARY_DEBUG (ADVANCED)
    linked by target "nanoem_sapp" in directory /home/seigneurfuo/src/nanoem/sapp
ZLIB_LIBRARY_RELEASE (ADVANCED)
    linked by target "nanoem_sapp" in directory /home/seigneurfuo/src/nanoem/sapp

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

Thanks.

@hkrn
Copy link
Owner

hkrn commented Aug 28, 2022

Did you run cmake -P scripts/build.cmake as described in README? If you have already run it, did you set environment variable NANOEM_TARGET_COMPILER? For example, If you use clang for build, NANOEM_TARGET_COMPILER must be clang.

Currently the errors are unfriendly and will be improved in #198

@seigneurfuo
Copy link
Author

Yes I follow the steps described in the README. I did cmake -P scripts/build.cmake before.
NANOEM_TARGET_COMPILER is also set to clang:

env | grep -i nanoem

NANOEM_TARGET_COMPILER=clang
NANOEM_DISABLE_BUILD_SENTRY_NATIVE=1
NANOEM_DISABLE_BUILD_SPIRV_TOOLS=1

@seigneurfuo
Copy link
Author

seigneurfuo commented Aug 28, 2022

I had try to recompile after pulling your modifications done in #198.
I get less errors messages but here the ones that left.
I am doing something wrong ?

[...]
-- Found OpenGL: /usr/lib/libOpenGL.so   
-- [emapp] setup linkage of "nanoem_sapp"
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/seigneurfuo/src/nanoem/emapp/TBB_INCLUDE_DIR
   used as include directory in directory /home/seigneurfuo/src/nanoem/emapp
/home/seigneurfuo/src/nanoem/sapp/TBB_INCLUDE_DIR
   used as include directory in directory /home/seigneurfuo/src/nanoem/sapp
TBB_LIBRARY_DEBUG (ADVANCED)
    linked by target "nanoem_sapp" in directory /home/seigneurfuo/src/nanoem/sapp
TBB_LIBRARY_RELEASE (ADVANCED)
    linked by target "nanoem_sapp" in directory /home/seigneurfuo/src/nanoem/sapp

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

@hkrn
Copy link
Owner

hkrn commented Aug 28, 2022

There was a discrepancy between the build script defaults and nanoem's own CMake defaults, which was corrected in #199.

Or you can deal with it by setting NANOEM_ENABLE_TBB to OFF (This is enabled by default and therefore causes above error message).

@seigneurfuo
Copy link
Author

seigneurfuo commented Aug 28, 2022

It works. Thanks for your quick response 👍 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants